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:
@@ -30,6 +30,9 @@ class SG_EXPORT Geometry : public Drawable
|
||||
virtual const char* libraryName() const { return "osg"; }
|
||||
virtual const char* className() const { return "Geometry"; }
|
||||
|
||||
virtual Geometry* asGeometry() { return this; }
|
||||
virtual const Geometry* asGeometry() const { return this; }
|
||||
|
||||
enum AttributeBinding
|
||||
{
|
||||
BIND_OFF=0,
|
||||
|
||||
Reference in New Issue
Block a user