[Opensim-dev] Should SOG and SOP be combined into a single object in a linked hierarchy?
Justin Clark-Casey
jjustincc at googlemail.com
Tue Nov 11 15:29:41 UTC 2008
Melanie wrote:
> Hi,
>
> Alan M Webb wrote:
>> Arriving late to this discussion. Why is a single super class not the
>> answer here? llEntity contains the information which is true of all
>> elements, then derived classes differentiate based upon usage? One, large,
>> monolithic class makes things easy in the short-term, but harder over time
>> and totally defeats the design goals of an object oriented system. IMHO
>> :-)
>
> Usage. yes. But not linkset position. Because that changes over
> time. LLEntity reflects what a LL entity can do. Which is as it
> should be. If there are sub-classes (and static helpers) that help
> make the code more clear, that is not an issue at all.
>
> What I aim for is to have an object that, from the _outside_
> presents a single type to a viewer that expects to see a single type.
>
> The SL viewer will give a local ID for any type of operation, and it
> may give a child prim ID for an "object" operation, which leads to
> the ugly if (ParentGroup != null && ParentGroup.RootPart != null &&
> ParentGroup.RootPart != part)
> part.DoSomething();
Well, all the null checks could be resolved if we didn't null out the root part on deletion.
But there is other messiness such as looking through all groups for a particular child part with a given id that would
disappear (this in itself could also be resolved by keeping extra lists of localID -> parts in something like
EntitiesList though that's adding code on top of what we already have).
>
> That, as opposed to part = Scene.GetPart(localID); part.DoSomething();
>
> Melanie
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
--
justincc
Justin Clark-Casey
http://justincc.wordpress.com
More information about the Opensim-dev
mailing list