Added smoothing and tri strip pass.

This commit is contained in:
Robert Osfield
2005-06-29 15:52:01 +00:00
parent cefa62097f
commit 1c8aca5a00

View File

@@ -29,6 +29,9 @@
#include <osgDB/FileNameUtils>
#include <osgDB/FileUtils>
#include <osgUtil/TriStripVisitor>
#include <osgUtil/SmoothingVisitor>
#include <osg/Geode>
#include <osg/Geometry>
@@ -190,6 +193,13 @@ osgDB::ReaderWriter::ReadResult ReaderWriterSTL::readNode(const std::string& fil
osg::Geode* geode = new osg::Geode;
geode->addDrawable(geom);
osgUtil::SmoothingVisitor smooter;
geode->accept(smooter);
osgUtil::TriStripVisitor tristripper;
tristripper.stripify(*geom);
return geode;
}