Public Types | |
enum | Filter { NEAREST, LINEAR } |
Public Member Functions | |
Terrain () | |
Terrain (const Terrain &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
Copy constructor using CopyOp to manage deep vs shallow copy. | |
META_Node (osgTerrain, Terrain) | |
virtual void | traverse (osg::NodeVisitor &nv) |
Traverse downwards : calls children's accept method with NodeVisitor. | |
void | init () |
Call init on any attached TerrainTechnique. | |
void | setTerrainTechnique (osgTerrain::TerrainTechnique *TerrainTechnique) |
Set the TerrainTechnique. | |
TerrainTechnique * | getTerrainTechnique () |
Get the TerrainTechnique. | |
const TerrainTechnique * | getTerrainTechnique () const |
Get the const TerrainTechnique. | |
void | setLocator (Locator *locator) |
Set the coordinate frame locator of the terrain node. | |
Locator * | getLocator () |
Get the coordinate frame locator of the terrain node. | |
const Locator * | getLocator () const |
Get the coordinate frame locator of the terrain node. | |
void | setElevationLayer (Layer *layer) |
Set the layer to use to define the elevations of the terrain. | |
Layer * | getElevationLayer () |
Get the layer to use to define the elevations of the terrain. | |
const Layer * | getElevationLayer () const |
Get the const layer to use to define the elevations of the terrain. | |
void | setColorLayer (unsigned int i, osgTerrain::Layer *layer) |
Set a color layer with specified layer number. | |
Layer * | getColorLayer (unsigned int i) |
Get color layer with specified layer number. | |
const Layer * | getColorLayer (unsigned int i) const |
Set const color layer with specified layer number. | |
void | setColorTransferFunction (unsigned int i, osg::TransferFunction *tf) |
Set a color transfer function with specified layer number. | |
osg::TransferFunction * | getColorTransferFunction (unsigned int i) |
Get color transfer function with specified layer number. | |
const osg::TransferFunction * | getColorTransferFunction (unsigned int i) const |
Get const color transfer function with specified layer number. | |
void | setColorFilter (unsigned int i, Filter filter) |
Set a color filter with specified layer number. | |
Filter | getColorFilter (unsigned int i) const |
Set const color filter with specified layer number. | |
unsigned int | getNumColorLayers () const |
Get the number of colour layers. | |
void | setRequiresNormals (bool flag) |
Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes. | |
bool | getRequiresNormals () const |
Get whether the TerrainTechnique should create per vertex normals for lighting purposes. | |
void | setTreatBoundariesToValidDataAsDefaultValue (bool flag) |
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 | getTreatBoundariesToValidDataAsDefaultValue () const |
Get whether the TeatBoundariesToValidDataAsDefaultValue hint. | |
void | setOperationQueue (osg::OperationQueue *operations) |
Set an OperationQueue to do an data initialization and update work. | |
osg::OperationQueue * | getOperationQueue () |
Get the OperationsQueue if one is attached, return NULL otherwise. | |
const osg::OperationQueue * | getOperationsQueue () const |
Get the const OperationsQueue if one is attached, return NULL otherwise. | |
virtual osg::BoundingSphere | computeBound () const |
Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers. | |
Protected Types | |
typedef std::vector < LayerData > | Layers |
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 |
This allows TerrainTechnique's to be pluged in at runtime.
typedef std::vector<LayerData> osgTerrain::Terrain::Layers [protected] |
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] |
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.
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] |