|
osgEarth 2.1.1
|
Inheritance diagram for osgEarth::MaskLayer:
Collaboration diagram for osgEarth::MaskLayer:Public Member Functions | |
| MaskLayer (const MaskLayerOptions &options=MaskLayerOptions()) | |
| MaskLayer (const std::string &name, const MaskSourceOptions &options) | |
| MaskLayer (const MaskLayerOptions &options, MaskSource *source) | |
| MaskSource * | getMaskSource () const |
| osg::Vec3dArray * | getOrCreateBoundary (float heightScale=1.0, const SpatialReference *srs=NULL, ProgressCallback *progress=0L) |
| void | initialize (const std::string &referenceURI, const Map *map) |
Private Member Functions | |
| void | copyOptions () |
Private Attributes | |
| std::string | _referenceURI |
| MaskLayerOptions | _initOptions |
| MaskLayerOptions | _runtimeOptions |
| osg::ref_ptr< MaskSource > | _maskSource |
| Revision | _maskSourceRev |
| osg::ref_ptr< osg::Vec3dArray > | _boundary |
A MaskLayer is a specialized layer used to mask out a part of the terrain. Typically you would use this if you had a pre-built 3D terrain model for an inset area.
| MaskLayer::MaskLayer | ( | const MaskLayerOptions & | options = MaskLayerOptions() | ) |
Constructs a new mask layer based on a configuration setup.
Definition at line 74 of file MaskLayer.cpp.
: _initOptions( options ) { copyOptions(); }
Here is the call graph for this function:| MaskLayer::MaskLayer | ( | const std::string & | name, |
| const MaskSourceOptions & | options | ||
| ) |
Constructs a new mask layer with a user-provided driver options.
Definition at line 80 of file MaskLayer.cpp.
: _initOptions( MaskLayerOptions( name, options ) ) { copyOptions(); }
Here is the call graph for this function:| MaskLayer::MaskLayer | ( | const MaskLayerOptions & | options, |
| MaskSource * | source | ||
| ) |
Constructs a new mask layer with a user-provided mask source.
Definition at line 86 of file MaskLayer.cpp.
: _maskSource( source ), _initOptions( options ) { copyOptions(); }
Here is the call graph for this function:| void MaskLayer::copyOptions | ( | ) | [private] |
Definition at line 94 of file MaskLayer.cpp.
{
_runtimeOptions = _initOptions;
}
Here is the caller graph for this function:| MaskSource* osgEarth::MaskLayer::getMaskSource | ( | ) | const [inline] |
Access the underlying mask source.
Definition at line 92 of file MaskLayer.
{ return _maskSource.get(); }
| osg::Vec3dArray * MaskLayer::getOrCreateBoundary | ( | float | heightScale = 1.0, |
| const SpatialReference * | srs = NULL, |
||
| ProgressCallback * | progress = 0L |
||
| ) |
Gets the geometric boundary polygon representing the area of the terrain to mask out.
Definition at line 116 of file MaskLayer.cpp.
{
if ( _maskSource.valid() )
{
// if the model source has changed, regenerate the node.
if ( _boundary.valid() && !_maskSource->inSyncWith(_maskSourceRev) )
{
_boundary = 0L;
}
if ( !_boundary.valid() )
{
_boundary = _maskSource->createBoundary( srs, progress );
for (osg::Vec3dArray::iterator vIt = _boundary->begin(); vIt != _boundary->end(); ++vIt)
vIt->z() = vIt->z() * heightScale;
_maskSource->sync( _maskSourceRev );
}
}
return _boundary.get();
}
| void MaskLayer::initialize | ( | const std::string & | referenceURI, |
| const Map * | map | ||
| ) |
Definition at line 100 of file MaskLayer.cpp.
{
_referenceURI = referenceURI;
if ( !_maskSource.valid() && _initOptions.driver().isSet() )
{
_maskSource = MaskSourceFactory::create( *_initOptions.driver() );
}
if ( _maskSource.valid() )
{
_maskSource->initialize( _referenceURI, map );
}
}
Here is the call graph for this function:
Here is the caller graph for this function:osg::ref_ptr<osg::Vec3dArray> osgEarth::MaskLayer::_boundary [private] |
osg::ref_ptr<MaskSource> osgEarth::MaskLayer::_maskSource [private] |
Revision osgEarth::MaskLayer::_maskSourceRev [private] |
std::string osgEarth::MaskLayer::_referenceURI [private] |
1.7.3