osgEarth 2.1.1
Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends

CustomTile Class Reference

Collaboration diagram for CustomTile:

List of all members.

Public Member Functions

 CustomTile (const TileKey &key, GeoLocator *keyLocator, bool quickReleaseGLObjects)
virtual const char * libraryName () const
virtual const char * className () const
const TileKeygetKey () const
void setUseLayerRequests (bool)
bool getUseLayerRequests () const
void setUsePerLayerUpdates (bool)
int getTerrainRevision () const
void setTerrainRevision (int revision)
bool isInSyncWithTerrain () const
void incrementTileRevision ()
int getTileRevision () const
void servicePendingImageRequests (const MapFrame &mapf, int stamp)
void servicePendingElevationRequests (const MapFrame &mapf, int stamp, bool tileTableLocked)
bool serviceCompletedRequests (const MapFrame &mapf, bool tileTableLocked)
void setHasElevationHint (bool hasElevation)
bool isElevationLayerUpToDate () const
int getElevationLOD () const
void setElevationLOD (int lod)
class CustomTerraingetCustomTerrain ()
class CustomTerraingetCustomTerrain () const
osg::Vec3dArray * getTerrainMaskGeometry ()
void setTerrainMaskGeometry (osg::Vec3dArray *terrainMask)
bool getHasBeenTraversed () const
Threading::ReadWriteMutexgetTileLayersMutex ()
bool cancelRequests ()
void updateImagery (ImageLayer *layer, const MapFrame &mapf, OSGTileFactory *factory)
bool getUseTileGenRequest () const
RelativegetFamily ()
void queueTileUpdate (TileUpdate::Action action, int index=-1)
void applyImmediateTileUpdate (TileUpdate::Action action, int index=-1)
void resetElevationRequests (const MapFrame &mapf)
float getVerticalScale () const
void setVerticalScale (float verticalScale)
void removeCustomColorLayer (UID layerUID, bool writeLock=true)
bool getCustomColorLayer (UID layerUID, CustomColorLayer &output, bool readLock=true) const
void getCustomColorLayers (ColorLayersByUID &out, bool readLock=true) const
void setCustomColorLayers (const ColorLayersByUID &in, bool writeLock=true)
void setCustomColorLayer (const CustomColorLayer &colorLayer, bool writeLock=true)
virtual void traverse (class osg::NodeVisitor &nv)
virtual void releaseGLObjects (osg::State *=0) const
virtual osg::BoundingSphere computeBound () const

Protected Member Functions

 ~CustomTile ()

Private Types

typedef std::queue< TileUpdateTileUpdateQueue

Private Member Functions

void installRequests (const MapFrame &mapf, int stamp)
bool readyForNewElevation ()
bool readyForNewImagery (osgEarth::ImageLayer *layer, int currentLOD)

Private Attributes

int _terrainRevision
int _tileRevision
bool _useLayerRequests
bool _requestsInstalled
bool _usePerLayerUpdates
bool _hasElevation
bool _elevationLayerDirty
bool _colorLayersDirty
bool _elevationLayerRequested
bool _elevationLayerUpToDate
int _elevationLOD
bool _hasBeenTraversed
bool _useTileGenRequest
bool _sequentialImagery
bool _quickReleaseGLObjects
TileUpdateQueue _tileUpdates
TileKey _key
osg::ref_ptr< GeoLocator_keyLocator
TaskRequestList _requests
osg::ref_ptr< TaskRequest_elevRequest
osg::ref_ptr< TaskRequest_elevPlaceholderRequest
osg::ref_ptr< TaskRequest_tileGenRequest
osg::observer_ptr
< osgTerrain::Terrain > 
_CustomTerrain
osg::ref_ptr< osg::Vec3dArray > _mask
Relative _family [5]
Threading::ReadWriteMutex _tileLayersMutex
float _verticalScale
ColorLayersByUID _colorLayers

Friends

class CustomTileFrame

Detailed Description

Definition at line 105 of file CustomTile.


Member Typedef Documentation

typedef std::queue<TileUpdate> CustomTile::TileUpdateQueue [private]

Definition at line 243 of file CustomTile.


Constructor & Destructor Documentation

CustomTile::CustomTile ( const TileKey key,
GeoLocator keyLocator,
bool  quickReleaseGLObjects 
)
CustomTile::~CustomTile ( ) [protected]

Member Function Documentation

void CustomTile::applyImmediateTileUpdate ( TileUpdate::Action  action,
int  index = -1 
)
bool CustomTile::cancelRequests ( )
virtual const char* CustomTile::className ( ) const [inline, virtual]

Definition at line 111 of file CustomTile.

{ return "CustomTile"; }
virtual osg::BoundingSphere CustomTile::computeBound ( ) const [virtual]
bool CustomTile::getCustomColorLayer ( UID  layerUID,
CustomColorLayer output,
bool  readLock = true 
) const
void CustomTile::getCustomColorLayers ( ColorLayersByUID out,
bool  readLock = true 
) const
class CustomTerrain* CustomTile::getCustomTerrain ( )

Gets the terrain object to which this tile belongs.

class CustomTerrain* CustomTile::getCustomTerrain ( ) const
int CustomTile::getElevationLOD ( ) const

Gets or sets the LOD of this tile's current heightfield data.

Relative* CustomTile::getFamily ( ) [inline]

Definition at line 188 of file CustomTile.

{ return _family; }
bool CustomTile::getHasBeenTraversed ( ) const
const TileKey& CustomTile::getKey ( ) const

Gets the tilekey associated with this tile.

osg::Vec3dArray* CustomTile::getTerrainMaskGeometry ( ) [inline]

Gets or sets the terrain mask geometry.

Definition at line 175 of file CustomTile.

{ return _mask.get(); }

Here is the caller graph for this function:

int CustomTile::getTerrainRevision ( ) const

Gets the terrain revision that this tile is in sync with.

Threading::ReadWriteMutex& CustomTile::getTileLayersMutex ( )
int CustomTile::getTileRevision ( ) const

Gets this tile's revision number.

bool CustomTile::getUseLayerRequests ( ) const [inline]

Definition at line 121 of file CustomTile.

{ return _useLayerRequests; }
bool CustomTile::getUseTileGenRequest ( ) const
float CustomTile::getVerticalScale ( ) const
void CustomTile::incrementTileRevision ( )

Bumps this tile's revision number.

void CustomTile::installRequests ( const MapFrame mapf,
int  stamp 
) [private]

Deals with completed requests during the UPDATE traversal.

bool CustomTile::isElevationLayerUpToDate ( ) const

Gets whether the tile's real (not placeholder) elevation data has been loaded.

bool CustomTile::isInSyncWithTerrain ( ) const

Returns true if this tile is in sync with its parent Terrain (i.e., their version numbers are equal).

virtual const char* CustomTile::libraryName ( ) const [inline, virtual]

Definition at line 110 of file CustomTile.

{ return "osgEarth"; }
void CustomTile::queueTileUpdate ( TileUpdate::Action  action,
int  index = -1 
)
bool CustomTile::readyForNewElevation ( ) [private]
bool CustomTile::readyForNewImagery ( osgEarth::ImageLayer layer,
int  currentLOD 
) [private]
virtual void CustomTile::releaseGLObjects ( osg::State *  = 0) const [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.

void CustomTile::removeCustomColorLayer ( UID  layerUID,
bool  writeLock = true 
)
void CustomTile::resetElevationRequests ( const MapFrame mapf)
bool CustomTile::serviceCompletedRequests ( const MapFrame mapf,
bool  tileTableLocked 
)
void CustomTile::servicePendingElevationRequests ( const MapFrame mapf,
int  stamp,
bool  tileTableLocked 
)
void CustomTile::servicePendingImageRequests ( const MapFrame mapf,
int  stamp 
)

Updates and services this tile's service pending requests.

void CustomTile::setCustomColorLayer ( const CustomColorLayer colorLayer,
bool  writeLock = true 
)
void CustomTile::setCustomColorLayers ( const ColorLayersByUID in,
bool  writeLock = true 
)
void CustomTile::setElevationLOD ( int  lod)
void CustomTile::setHasElevationHint ( bool  hasElevation)

Setting this hint tells the tile whether it should bother trying to load elevation data.

void CustomTile::setTerrainMaskGeometry ( osg::Vec3dArray *  terrainMask) [inline]

Definition at line 176 of file CustomTile.

{ _mask = terrainMask; }
void CustomTile::setTerrainRevision ( int  revision)

Sets the terrain revision that this tile is in sync with.

void CustomTile::setUseLayerRequests ( bool  )

Gets the locator associated with this tile. Sets whether to use the TaskService to schedule per-layer background data loading.

void CustomTile::setUsePerLayerUpdates ( bool  )

Sets whether to update the tile layer by layer vs. rebuidling the entire tile.

void CustomTile::setVerticalScale ( float  verticalScale)
virtual void CustomTile::traverse ( class osg::NodeVisitor &  nv) [virtual]
void CustomTile::updateImagery ( ImageLayer layer,
const MapFrame mapf,
OSGTileFactory factory 
)

Friends And Related Function Documentation

friend class CustomTileFrame [friend]

Definition at line 270 of file CustomTile.


Member Data Documentation

Definition at line 267 of file CustomTile.

Definition at line 234 of file CustomTile.

osg::observer_ptr<osgTerrain::Terrain> CustomTile::_CustomTerrain [private]

Definition at line 253 of file CustomTile.

Definition at line 233 of file CustomTile.

Definition at line 235 of file CustomTile.

Definition at line 236 of file CustomTile.

Definition at line 237 of file CustomTile.

Definition at line 250 of file CustomTile.

osg::ref_ptr<TaskRequest> CustomTile::_elevRequest [private]

Definition at line 249 of file CustomTile.

Definition at line 257 of file CustomTile.

Definition at line 238 of file CustomTile.

bool CustomTile::_hasElevation [private]

Definition at line 232 of file CustomTile.

Definition at line 246 of file CustomTile.

osg::ref_ptr<GeoLocator> CustomTile::_keyLocator [private]

Definition at line 247 of file CustomTile.

osg::ref_ptr<osg::Vec3dArray> CustomTile::_mask [private]

Definition at line 255 of file CustomTile.

Definition at line 241 of file CustomTile.

Definition at line 248 of file CustomTile.

Definition at line 230 of file CustomTile.

Definition at line 240 of file CustomTile.

Definition at line 227 of file CustomTile.

osg::ref_ptr<TaskRequest> CustomTile::_tileGenRequest [private]

Definition at line 251 of file CustomTile.

Definition at line 258 of file CustomTile.

Definition at line 228 of file CustomTile.

Definition at line 244 of file CustomTile.

Definition at line 229 of file CustomTile.

Definition at line 231 of file CustomTile.

Definition at line 239 of file CustomTile.

float CustomTile::_verticalScale [private]

Definition at line 265 of file CustomTile.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines