OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
osgTerrain::Layer Class Reference

#include <Layer.h>

Inheritance diagram for osgTerrain::Layer:
Inheritance graph
[legend]
Collaboration diagram for osgTerrain::Layer:
Collaboration graph
[legend]

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
 
- Public Member Functions inherited from osg::Object
 Object ()
 
 Object (bool threadSafeRefUnref)
 
 Object (const Object &, const CopyOp &copyop=CopyOp::SHALLOW_COPY)
 
virtual ObjectcloneType () const =0
 
virtual Objectclone (const CopyOp &) const =0
 
virtual bool isSameKindAs (const Object *) const
 
virtual const char * libraryName () const =0
 
virtual const char * className () const =0
 
std::string getCompoundClassName () const
 
virtual NodeasNode ()
 
virtual const NodeasNode () const
 
virtual NodeVisitorasNodeVisitor ()
 
virtual const NodeVisitorasNodeVisitor () const
 
virtual StateAttributeasStateAttribute ()
 
virtual const StateAttributeasStateAttribute () const
 
virtual UniformasUniform ()
 
virtual const UniformasUniform () const
 
virtual void setThreadSafeRefUnref (bool threadSafe)
 
virtual void setName (const std::string &name)
 
void setName (const char *name)
 
const std::string & getName () const
 
void setDataVariance (DataVariance dv)
 
DataVariance getDataVariance () const
 
virtual void computeDataVariance ()
 
void setUserDataContainer (osg::UserDataContainer *udc)
 
osg::UserDataContainergetUserDataContainer ()
 
const osg::UserDataContainergetUserDataContainer () const
 
osg::UserDataContainergetOrCreateUserDataContainer ()
 
virtual void setUserData (Referenced *obj)
 
virtual ReferencedgetUserData ()
 
virtual const ReferencedgetUserData () const
 
template<typename T >
bool getUserValue (const std::string &name, T &value) const
 
template<typename T >
void setUserValue (const std::string &name, const T &value)
 
virtual void resizeGLObjectBuffers (unsigned int)
 
virtual void releaseGLObjects (osg::State *=0) const
 
template<typename T >
BoolValueObject
UCharValueObject
UShortValueObject
UIntValueObject
DoubleValueObject
Vec3fValueObject
Vec2dValueObject
Vec4dValueObject
PlaneValueObject
MatrixdValueObject
BoundingBoxdValueObject
BoundingSpheredValueObject
bool 
getUserValue (const std::string &name, T &value) const
 
- Public Member Functions inherited from osg::Referenced
 Referenced ()
 
 Referenced (bool threadSafeRefUnref)
 
 Referenced (const Referenced &)
 
Referencedoperator= (const Referenced &)
 
bool getThreadSafeRefUnref () const
 
OpenThreads::MutexgetRefMutex () const
 
int ref () const
 
int unref () const
 
int unref_nodelete () const
 
int referenceCount () const
 
ObserverSetgetObserverSet () const
 
ObserverSetgetOrCreateObserverSet () const
 
void addObserver (Observer *observer) const
 
void removeObserver (Observer *observer) const
 

Protected Member Functions

virtual ~Layer ()
 
- Protected Member Functions inherited from osg::Object
virtual ~Object ()
 
- Protected Member Functions inherited from osg::Referenced
virtual ~Referenced ()
 
void signalObserversAndDelete (bool signalDelete, bool doDelete) const
 
void deleteUsingDeleteHandler () const
 

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
 
- Protected Attributes inherited from osg::Object
std::string _name
 
DataVariance _dataVariance
 
osg::UserDataContainer_userDataContainer
 
- Protected Attributes inherited from osg::Referenced
OpenThreads::AtomicPtr _observerSet
 
OpenThreads::Atomic _refCount
 

Additional Inherited Members

- Public Types inherited from osg::Object
enum  DataVariance { DYNAMIC, STATIC, UNSPECIFIED }
 
- Static Public Member Functions inherited from osg::Referenced
static OpenThreads::MutexgetGlobalReferencedMutex ()
 
static void setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting)
 
static bool getThreadSafeReferenceCounting ()
 
static void setDeleteHandler (DeleteHandler *handler)
 
static DeleteHandlergetDeleteHandler ()
 

Detailed Description

Definition at line 36 of file Layer.h.

Constructor & Destructor Documentation

osgTerrain::Layer::Layer ( )
osgTerrain::Layer::Layer ( const Layer ,
const osg::CopyOp copyop = osg::CopyOp::SHALLOW_COPY 
)

Copy constructor using CopyOp to manage deep vs shallow copy.

virtual osgTerrain::Layer::~Layer ( )
protectedvirtual

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.

Definition at line 162 of file Layer.h.

virtual void osgTerrain::Layer::dirty ( )
inlinevirtual

increment the modified count."

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

Definition at line 274 of file Layer.h.

std::string osgTerrain::Layer::getCompoundName ( ) const
inline

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

Definition at line 60 of file Layer.h.

Here is the call graph for this function:

const osg::Vec4& osgTerrain::Layer::getDefaultValue ( ) const
inline

Definition at line 89 of file Layer.h.

virtual const std::string& osgTerrain::Layer::getFileName ( ) const
inlinevirtual

Get the file name of the layer.

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

Definition at line 57 of file Layer.h.

Here is the caller graph for this function:

virtual osg::Image* osgTerrain::Layer::getImage ( )
inlinevirtual

Return image associated with layer if supported.

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

Definition at line 108 of file Layer.h.

virtual const osg::Image* osgTerrain::Layer::getImage ( ) const
inlinevirtual

Return const image associated with layer if supported.

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

Definition at line 111 of file Layer.h.

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

Definition at line 226 of file Layer.h.

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

Definition at line 179 of file Layer.h.

Locator* osgTerrain::Layer::getLocator ( )
inline

Definition at line 63 of file Layer.h.

const Locator* osgTerrain::Layer::getLocator ( ) const
inline

Definition at line 64 of file Layer.h.

osg::Texture::FilterMode osgTerrain::Layer::getMagFilter ( ) const
inline

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

Definition at line 103 of file Layer.h.

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

Definition at line 70 of file Layer.h.

osg::Texture::FilterMode osgTerrain::Layer::getMinFilter ( ) const
inline

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

Definition at line 96 of file Layer.h.

unsigned int osgTerrain::Layer::getMinLevel ( ) const
inline

Definition at line 67 of file Layer.h.

virtual unsigned int osgTerrain::Layer::getModifiedCount ( ) const
inlinevirtual

Get modified count value.

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

Definition at line 280 of file Layer.h.

virtual unsigned int osgTerrain::Layer::getNumColumns ( ) const
inlinevirtual

Get the number of columns.

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

Definition at line 83 of file Layer.h.

virtual unsigned int osgTerrain::Layer::getNumRows ( ) const
inlinevirtual

Get the number of rows.

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

Definition at line 86 of file Layer.h.

const std::string& osgTerrain::Layer::getSetName ( ) const
inline

Get the name of this layer.

Definition at line 51 of file Layer.h.

ValidDataOperator* osgTerrain::Layer::getValidDataOperator ( )
inline

Get the data validation operator.

Definition at line 76 of file Layer.h.

const ValidDataOperator* osgTerrain::Layer::getValidDataOperator ( ) const
inline

Get the const data validation operator.

Definition at line 79 of file Layer.h.

bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
float &  value 
) const
inline

Definition at line 128 of file Layer.h.

bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec2 value 
) const
inline

Definition at line 134 of file Layer.h.

bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec3 value 
) const
inline

Definition at line 140 of file Layer.h.

bool osgTerrain::Layer::getValidValue ( unsigned int  i,
unsigned int  j,
osg::Vec4 value 
) const
inline

Definition at line 146 of file Layer.h.

virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
float &   
) const
inlinevirtual

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.

Definition at line 123 of file Layer.h.

virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec2  
) const
inlinevirtual
virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec3  
) const
inlinevirtual
virtual bool osgTerrain::Layer::getValue ( unsigned int  ,
unsigned int  ,
osg::Vec4  
) const
inlinevirtual
osgTerrain::Layer::META_Object ( osgTerrain  ,
Layer   
)
void osgTerrain::Layer::setDefaultValue ( const osg::Vec4 value)
inline

Definition at line 88 of file Layer.h.

virtual void osgTerrain::Layer::setFileName ( const std::string &  filename)
inlinevirtual

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

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

Definition at line 54 of file Layer.h.

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

Definition at line 62 of file Layer.h.

void osgTerrain::Layer::setMagFilter ( osg::Texture::FilterMode  filter)
inline

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

Definition at line 100 of file Layer.h.

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

Definition at line 69 of file Layer.h.

void osgTerrain::Layer::setMinFilter ( osg::Texture::FilterMode  filter)
inline

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

Definition at line 93 of file Layer.h.

void osgTerrain::Layer::setMinLevel ( unsigned int  minLevel)
inline

Definition at line 66 of file Layer.h.

virtual void osgTerrain::Layer::setModifiedCount ( unsigned int  )
inlinevirtual

Set the modified count value.

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

Definition at line 277 of file Layer.h.

void osgTerrain::Layer::setSetName ( const std::string &  setname)
inline

Set the name of this layer.

Definition at line 48 of file Layer.h.

void osgTerrain::Layer::setValidDataOperator ( ValidDataOperator validDataOp)
inline

Set the data validation operator.

Definition at line 73 of file Layer.h.

virtual bool osgTerrain::Layer::transform ( float  ,
float   
)
inlinevirtual

Member Data Documentation

osg::Vec4 osgTerrain::Layer::_defaultValue
protected

Definition at line 293 of file Layer.h.

std::string osgTerrain::Layer::_filename
protected

Definition at line 288 of file Layer.h.

osg::ref_ptr<Locator> osgTerrain::Layer::_locator
protected

Definition at line 289 of file Layer.h.

osg::Texture::FilterMode osgTerrain::Layer::_magFilter
protected

Definition at line 295 of file Layer.h.

unsigned int osgTerrain::Layer::_maxLevel
protected

Definition at line 291 of file Layer.h.

osg::Texture::FilterMode osgTerrain::Layer::_minFilter
protected

Definition at line 294 of file Layer.h.

unsigned int osgTerrain::Layer::_minLevel
protected

Definition at line 290 of file Layer.h.

osg::ref_ptr<ValidDataOperator> osgTerrain::Layer::_validDataOperator
protected

Definition at line 292 of file Layer.h.


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