osgEarth 2.1.1
|
Public Member Functions | |
ReplaceInvalidDataOperator () | |
virtual void | operator() (osg::HeightField *heightField) |
osgTerrain::ValidDataOperator * | getValidDataOperator () |
void | setValidDataOperator (osgTerrain::ValidDataOperator *validDataOperator) |
float | getReplaceWith () |
void | setReplaceWith (float replaceWith) |
Public Attributes | |
osg::ref_ptr < osgTerrain::ValidDataOperator > | _validDataOperator |
float | _replaceWith |
Visitor that replaces "invalid" data values with a known value.
Definition at line 144 of file HeightFieldUtils.
ReplaceInvalidDataOperator::ReplaceInvalidDataOperator | ( | ) |
Definition at line 396 of file HeightFieldUtils.cpp.
: _replaceWith(0.0f) { }
float osgEarth::ReplaceInvalidDataOperator::getReplaceWith | ( | ) | [inline] |
Definition at line 153 of file HeightFieldUtils.
{ return _replaceWith; }
osgTerrain::ValidDataOperator* osgEarth::ReplaceInvalidDataOperator::getValidDataOperator | ( | ) | [inline] |
Definition at line 150 of file HeightFieldUtils.
{ return _validDataOperator.get(); }
void ReplaceInvalidDataOperator::operator() | ( | osg::HeightField * | heightField | ) | [virtual] |
Definition at line 402 of file HeightFieldUtils.cpp.
{ if (heightField && _validDataOperator.valid()) { for (unsigned int i = 0; i < heightField->getHeightList().size(); ++i) { float elevation = heightField->getHeightList()[i]; if (!(*_validDataOperator)(elevation)) { heightField->getHeightList()[i] = _replaceWith; } } } }
void osgEarth::ReplaceInvalidDataOperator::setReplaceWith | ( | float | replaceWith | ) | [inline] |
Definition at line 154 of file HeightFieldUtils.
{ _replaceWith = replaceWith; }
void osgEarth::ReplaceInvalidDataOperator::setValidDataOperator | ( | osgTerrain::ValidDataOperator * | validDataOperator | ) | [inline] |
Definition at line 151 of file HeightFieldUtils.
{ _validDataOperator = validDataOperator; }
Definition at line 157 of file HeightFieldUtils.
osg::ref_ptr<osgTerrain::ValidDataOperator> osgEarth::ReplaceInvalidDataOperator::_validDataOperator |
Definition at line 156 of file HeightFieldUtils.