Game Development Community

T2dSceneObjectSet

by Alex Rice · in Torque Game Builder · 06/13/2006 (10:54 am) · 3 replies

T2dSceneObjectSet seems to have been added about the time of the new Level Builder? I don't know if you all can do multiple inheritance, but it would be very cool if t2dSceneObjectSet could inherit from BOTH SimSet and from t2dSceneObject. Then it would be possible to do stuff like setRotationalVelocity() on a set of objects.

#1
06/13/2006 (10:44 pm)
Unfortunately that would cause a "diamond inheritence", which for those that have run into it before really confuses compilers (basically, both SimSet and all t2dxxxObjects inherit from SimObject, so having a class that inherits from SimSet and a t2dXXXObject is a no-no).

There are ways around diamond issues, but not for RC at this point in time. You could of course work your way around it yourself with the source if you have a desparate need.
#2
06/13/2006 (10:45 pm)
No desperate need, I just though it would be nifty. Thanks
#3
06/14/2006 (5:27 am)
I may be misunderstanding you, Stephen, but AFAIK the diamond problem can be fixed using virtual inheritance. That way both classes (SimSet and t2dXXXObject) will share the same instance of SimObject.