Added first cut of new primtive shapes support.

This commit is contained in:
Robert Osfield
2002-10-30 13:27:15 +00:00
parent 2e99fdacfc
commit da84f9b4aa
17 changed files with 1674 additions and 33 deletions

View File

@@ -5,6 +5,7 @@
#include <osg/Drawable>
#include <osg/Array>
#include <osg/PrimitiveSet>
#include <osg/Shape>
using namespace osg;
@@ -92,3 +93,12 @@ PrimitiveSet* CopyOp::operator() (const PrimitiveSet* primitive) const
else
return const_cast<PrimitiveSet*>(primitive);
}
Shape* CopyOp::operator() (const Shape* shape) const
{
if (shape && _flags&DEEP_COPY_SHAPES)
return dynamic_cast<Shape*>(shape->clone(*this));
else
return const_cast<Shape*>(shape);
}