OpenSceneGraph 2.8.3
|
A simplifier for reducing the number of traingles in osg::Geometry. More...
Classes | |
class | ContinueSimplificationCallback |
Public Types | |
typedef std::vector< unsigned int > | IndexList |
Public Member Functions | |
Simplifier (double sampleRatio=1.0, double maximumError=FLT_MAX, double maximumLength=0.0) | |
META_NodeVisitor ("osgUtil","Simplifier") void setSampleRatio(float sampleRatio) | |
float | getSampleRatio () const |
void | setMaximumError (float error) |
Set the maximum point error that all point removals must be less than to permit removal of a point. | |
float | getMaximumError () const |
void | setMaximumLength (float length) |
Set the maximum length target that all edges must be shorted than. | |
float | getMaximumLength () const |
void | setDoTriStrip (bool on) |
bool | getDoTriStrip () const |
void | setSmoothing (bool on) |
bool | getSmoothing () const |
void | setContinueSimplificationCallback (ContinueSimplificationCallback *cb) |
ContinueSimplificationCallback * | getContinueSimplificationCallback () |
const ContinueSimplificationCallback * | getContinueSimplificationCallback () const |
bool | continueSimplification (float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const |
virtual bool | continueSimplificationImplementation (float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const |
virtual void | apply (osg::Geode &geode) |
void | simplify (osg::Geometry &geometry) |
simply the geometry. | |
void | simplify (osg::Geometry &geometry, const IndexList &protectedPoints) |
a list of point indices | |
Protected Attributes | |
double | _sampleRatio |
double | _maximumError |
double | _maximumLength |
bool | _triStrip |
bool | _smoothing |
osg::ref_ptr < ContinueSimplificationCallback > | _continueSimplificationCallback |
A simplifier for reducing the number of traingles in osg::Geometry.
typedef std::vector<unsigned int> osgUtil::Simplifier::IndexList |
osgUtil::Simplifier::Simplifier | ( | double | sampleRatio = 1.0 , |
double | maximumError = FLT_MAX , |
||
double | maximumLength = 0.0 |
||
) |
virtual void osgUtil::Simplifier::apply | ( | osg::Geode & | geode | ) | [inline, virtual] |
Reimplemented from osg::NodeVisitor.
References osg::Geode::getDrawable(), and osg::Geode::getNumDrawables().
bool osgUtil::Simplifier::continueSimplification | ( | float | nextError, |
unsigned int | numOriginalPrimitives, | ||
unsigned int | numRemainingPrimitives | ||
) | const [inline] |
virtual bool osgUtil::Simplifier::continueSimplificationImplementation | ( | float | nextError, |
unsigned int | numOriginalPrimitives, | ||
unsigned int | numRemainingPrimitives | ||
) | const [inline, virtual] |
ContinueSimplificationCallback* osgUtil::Simplifier::getContinueSimplificationCallback | ( | ) | [inline] |
const ContinueSimplificationCallback* osgUtil::Simplifier::getContinueSimplificationCallback | ( | ) | const [inline] |
bool osgUtil::Simplifier::getDoTriStrip | ( | ) | const [inline] |
float osgUtil::Simplifier::getMaximumError | ( | ) | const [inline] |
float osgUtil::Simplifier::getMaximumLength | ( | ) | const [inline] |
float osgUtil::Simplifier::getSampleRatio | ( | ) | const [inline] |
bool osgUtil::Simplifier::getSmoothing | ( | ) | const [inline] |
osgUtil::Simplifier::META_NodeVisitor | ( | "osgUtil" | , |
"Simplifier" | |||
) | [inline] |
void osgUtil::Simplifier::setContinueSimplificationCallback | ( | ContinueSimplificationCallback * | cb | ) | [inline] |
void osgUtil::Simplifier::setDoTriStrip | ( | bool | on | ) | [inline] |
void osgUtil::Simplifier::setMaximumError | ( | float | error | ) | [inline] |
Set the maximum point error that all point removals must be less than to permit removal of a point.
Note, Only used when down sampling. i.e. sampleRatio < 1.0
void osgUtil::Simplifier::setMaximumLength | ( | float | length | ) | [inline] |
Set the maximum length target that all edges must be shorted than.
Note, Only used when up sampling i.e. sampleRatio > 1.0.
void osgUtil::Simplifier::setSmoothing | ( | bool | on | ) | [inline] |
void osgUtil::Simplifier::simplify | ( | osg::Geometry & | geometry, |
const IndexList & | protectedPoints | ||
) |
a list of point indices
simply the geometry, whilst protecting key points from being modified.
void osgUtil::Simplifier::simplify | ( | osg::Geometry & | geometry | ) |
simply the geometry.
osg::ref_ptr<ContinueSimplificationCallback> osgUtil::Simplifier::_continueSimplificationCallback [protected] |
double osgUtil::Simplifier::_maximumError [protected] |
double osgUtil::Simplifier::_maximumLength [protected] |
double osgUtil::Simplifier::_sampleRatio [protected] |
bool osgUtil::Simplifier::_smoothing [protected] |
bool osgUtil::Simplifier::_triStrip [protected] |
![]() | Generated at Tue Mar 22 2011 13:20:30 for the OpenSceneGraph by doxygen 1.7.3. |