Refactored ShapeDrawable so that it is subclassed from osg::Geometry rather than osg::Drawable.

Created a BuildShapeGeometryVisitor visitor that can create osg::Geometry for osg::Shape objects
This commit is contained in:
Robert Osfield
2016-08-17 21:34:32 +01:00
parent 3be951f279
commit 83b5cabac9
5 changed files with 1210 additions and 2079 deletions

View File

@@ -185,7 +185,7 @@ class OSG_EXPORT Drawable : public Node
* geometry generation.
* @see osg::Shape.
*/
inline void setShape(Shape* shape) { _shape = shape; }
virtual void setShape(Shape* shape) { _shape = shape; }
template<class T> void setShape(const ref_ptr<T>& shape) { setShape(shape.get()); }