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:
Robert Osfield
2002-09-12 15:34:31 +00:00
parent b5870857c4
commit f867dd81be
6 changed files with 33 additions and 2 deletions

View File

@@ -27,6 +27,9 @@ class SG_EXPORT Group : public Node
META_Node(osg, Group);
virtual Group* asGroup() { return this; }
virtual const Group* asGroup() const { return this; }
virtual void traverse(NodeVisitor& nv);
/** Add Node to Group.