Added asGroup() and asTransform() methods to osg::Node to downcast nodes
to these types without requiring an expensive dynamic_cast<>. Also added asGeometry() to osg::Drawable for the same reasons.
This commit is contained in:
@@ -45,6 +45,9 @@ class SG_EXPORT Transform : public Group
|
||||
|
||||
META_Node(osg, Transform);
|
||||
|
||||
virtual Transform* asTransform() { return this; }
|
||||
virtual const Transform* asTransform() const { return this; }
|
||||
|
||||
enum ReferenceFrame
|
||||
{
|
||||
RELATIVE_TO_PARENTS,
|
||||
|
||||
Reference in New Issue
Block a user