osgEarth 2.1.1
Public Member Functions | Private Attributes

seamless::SeamlessEngineNode Class Reference

Inheritance diagram for seamless::SeamlessEngineNode:
Collaboration diagram for seamless::SeamlessEngineNode:

List of all members.

Public Member Functions

 SeamlessEngineNode ()
 SeamlessEngineNode (const SeamlessEngineNode &rhs, const osg::CopyOp &op=osg::CopyOp::DEEP_COPY_ALL)
 META_Node (osgEarth, SeamlessEngineNode)
 ~SeamlessEngineNode ()
virtual void preInitialize (const osgEarth::Map *map, const osgEarth::TerrainOptions &options)
virtual void validateTerrainOptions (osgEarth::TerrainOptions &options)
virtual const
osgEarth::TerrainOptions
getTerrainOptions () const
void onMapProfileEstablished (const osgEarth::Profile *profile)
void onImageLayerAdded (osgEarth::ImageLayer *, unsigned int index)
void onImageLayerRemoved (osgEarth::ImageLayer *layer, unsigned int index)
void onImageLayerMoved (osgEarth::ImageLayer *layer, unsigned int oldIndex, unsigned int newIndex)
void onElevationLayerAdded (osgEarth::ElevationLayer *, unsigned int index)
void onElevationLayerRemoved (osgEarth::ElevationLayer *layer, unsigned int index)
void onElevationLayerMoved (osgEarth::ElevationLayer *layer, unsigned int oldIndex, unsigned int newIndex)

Private Attributes

osg::ref_ptr< PatchSet_patchSet
osgEarth::Drivers::SeamlessOptions _terrainOptions
osgEarth::MapFrame_mapf

Detailed Description

Definition at line 30 of file SeamlessEngineNode.


Constructor & Destructor Documentation

seamless::SeamlessEngineNode::SeamlessEngineNode ( )

Definition at line 59 of file SeamlessEngineNode.cpp.

    : _mapf(0)
{
}

seamless::SeamlessEngineNode::SeamlessEngineNode ( const SeamlessEngineNode rhs,
const osg::CopyOp &  op = osg::CopyOp::DEEP_COPY_ALL 
)

Definition at line 64 of file SeamlessEngineNode.cpp.

    : TerrainEngineNode(rhs, op),
      _terrainOptions(rhs._terrainOptions), _mapf(0)
{
    _patchSet = static_cast<PatchSet*>(op(rhs._patchSet.get()));
    
}

seamless::SeamlessEngineNode::~SeamlessEngineNode ( )

Definition at line 73 of file SeamlessEngineNode.cpp.

{
    delete _mapf;
}


Member Function Documentation

virtual const osgEarth::TerrainOptions& seamless::SeamlessEngineNode::getTerrainOptions ( ) const [inline, virtual]

Gets the property set in use by this map engine.

Implements osgEarth::TerrainEngineNode.

Definition at line 42 of file SeamlessEngineNode.

    {
        return _terrainOptions;
    }
seamless::SeamlessEngineNode::META_Node ( osgEarth  ,
SeamlessEngineNode   
)
void seamless::SeamlessEngineNode::onElevationLayerAdded ( osgEarth::ElevationLayer layer,
unsigned int  index 
)

Definition at line 125 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onElevationLayerMoved ( osgEarth::ElevationLayer layer,
unsigned int  oldIndex,
unsigned int  newIndex 
)

Definition at line 135 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onElevationLayerRemoved ( osgEarth::ElevationLayer layer,
unsigned int  index 
)

Definition at line 130 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onImageLayerAdded ( osgEarth::ImageLayer ,
unsigned int  index 
)

Definition at line 110 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onImageLayerMoved ( osgEarth::ImageLayer layer,
unsigned int  oldIndex,
unsigned int  newIndex 
)

Definition at line 119 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onImageLayerRemoved ( osgEarth::ImageLayer layer,
unsigned int  index 
)

Definition at line 114 of file SeamlessEngineNode.cpp.

{
}

void seamless::SeamlessEngineNode::onMapProfileEstablished ( const osgEarth::Profile profile)

Definition at line 92 of file SeamlessEngineNode.cpp.

{
    const Map* map = getMap();
    int resolution = _terrainOptions.resolution().value();
    if (map->getMapOptions().coordSysType() == MapOptions::CSTYPE_GEOCENTRIC)
        _patchSet = new Geographic(map, _terrainOptions);
    else if (map->getMapOptions().coordSysType()
             == MapOptions::CSTYPE_PROJECTED)
        _patchSet = new Projected(map, _terrainOptions);
    else
    {
        OE_WARN << "map is not projected\n";
        return;
    }
    addChild(_patchSet
             ->createPatchSetGraph("bar.osgearth_engine_seamless_patch"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void seamless::SeamlessEngineNode::preInitialize ( const osgEarth::Map map,
const osgEarth::TerrainOptions options 
) [virtual]

Attaches a map to the terrain engine and initialized it.

Reimplemented from osgEarth::TerrainEngineNode.

Definition at line 78 of file SeamlessEngineNode.cpp.

{
    TerrainEngineNode::preInitialize(map, options);
    _mapf = new MapFrame(map, Map::TERRAIN_LAYERS, "seamless");
    _terrainOptions.merge(options);
    if (map->getProfile())
        onMapProfileEstablished(map->getProfile());
    map->addMapCallback(new SeamlessMapProxy(this));
}

Here is the call graph for this function:

void seamless::SeamlessEngineNode::validateTerrainOptions ( osgEarth::TerrainOptions options) [virtual]

Reimplemented from osgEarth::TerrainEngineNode.

Definition at line 88 of file SeamlessEngineNode.cpp.

{
}


Member Data Documentation

Definition at line 62 of file SeamlessEngineNode.

Definition at line 60 of file SeamlessEngineNode.

Definition at line 61 of file SeamlessEngineNode.


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