osgTerrain::Terrain Class Reference

Inheritance diagram for osgTerrain::Terrain:

osg::Group osg::Node osg::Object osg::Referenced

List of all members.

Public Types

enum  Filter { NEAREST, LINEAR }

Public Member Functions

 Terrain ()
 Terrain (const Terrain &, const osg::CopyOp &copyop=osg::CopyOp::SHALLOW_COPY)
 META_Node (osgTerrain, Terrain)
virtual void traverse (osg::NodeVisitor &nv)
void init ()
void setTerrainTechnique (osgTerrain::TerrainTechnique *TerrainTechnique)
TerrainTechniquegetTerrainTechnique ()
const TerrainTechniquegetTerrainTechnique () const
void setLocator (Locator *locator)
LocatorgetLocator ()
const LocatorgetLocator () const
void setElevationLayer (Layer *layer)
LayergetElevationLayer ()
const LayergetElevationLayer () const
void setColorLayer (unsigned int i, osgTerrain::Layer *layer)
LayergetColorLayer (unsigned int i)
const LayergetColorLayer (unsigned int i) const
void setColorTransferFunction (unsigned int i, osg::TransferFunction *tf)
osg::TransferFunctiongetColorTransferFunction (unsigned int i)
const osg::TransferFunctiongetColorTransferFunction (unsigned int i) const
void setColorFilter (unsigned int i, Filter filter)
Filter getColorFilter (unsigned int i) const
unsigned int getNumColorLayers () const
void setRequiresNormals (bool flag)
bool getRequiresNormals () const
void setTreatBoundariesToValidDataAsDefaultValue (bool flag)
bool getTreatBoundariesToValidDataAsDefaultValue () const
void setOperationQueue (osg::OperationQueue *operations)
osg::OperationQueuegetOperationQueue ()
const osg::OperationQueuegetOperationsQueue () const
virtual osg::BoundingSphere computeBound () const

Protected Types

typedef std::vector< LayerDataLayers

Protected Member Functions

virtual ~Terrain ()

Protected Attributes

osg::ref_ptr< TerrainTechnique_terrainTechnique
osg::ref_ptr< Locator_locator
osg::ref_ptr< Layer_elevationLayer
Layers _colorLayers
bool _requiresNormals
bool _treatBoundariesToValidDataAsDefaultValue
osg::ref_ptr< osg::OperationQueue_operationQueue

Classes

struct  LayerData


Detailed Description

Terrain provides a framework for loosly coupling height field data with height rendering algorithms. This allows TerrainTechnique's to be pluged in at runtime.

Member Typedef Documentation

typedef std::vector<LayerData> osgTerrain::Terrain::Layers [protected]


Member Enumeration Documentation

enum osgTerrain::Terrain::Filter

Enumerator:
NEAREST 
LINEAR 


Constructor & Destructor Documentation

osgTerrain::Terrain::Terrain (  ) 

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

Copy constructor using CopyOp to manage deep vs shallow copy.

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


Member Function Documentation

osgTerrain::Terrain::META_Node ( osgTerrain  ,
Terrain   
)

virtual void osgTerrain::Terrain::traverse ( osg::NodeVisitor  )  [virtual]

Traverse downwards : calls children's accept method with NodeVisitor.

Reimplemented from osg::Group.

void osgTerrain::Terrain::init (  ) 

Call init on any attached TerrainTechnique.

void osgTerrain::Terrain::setTerrainTechnique ( osgTerrain::TerrainTechnique TerrainTechnique  ) 

Set the TerrainTechnique

TerrainTechnique* osgTerrain::Terrain::getTerrainTechnique (  )  [inline]

Get the TerrainTechnique

const TerrainTechnique* osgTerrain::Terrain::getTerrainTechnique (  )  const [inline]

Get the const TerrainTechnique

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

Set the coordinate frame locator of the terrain node. The locator takes non-dimensional s,t coordinates into the X,Y,Z world coords and back.

Locator* osgTerrain::Terrain::getLocator (  )  [inline]

Get the coordinate frame locator of the terrain node.

const Locator* osgTerrain::Terrain::getLocator (  )  const [inline]

Get the coordinate frame locator of the terrain node.

void osgTerrain::Terrain::setElevationLayer ( Layer layer  ) 

Set the layer to use to define the elevations of the terrain.

Layer* osgTerrain::Terrain::getElevationLayer (  )  [inline]

Get the layer to use to define the elevations of the terrain.

const Layer* osgTerrain::Terrain::getElevationLayer (  )  const [inline]

Get the const layer to use to define the elevations of the terrain.

void osgTerrain::Terrain::setColorLayer ( unsigned int  i,
osgTerrain::Layer layer 
)

Set a color layer with specified layer number.

Layer* osgTerrain::Terrain::getColorLayer ( unsigned int  i  )  [inline]

Get color layer with specified layer number.

const Layer* osgTerrain::Terrain::getColorLayer ( unsigned int  i  )  const [inline]

Set const color layer with specified layer number.

void osgTerrain::Terrain::setColorTransferFunction ( unsigned int  i,
osg::TransferFunction tf 
)

Set a color transfer function with specified layer number.

osg::TransferFunction* osgTerrain::Terrain::getColorTransferFunction ( unsigned int  i  )  [inline]

Get color transfer function with specified layer number.

const osg::TransferFunction* osgTerrain::Terrain::getColorTransferFunction ( unsigned int  i  )  const [inline]

Get const color transfer function with specified layer number.

void osgTerrain::Terrain::setColorFilter ( unsigned int  i,
Filter  filter 
)

Set a color filter with specified layer number.

Filter osgTerrain::Terrain::getColorFilter ( unsigned int  i  )  const [inline]

Set const color filter with specified layer number.

unsigned int osgTerrain::Terrain::getNumColorLayers (  )  const [inline]

Get the number of colour layers.

void osgTerrain::Terrain::setRequiresNormals ( bool  flag  )  [inline]

Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes.

bool osgTerrain::Terrain::getRequiresNormals (  )  const [inline]

Get whether the TerrainTechnique should create per vertex normals for lighting purposes.

void osgTerrain::Terrain::setTreatBoundariesToValidDataAsDefaultValue ( bool  flag  )  [inline]

Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neigbours to valid entries with the default value.

bool osgTerrain::Terrain::getTreatBoundariesToValidDataAsDefaultValue (  )  const [inline]

Get whether the TeatBoundariesToValidDataAsDefaultValue hint.

void osgTerrain::Terrain::setOperationQueue ( osg::OperationQueue operations  )  [inline]

Set an OperationQueue to do an data initialization and update work.

osg::OperationQueue* osgTerrain::Terrain::getOperationQueue (  )  [inline]

Get the OperationsQueue if one is attached, return NULL otherwise.

const osg::OperationQueue* osgTerrain::Terrain::getOperationsQueue (  )  const [inline]

Get the const OperationsQueue if one is attached, return NULL otherwise.

virtual osg::BoundingSphere osgTerrain::Terrain::computeBound (  )  const [virtual]

Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers.

Reimplemented from osg::Group.


Member Data Documentation

osg::ref_ptr<TerrainTechnique> osgTerrain::Terrain::_terrainTechnique [protected]

osg::ref_ptr<Locator> osgTerrain::Terrain::_locator [protected]

osg::ref_ptr<Layer> osgTerrain::Terrain::_elevationLayer [protected]

Layers osgTerrain::Terrain::_colorLayers [protected]

bool osgTerrain::Terrain::_requiresNormals [protected]

bool osgTerrain::Terrain::_treatBoundariesToValidDataAsDefaultValue [protected]

osg::ref_ptr<osg::OperationQueue> osgTerrain::Terrain::_operationQueue [protected]


The documentation for this class was generated from the following file:
Generated on Fri Jan 25 03:47:21 2008 for openscenegraph by  doxygen 1.5.4