[Opensim-dev] Should SOG and SOP be combined into a single object in a linked hierarchy?

Melanie melanie at t-data.com
Tue Nov 11 15:16:40 UTC 2008


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();

That, as opposed to part = Scene.GetPart(localID); part.DoSomething();

Melanie




More information about the Opensim-dev mailing list