Added s/getDoTriStrip and s/getSmoothing method.

This commit is contained in:
Robert Osfield
2006-02-06 20:36:09 +00:00
parent 5418757d9d
commit 608a183753
2 changed files with 24 additions and 7 deletions

View File

@@ -1671,12 +1671,6 @@ void EdgeCollapse::copyBackToGeometry()
_geometry->getPrimitiveSetList().clear();
_geometry->addPrimitiveSet(primitives);
#if 1
osgUtil::SmoothingVisitor::smooth(*_geometry);
osgUtil::TriStripVisitor stripper;
stripper.stripify(*_geometry);
#endif
}
@@ -1684,7 +1678,10 @@ Simplifier::Simplifier(float sampleRatio, float maximumError, float maximumLengt
osg::NodeVisitor(osg::NodeVisitor::TRAVERSE_ALL_CHILDREN),
_sampleRatio(sampleRatio),
_maximumError(maximumError),
_maximumLength(maximumLength)
_maximumLength(maximumLength),
_triStrip(true),
_smoothing(true)
{
}
@@ -1749,4 +1746,16 @@ void Simplifier::simplify(osg::Geometry& geometry, const IndexList& protectedPoi
}
ec.copyBackToGeometry();
if (_smoothing)
{
osgUtil::SmoothingVisitor::smooth(geometry);
}
if (_triStrip)
{
osgUtil::TriStripVisitor stripper;
stripper.stripify(geometry);
}
}