Made the generation of QUADS for strip with the length of 4 an option.

This commit is contained in:
Robert Osfield
2004-05-02 15:43:55 +00:00
parent a34cc250e5
commit 6223c11570
2 changed files with 84 additions and 76 deletions

View File

@@ -35,7 +35,8 @@ class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
TriStripVisitor(Optimizer* optimizer=0) :
osg::NodeVisitor( osg::NodeVisitor::TRAVERSE_ALL_CHILDREN ),
_cacheSize( 16 ),
_minStripSize( 2 )
_minStripSize( 2 ),
_generateFourPointPrimitivesQuads ( false)
{}
/** Convert mesh primitives in Geometry into Tri Strips.
@@ -84,6 +85,10 @@ class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
{
return _optimizer ? _optimizer->isOperationPermissableForObject(object,osgUtil::Optimizer::TRISTRIP_GEOMETRY) : true;
}
void setGenerateFourPointPrimitivesQuads(bool flag) { _generateFourPointPrimitivesQuads = flag; }
bool getGenerateFourPointPrimitivesQuads() const { return _generateFourPointPrimitivesQuads; }
private:
@@ -93,6 +98,7 @@ class OSGUTIL_EXPORT TriStripVisitor : public osg::NodeVisitor
unsigned int _cacheSize;
unsigned int _minStripSize;
GeometryList _geometryList;
bool _generateFourPointPrimitivesQuads;
};
}