# osgUtil::Simplifier Class Reference

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

Inheritance diagram for osgUtil::Simplifier:

[legend]
List of all members.

## Public Types

typedef std::vector< unsigned int > | IndexList

## Public Member Functions

| Simplifier (float sampleRatio=1.0f, float maximumError=0.0f)
void | setSampleRatio (float sampleRatio)
float | getSampleRatio () const
void | setMaximumError (float error)
float | getMaximumError () 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)
| simply the geometry, whilst protecting key points from being modified.

## Protected Attributes

float | _sampleRatio
float | _maximumError
osg::ref_ptr< ContinueSimplificationCallback > | _continueSimplificationCallback

## Classes

class | ContinueSimplificationCallback

## Detailed Description

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

## Member Typedef Documentation

typedef std::vector<unsigned int> osgUtil::Simplifier::IndexList

## Constructor & Destructor Documentation

Simplifier::Simplifier | ( | float | sampleRatio = `1.0f`,
|  | float | maximumError = `0.0f`
| ) |

## Member Function Documentation

virtual void osgUtil::Simplifier::apply | ( | osg::Geode & | geode | ) | `[inline, virtual]`

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]`

const ContinueSimplificationCallback* osgUtil::Simplifier::getContinueSimplificationCallback | ( |  | ) | const`[inline]`

ContinueSimplificationCallback* osgUtil::Simplifier::getContinueSimplificationCallback | ( |  | ) | `[inline]`

float osgUtil::Simplifier::getMaximumError | ( |  | ) | const`[inline]`

float osgUtil::Simplifier::getSampleRatio | ( |  | ) | const`[inline]`

void osgUtil::Simplifier::setContinueSimplificationCallback | ( | ContinueSimplificationCallback * | cb | ) | `[inline]`

void osgUtil::Simplifier::setMaximumError | ( | float | error | ) | `[inline]`

void osgUtil::Simplifier::setSampleRatio | ( | float | sampleRatio | ) | `[inline]`

void Simplifier::simplify | ( | osg::Geometry & | geometry,
|  | const IndexList & | protectedPoints
| ) |

| simply the geometry, whilst protecting key points from being modified.

void Simplifier::simplify | ( | osg::Geometry & | geometry | ) |

| simply the geometry.

## Member Data Documentation

osg::ref_ptr<ContinueSimplificationCallback> osgUtil::Simplifier::_continueSimplificationCallback `[protected]`

float osgUtil::Simplifier::_maximumError `[protected]`

float osgUtil::Simplifier::_sampleRatio `[protected]`

The documentation for this class was generated from the following files:

- Simplifier
- Simplifier.cpp