class OSGUTIL_EXPORT osgUtil::Simplifier

A simplifier for reducing the number of traingles in osg::Geometry

Inheritance:


Public Classes

class ContinueSimplificationCallback: public osg::Referenced

Public Methods

[more] Simplifier(float sampleRatio=1.0f, float maximumError=0.0f)
[more]void setSampleRatio(float sampleRatio)
[more]float getSampleRatio() const
[more]void setMaximumError(float error)
[more]float getMaximumError() const
[more]void setContinueSimplificationCallback(ContinueSimplificationCallback* cb)
[more]ContinueSimplificationCallback* getContinueSimplificationCallback()
[more]const ContinueSimplificationCallback* getContinueSimplificationCallback() const
[more]bool continueSimplification(float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const
[more]virtual bool continueSimplificationImplementation(float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const
[more]virtual void apply(osg::Geode& geode)
[more]void simplify(osg::Geometry& geometry)
simply the geometry
[more]void simplify(osg::Geometry& geometry, const IndexList& protectedPoints)
simply the geometry, whilst protecting key points from being modified

Public

[more]typedef std::vector<unsigned int> IndexList
[more] a list of point indices

Protected Fields

[more]float _sampleRatio
[more]float _maximumError
[more]osg::ref_ptr<ContinueSimplificationCallback> _continueSimplificationCallback


Documentation

A simplifier for reducing the number of traingles in osg::Geometry
o Simplifier(float sampleRatio=1.0f, float maximumError=0.0f)

ovoid setSampleRatio(float sampleRatio)

ofloat getSampleRatio() const

ovoid setMaximumError(float error)

ofloat getMaximumError() const

ovoid setContinueSimplificationCallback(ContinueSimplificationCallback* cb)

oContinueSimplificationCallback* getContinueSimplificationCallback()

oconst ContinueSimplificationCallback* getContinueSimplificationCallback() const

obool continueSimplification(float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const

ovirtual bool continueSimplificationImplementation(float nextError, unsigned int numOriginalPrimitives, unsigned int numRemainingPrimitives) const

ovirtual void apply(osg::Geode& geode)

ovoid simplify(osg::Geometry& geometry)
simply the geometry

otypedef std::vector<unsigned int> IndexList

o a list of point indices
a list of point indices

ovoid simplify(osg::Geometry& geometry, const IndexList& protectedPoints)
simply the geometry, whilst protecting key points from being modified

ofloat _sampleRatio

ofloat _maximumError

oosg::ref_ptr<ContinueSimplificationCallback> _continueSimplificationCallback


This class has no child classes.

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.