osgEarth 2.1.1
Public Member Functions | Public Attributes

osgEarth::ReplaceInvalidDataOperator Struct Reference

Inheritance diagram for osgEarth::ReplaceInvalidDataOperator:
Collaboration diagram for osgEarth::ReplaceInvalidDataOperator:

List of all members.

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

Detailed Description

Visitor that replaces "invalid" data values with a known value.

Definition at line 144 of file HeightFieldUtils.


Constructor & Destructor Documentation

ReplaceInvalidDataOperator::ReplaceInvalidDataOperator ( )

Definition at line 396 of file HeightFieldUtils.cpp.

                                                      :
_replaceWith(0.0f)
{
}

Member Function Documentation

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; }

Here is the caller graph for this function:

void osgEarth::ReplaceInvalidDataOperator::setValidDataOperator ( osgTerrain::ValidDataOperator *  validDataOperator) [inline]

Definition at line 151 of file HeightFieldUtils.

{ _validDataOperator = validDataOperator; }

Here is the caller graph for this function:


Member Data Documentation

Definition at line 157 of file HeightFieldUtils.

osg::ref_ptr<osgTerrain::ValidDataOperator> osgEarth::ReplaceInvalidDataOperator::_validDataOperator

Definition at line 156 of file HeightFieldUtils.


The documentation for this struct was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines