openscenegraph
Public Member Functions | Protected Member Functions | Protected Attributes
osgTerrain::Layer Class Reference
Inheritance diagram for osgTerrain::Layer:
osg::Object osg::Referenced osgTerrain::CompositeLayer osgTerrain::ContourLayer osgTerrain::HeightFieldLayer osgTerrain::ImageLayer osgTerrain::ProxyLayer osgTerrain::SwitchLayer

List of all members.

Public Member Functions

 Layer ()
 Layer (const Layer &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Object (osgTerrain, Layer)
void setSetName (const std::string &setname)
const std::string & getSetName () const
virtual void setFileName (const std::string &filename)
virtual const std::string & getFileName () const
std::string getCompoundName () const
void setLocator (Locator *locator)
LocatorgetLocator ()
const LocatorgetLocator () const
void setMinLevel (unsigned int minLevel)
unsigned int getMinLevel () const
void setMaxLevel (unsigned int maxLevel)
unsigned int getMaxLevel () const
void setValidDataOperator (ValidDataOperator *validDataOp)
ValidDataOperatorgetValidDataOperator ()
const ValidDataOperatorgetValidDataOperator () const
virtual unsigned int getNumColumns () const
virtual unsigned int getNumRows () const
void setDefaultValue (const osg::Vec4 &value)
const osg::Vec4getDefaultValue () const
void setMinFilter (osg::Texture::FilterMode filter)
osg::Texture::FilterMode getMinFilter () const
void setMagFilter (osg::Texture::FilterMode filter)
osg::Texture::FilterMode getMagFilter () const
virtual osg::ImagegetImage ()
virtual const osg::ImagegetImage () const
virtual bool transform (float, float)
virtual bool getValue (unsigned int, unsigned int, float &) const
virtual bool getValue (unsigned int, unsigned int, osg::Vec2 &) const
virtual bool getValue (unsigned int, unsigned int, osg::Vec3 &) const
virtual bool getValue (unsigned int, unsigned int, osg::Vec4 &) const
bool getValidValue (unsigned int i, unsigned int j, float &value) const
bool getValidValue (unsigned int i, unsigned int j, osg::Vec2 &value) const
bool getValidValue (unsigned int i, unsigned int j, osg::Vec3 &value) const
bool getValidValue (unsigned int i, unsigned int j, osg::Vec4 &value) const
void computeIndices (double ndc_x, double ndc_y, unsigned int &i, unsigned int &j, double &ir, double &jr)
bool getInterpolatedValue (double ndc_x, double ndc_y, float &value)
bool getInterpolatedValidValue (double ndc_x, double ndc_y, float &value)
virtual void dirty ()
virtual void setModifiedCount (unsigned int)
virtual unsigned int getModifiedCount () const
virtual osg::BoundingSphere computeBound (bool treatAsElevationLayer) const

Protected Member Functions

virtual ~Layer ()

Protected Attributes

std::string _filename
osg::ref_ptr< Locator_locator
unsigned int _minLevel
unsigned int _maxLevel
osg::ref_ptr< ValidDataOperator_validDataOperator
osg::Vec4 _defaultValue
osg::Texture::FilterMode _minFilter
osg::Texture::FilterMode _magFilter

Constructor & Destructor Documentation

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osgTerrain::Layer::~Layer ( ) [protected, virtual]

Member Function Documentation

virtual osg::BoundingSphere osgTerrain::Layer::computeBound ( bool  treatAsElevationLayer) const [virtual]

Reimplemented in osgTerrain::ProxyLayer.

void osgTerrain::Layer::computeIndices ( double  ndc_x,
double  ndc_y,
unsigned int &  i,
unsigned int &  j,
double &  ir,
double &  jr 
) [inline]

Compute column,row indices from normalized coordinates.

Parameters:
[in]ndc_xNormalized X-axis coordinate.
[in]ndc_yNormalized Y-axis coordinate.
[out]iReturned X-axis (or column) index.
[out]jReturned Y-axis (or row) index.
[out]irReturned X-axis fraction.
[out]jrReturned Y-axis fraction.
virtual void osgTerrain::Layer::dirty ( ) [inline, virtual]
std::string osgTerrain::Layer::getCompoundName ( ) const [inline]

Return the compound name of the layer in the form set::name::filename string.

References osgTerrain::createCompoundSetNameAndFileName().

const osg::Vec4& osgTerrain::Layer::getDefaultValue ( ) const [inline]
virtual const std::string& osgTerrain::Layer::getFileName ( ) const [inline, virtual]

Get the file name of the layer.

Reimplemented in osgTerrain::ProxyLayer, osgTerrain::HeightFieldLayer, and osgTerrain::ImageLayer.

Referenced by osgTerrain::CompositeLayer::addLayer().

virtual osg::Image* osgTerrain::Layer::getImage ( ) [inline, virtual]

Return image associated with layer if supported.

Reimplemented in osgTerrain::SwitchLayer, osgTerrain::ProxyLayer, osgTerrain::ContourLayer, and osgTerrain::ImageLayer.

virtual const osg::Image* osgTerrain::Layer::getImage ( ) const [inline, virtual]

Return const image associated with layer if supported.

Reimplemented in osgTerrain::SwitchLayer, osgTerrain::ProxyLayer, osgTerrain::ContourLayer, and osgTerrain::ImageLayer.

bool osgTerrain::Layer::getInterpolatedValidValue ( double  ndc_x,
double  ndc_y,
float &  value 
) [inline]
bool osgTerrain::Layer::getInterpolatedValue ( double  ndc_x,
double  ndc_y,
float &  value 
) [inline]

Calculate the interpolated layer value at the given normalized coordinates.

Parameters:
[in]ndc_xNormalized X-axis coordinate.
[in]ndc_yNormalized Y-axis coordinate.
[out]valueReturned layer value.
Returns:
true if value is valid, else false
const Locator* osgTerrain::Layer::getLocator ( ) const [inline]

Get the magnification texture filter to use when a texture is associated with this layer.

unsigned int osgTerrain::Layer::getMaxLevel ( ) const [inline]

Get the minification texture filter to use when a texture is associated with this layer.

unsigned int osgTerrain::Layer::getMinLevel ( ) const [inline]
virtual unsigned int osgTerrain::Layer::getModifiedCount ( ) const [inline, virtual]
virtual unsigned int osgTerrain::Layer::getNumColumns ( ) const [inline, virtual]
virtual unsigned int osgTerrain::Layer::getNumRows ( ) const [inline, virtual]
const std::string& osgTerrain::Layer::getSetName ( ) const [inline]

Get the name of this layer.

Get the data validation operator.

Get the const data validation operator.

bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
float &  value 
) const [inline]
bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec2 value 
) const [inline]
bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec3 value 
) const [inline]
bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec4 value 
) const [inline]
virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
float &   
) const [inline, virtual]

Get the layer value at position i,j.

Parameters:
[in]iX-axis (or column) index.
[in]jY-axis (or row) index.
[out]valueReturned layer value.
Returns:
true if value is valid, else false

Reimplemented in osgTerrain::ProxyLayer, osgTerrain::HeightFieldLayer, osgTerrain::ContourLayer, and osgTerrain::ImageLayer.

virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec2  
) const [inline, virtual]
virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec3  
) const [inline, virtual]
virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec4  
) const [inline, virtual]
osgTerrain::Layer::META_Object ( osgTerrain  ,
Layer   
)
void osgTerrain::Layer::setDefaultValue ( const osg::Vec4 value) [inline]
virtual void osgTerrain::Layer::setFileName ( const std::string &  filename) [inline, virtual]

Set the file name of the data associated with this layer.

Reimplemented in osgTerrain::ProxyLayer, osgTerrain::HeightFieldLayer, and osgTerrain::ImageLayer.

void osgTerrain::Layer::setLocator ( Locator locator) [inline]

Set the magnification texture filter to use when a texture is associated with this layer.

void osgTerrain::Layer::setMaxLevel ( unsigned int  maxLevel) [inline]

Set the minification texture filter to use when a texture is associated with this layer.

void osgTerrain::Layer::setMinLevel ( unsigned int  minLevel) [inline]
virtual void osgTerrain::Layer::setModifiedCount ( unsigned int  ) [inline, virtual]
void osgTerrain::Layer::setSetName ( const std::string &  setname) [inline]

Set the name of this layer.

Set the data validation operator.

virtual bool osgTerrain::Layer::transform ( float  ,
float   
) [inline, virtual]

Member Data Documentation

std::string osgTerrain::Layer::_filename [protected]
unsigned int osgTerrain::Layer::_maxLevel [protected]
unsigned int osgTerrain::Layer::_minLevel [protected]

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