OSG
3.4.0
|
#include <TerrainTile.h>
Classes | |
struct | TileLoadedCallback |
Public Types | |
enum | BlendingPolicy { INHERIT, DO_NOT_SET_BLENDING, ENABLE_BLENDING, ENABLE_BLENDING_WHEN_ALPHA_PRESENT } |
enum | DirtyMask { NOT_DIRTY = 0, IMAGERY_DIRTY = 1<<0, ELEVATION_DIRTY = 1<<1, LEFT_EDGE_DIRTY = 1<<2, RIGHT_EDGE_DIRTY = 1<<3, TOP_EDGE_DIRTY = 1<<4, TOP_LEFT_CORNER_DIRTY = 1<<5, TOP_RIGHT_CORNER_DIRTY = 1<<6, BOTTOM_EDGE_DIRTY = 1<<7, BOTTOM_LEFT_CORNER_DIRTY = 1<<8, BOTTOM_RIGHT_CORNER_DIRTY = 1<<9, EDGES_DIRTY, ALL_DIRTY = IMAGERY_DIRTY | ELEVATION_DIRTY | EDGES_DIRTY } |
![]() | |
typedef std::vector< Group * > | ParentList |
typedef unsigned int | NodeMask |
typedef std::vector< std::string > | DescriptionList |
![]() | |
enum | DataVariance { DYNAMIC, STATIC, UNSPECIFIED } |
Public Member Functions | |
TerrainTile () | |
TerrainTile (const TerrainTile &, const osg::CopyOp ©op=osg::CopyOp::SHALLOW_COPY) | |
META_Node (osgTerrain, TerrainTile) | |
virtual void | traverse (osg::NodeVisitor &nv) |
void | init (int dirtyMask, bool assumeMultiThreaded) |
void | setTerrain (Terrain *ts) |
Terrain * | getTerrain () |
const Terrain * | getTerrain () const |
void | setTileID (const TileID &tileID) |
const TileID & | getTileID () const |
void | setTerrainTechnique (TerrainTechnique *terrainTechnique) |
TerrainTechnique * | getTerrainTechnique () |
const TerrainTechnique * | getTerrainTechnique () const |
void | setLocator (Locator *locator) |
Locator * | getLocator () |
const Locator * | getLocator () const |
void | setElevationLayer (Layer *layer) |
Layer * | getElevationLayer () |
const Layer * | getElevationLayer () const |
void | setColorLayer (unsigned int i, Layer *layer) |
Layer * | getColorLayer (unsigned int i) |
const Layer * | getColorLayer (unsigned int i) const |
unsigned int | getNumColorLayers () const |
void | setRequiresNormals (bool flag) |
bool | getRequiresNormals () const |
void | setTreatBoundariesToValidDataAsDefaultValue (bool flag) |
bool | getTreatBoundariesToValidDataAsDefaultValue () const |
void | setBlendingPolicy (BlendingPolicy policy) |
BlendingPolicy | getBlendingPolicy () const |
void | setDirty (bool dirty) |
int | getDirty () const |
void | setDirtyMask (int dirtyMask) |
int | getDirtyMask () const |
virtual osg::BoundingSphere | computeBound () const |
virtual void | releaseGLObjects (osg::State *=0) const |
![]() | |
Group () | |
Group (const Group &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
META_Node (osg, Group) | |
virtual Group * | asGroup () |
virtual const Group * | asGroup () const |
virtual bool | addChild (Node *child) |
virtual bool | insertChild (unsigned int index, Node *child) |
virtual bool | removeChild (Node *child) |
bool | removeChild (unsigned int pos, unsigned int numChildrenToRemove=1) |
virtual bool | removeChildren (unsigned int pos, unsigned int numChildrenToRemove) |
virtual bool | replaceChild (Node *origChild, Node *newChild) |
virtual unsigned int | getNumChildren () const |
virtual bool | setChild (unsigned int i, Node *node) |
Node * | getChild (unsigned int i) |
const Node * | getChild (unsigned int i) const |
bool | containsNode (const Node *node) const |
unsigned int | getChildIndex (const Node *node) const |
virtual void | setThreadSafeRefUnref (bool threadSafe) |
virtual void | resizeGLObjectBuffers (unsigned int maxSize) |
![]() | |
Node () | |
Node (const Node &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
virtual Object * | cloneType () const |
virtual Object * | clone (const CopyOp ©op) const |
virtual bool | isSameKindAs (const Object *obj) const |
virtual const char * | libraryName () const |
virtual const char * | className () const |
virtual Node * | asNode () |
virtual const Node * | asNode () const |
virtual Drawable * | asDrawable () |
virtual const Drawable * | asDrawable () const |
virtual Geometry * | asGeometry () |
virtual const Geometry * | asGeometry () const |
virtual Transform * | asTransform () |
virtual const Transform * | asTransform () const |
virtual Camera * | asCamera () |
virtual const Camera * | asCamera () const |
virtual Switch * | asSwitch () |
virtual const Switch * | asSwitch () const |
virtual Geode * | asGeode () |
virtual const Geode * | asGeode () const |
virtual osgTerrain::Terrain * | asTerrain () |
virtual const osgTerrain::Terrain * | asTerrain () const |
virtual void | accept (NodeVisitor &nv) |
virtual void | ascend (NodeVisitor &nv) |
const ParentList & | getParents () const |
ParentList | getParents () |
Group * | getParent (unsigned int i) |
const Group * | getParent (unsigned int i) const |
unsigned int | getNumParents () const |
NodePathList | getParentalNodePaths (osg::Node *haltTraversalAtNode=0) const |
MatrixList | getWorldMatrices (const osg::Node *haltTraversalAtNode=0) const |
void | setUpdateCallback (Callback *nc) |
Callback * | getUpdateCallback () |
const Callback * | getUpdateCallback () const |
void | addUpdateCallback (Callback *nc) |
void | removeUpdateCallback (Callback *nc) |
unsigned int | getNumChildrenRequiringUpdateTraversal () const |
void | setEventCallback (Callback *nc) |
Callback * | getEventCallback () |
const Callback * | getEventCallback () const |
void | addEventCallback (Callback *nc) |
void | removeEventCallback (Callback *nc) |
unsigned int | getNumChildrenRequiringEventTraversal () const |
void | setCullCallback (Callback *nc) |
Callback * | getCullCallback () |
const Callback * | getCullCallback () const |
void | addCullCallback (Callback *nc) |
void | removeCullCallback (Callback *nc) |
void | setCullingActive (bool active) |
bool | getCullingActive () const |
unsigned int | getNumChildrenWithCullingDisabled () const |
bool | isCullingActive () const |
unsigned int | getNumChildrenWithOccluderNodes () const |
bool | containsOccluderNodes () const |
void | setNodeMask (NodeMask nm) |
NodeMask | getNodeMask () const |
void | setStateSet (osg::StateSet *stateset) |
osg::StateSet * | getOrCreateStateSet () |
osg::StateSet * | getStateSet () |
const osg::StateSet * | getStateSet () const |
void | setDescriptions (const DescriptionList &descriptions) |
DescriptionList & | getDescriptions () |
const DescriptionList & | getDescriptions () const |
const std::string & | getDescription (unsigned int i) const |
std::string & | getDescription (unsigned int i) |
unsigned int | getNumDescriptions () const |
void | addDescription (const std::string &desc) |
void | setInitialBound (const osg::BoundingSphere &bsphere) |
const BoundingSphere & | getInitialBound () const |
void | dirtyBound () |
const BoundingSphere & | getBound () const |
void | setComputeBoundingSphereCallback (ComputeBoundingSphereCallback *callback) |
ComputeBoundingSphereCallback * | getComputeBoundingSphereCallback () |
const ComputeBoundingSphereCallback * | getComputeBoundingSphereCallback () const |
![]() | |
Object () | |
Object (bool threadSafeRefUnref) | |
Object (const Object &, const CopyOp ©op=CopyOp::SHALLOW_COPY) | |
std::string | getCompoundClassName () const |
virtual NodeVisitor * | asNodeVisitor () |
virtual const NodeVisitor * | asNodeVisitor () const |
virtual StateAttribute * | asStateAttribute () |
virtual const StateAttribute * | asStateAttribute () const |
virtual Uniform * | asUniform () |
virtual const Uniform * | asUniform () const |
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::UserDataContainer * | getUserDataContainer () |
const osg::UserDataContainer * | getUserDataContainer () const |
osg::UserDataContainer * | getOrCreateUserDataContainer () |
virtual void | setUserData (Referenced *obj) |
virtual Referenced * | getUserData () |
virtual const Referenced * | getUserData () 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) |
template<typename T > | |
BoolValueObject UCharValueObject UShortValueObject UIntValueObject DoubleValueObject Vec3fValueObject Vec2dValueObject Vec4dValueObject PlaneValueObject MatrixdValueObject BoundingBoxdValueObject BoundingSpheredValueObject bool | getUserValue (const std::string &name, T &value) const |
![]() | |
Referenced () | |
Referenced (bool threadSafeRefUnref) | |
Referenced (const Referenced &) | |
Referenced & | operator= (const Referenced &) |
bool | getThreadSafeRefUnref () const |
OpenThreads::Mutex * | getRefMutex () const |
int | ref () const |
int | unref () const |
int | unref_nodelete () const |
int | referenceCount () const |
ObserverSet * | getObserverSet () const |
ObserverSet * | getOrCreateObserverSet () const |
void | addObserver (Observer *observer) const |
void | removeObserver (Observer *observer) const |
Static Public Member Functions | |
static void | setTileLoadedCallback (TileLoadedCallback *lc) |
static osg::ref_ptr < TileLoadedCallback > & | getTileLoadedCallback () |
![]() | |
static OpenThreads::Mutex * | getGlobalReferencedMutex () |
static void | setThreadSafeReferenceCounting (bool enableThreadSafeReferenceCounting) |
static bool | getThreadSafeReferenceCounting () |
static void | setDeleteHandler (DeleteHandler *handler) |
static DeleteHandler * | getDeleteHandler () |
Protected Types | |
typedef std::vector < osg::ref_ptr< Layer > > | Layers |
Protected Member Functions | |
virtual | ~TerrainTile () |
![]() | |
virtual | ~Group () |
virtual void | childRemoved (unsigned int, unsigned int) |
virtual void | childInserted (unsigned int) |
![]() | |
virtual | ~Node () |
void | addParent (osg::Group *parent) |
void | removeParent (osg::Group *parent) |
void | setNumChildrenRequiringUpdateTraversal (unsigned int num) |
void | setNumChildrenRequiringEventTraversal (unsigned int num) |
void | setNumChildrenWithCullingDisabled (unsigned int num) |
void | setNumChildrenWithOccluderNodes (unsigned int num) |
![]() | |
virtual | ~Object () |
![]() | |
virtual | ~Referenced () |
void | signalObserversAndDelete (bool signalDelete, bool doDelete) const |
void | deleteUsingDeleteHandler () const |
Friends | |
class | Terrain |
Terrain provides a framework for loosely coupling height field data with height rendering algorithms. This allows TerrainTechnique's to be plugged in at runtime.
Definition at line 67 of file TerrainTile.h.
|
protected |
Definition at line 229 of file TerrainTile.h.
Enumerator | |
---|---|
INHERIT | |
DO_NOT_SET_BLENDING |
Default - check for the any BlendingPolicy set on the enclosing osgTerrain::Terrain node, and if it's also INHERIT then assume ENABLE_BLENDING_WHEN_ALPHA_PRESENT. |
ENABLE_BLENDING | |
ENABLE_BLENDING_WHEN_ALPHA_PRESENT |
check colour layers for alpha value and if present enable blending. |
Definition at line 159 of file TerrainTile.h.
Definition at line 174 of file TerrainTile.h.
osgTerrain::TerrainTile::TerrainTile | ( | ) |
osgTerrain::TerrainTile::TerrainTile | ( | const TerrainTile & | , |
const osg::CopyOp & | copyop = osg::CopyOp::SHALLOW_COPY |
||
) |
Copy constructor using CopyOp to manage deep vs shallow copy.
|
protectedvirtual |
|
virtual |
Compute the bounding volume of the terrain by computing the union of the bounding volumes of all layers.
Reimplemented from osg::Group.
|
inline |
Get the policy to use when deciding whether to enable/disable blending and use of transparent bin.
Definition at line 171 of file TerrainTile.h.
|
inline |
Get color layer with specified layer number.
Definition at line 136 of file TerrainTile.h.
|
inline |
Set const color layer with specified layer number.
Definition at line 139 of file TerrainTile.h.
|
inline |
return true if the any of the DirtyMask are set.
Definition at line 196 of file TerrainTile.h.
|
inline |
return true if the tile is dirty and needs to be updated,
Definition at line 203 of file TerrainTile.h.
|
inline |
Get the layer to use to define the elevations of the terrain.
Definition at line 126 of file TerrainTile.h.
|
inline |
Get the const layer to use to define the elevations of the terrain.
Definition at line 129 of file TerrainTile.h.
|
inline |
Get the coordinate frame locator of the terrain node.
Definition at line 117 of file TerrainTile.h.
|
inline |
Get the const coordinate frame locator of the terrain node.
Definition at line 120 of file TerrainTile.h.
|
inline |
Get the number of colour layers.
Definition at line 142 of file TerrainTile.h.
|
inline |
Get whether the TerrainTechnique should create per vertex normals for lighting purposes.
Definition at line 149 of file TerrainTile.h.
|
inline |
Get the Terrain that this Terrain tile is a member of.
Definition at line 87 of file TerrainTile.h.
|
inline |
Get the const Terrain that this Terrain tile is a member of.
Definition at line 90 of file TerrainTile.h.
|
inline |
Get the TerrainTechnique
Definition at line 106 of file TerrainTile.h.
|
inline |
Get the const TerrainTechnique
Definition at line 109 of file TerrainTile.h.
|
inline |
Get the TileID (layer, x,y) of the TerrainTile.
Definition at line 99 of file TerrainTile.h.
|
static |
|
inline |
Get whether the TeatBoundariesToValidDataAsDefaultValue hint.
Definition at line 156 of file TerrainTile.h.
void osgTerrain::TerrainTile::init | ( | int | dirtyMask, |
bool | assumeMultiThreaded | ||
) |
Call init on any attached TerrainTechnique.
osgTerrain::TerrainTile::META_Node | ( | osgTerrain | , |
TerrainTile | |||
) |
|
virtual |
If State is non-zero, this function releases any associated OpenGL objects for the specified graphics context. Otherwise, releases OpenGL objects for all graphics contexts.
Reimplemented from osg::Group.
|
inline |
Set the policy to use when deciding whether to enable/disable blending and use of transparent bin.
Definition at line 168 of file TerrainTile.h.
void osgTerrain::TerrainTile::setColorLayer | ( | unsigned int | i, |
Layer * | layer | ||
) |
Set a color layer with specified layer number.
|
inline |
Set the dirty flag on/off.
Definition at line 193 of file TerrainTile.h.
void osgTerrain::TerrainTile::setDirtyMask | ( | int | dirtyMask | ) |
Set the dirty flag on/off.
void osgTerrain::TerrainTile::setElevationLayer | ( | Layer * | layer | ) |
Set the layer to use to define the elevations of the terrain.
|
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.
Definition at line 114 of file TerrainTile.h.
|
inline |
Set hint to whether the TerrainTechnique should create per vertex normals for lighting purposes.
Definition at line 146 of file TerrainTile.h.
void osgTerrain::TerrainTile::setTerrain | ( | Terrain * | ts | ) |
void osgTerrain::TerrainTile::setTerrainTechnique | ( | TerrainTechnique * | terrainTechnique | ) |
Set the TerrainTechnique
void osgTerrain::TerrainTile::setTileID | ( | const TileID & | tileID | ) |
Set the TileID (layer, x,y) of the TerrainTile. The TileID is used so it can be located by its neighbours via the enclosing Terrain node that manages a map of TileID to TerraiTiles.
|
static |
|
inline |
Set the hint to whether the TerrainTechnique should treat the invalid Layer entries that at are neighbours to valid entries with the default value.
Definition at line 153 of file TerrainTile.h.
|
virtual |
Traverse downwards : calls children's accept method with NodeVisitor.
Reimplemented from osg::Group.
|
friend |
Definition at line 231 of file TerrainTile.h.
|
protected |
Definition at line 249 of file TerrainTile.h.
|
protected |
Definition at line 245 of file TerrainTile.h.
|
protected |
Definition at line 235 of file TerrainTile.h.
|
protected |
Definition at line 243 of file TerrainTile.h.
|
protected |
Definition at line 236 of file TerrainTile.h.
|
protected |
Definition at line 241 of file TerrainTile.h.
|
protected |
Definition at line 247 of file TerrainTile.h.
|
protected |
Definition at line 233 of file TerrainTile.h.
|
protected |
Definition at line 240 of file TerrainTile.h.
|
protected |
Definition at line 238 of file TerrainTile.h.
|
protected |
Definition at line 248 of file TerrainTile.h.