diff --git a/include/osgUtil/Optimizer b/include/osgUtil/Optimizer index df8b0f912..6cf24fb27 100644 --- a/include/osgUtil/Optimizer +++ b/include/osgUtil/Optimizer @@ -48,6 +48,7 @@ class OSGUTIL_EXPORT Optimizer SPATIALIZE_GROUPS = 0x040, COPY_SHARED_NODES = 0x080, TRISTRIP_GEOMETRY = 0x100, + TESSELATE_GEOMETRY = 0x200, DEFAULT_OPTIMIZATIONS = FLATTEN_STATIC_TRANSFORMS | REMOVE_REDUNDANT_NODES | COMBINE_ADJACENT_LODS | @@ -224,6 +225,21 @@ class OSGUTIL_EXPORT Optimizer Optimizer* _optimizer; }; + /** Tesselate all geodes, to remove POLYGONS + * complementary ranges.*/ + class OSGUTIL_EXPORT TesselateVisitor : public osg::NodeVisitor + { + public: + + typedef std::set GroupList; + GroupList _groupList; + + TesselateVisitor():osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN) {} + + virtual void apply(osg::Geode& geode); + + }; + /** Optimize the LOD groups, by combining adjacent LOD's which have * complementary ranges.*/ class OSGUTIL_EXPORT CombineLODsVisitor : public osg::NodeVisitor