osgEarth 2.1.1
Public Member Functions | Protected Attributes

osgEarth::Symbology::SkinSymbol Class Reference

Inheritance diagram for osgEarth::Symbology::SkinSymbol:
Collaboration diagram for osgEarth::Symbology::SkinSymbol:

List of all members.

Public Member Functions

 SkinSymbol (const Config &conf=Config())
optional< std::string > & libraryName ()
const optional< std::string > & libraryName () const
optional< float > & objectHeight ()
const optional< float > & objectHeight () const
optional< float > & minObjectHeight ()
const optional< float > & minObjectHeight () const
optional< float > & maxObjectHeight ()
const optional< float > & maxObjectHeight () const
optional< bool > & isTiled ()
const optional< bool > & isTiled () const
optional< unsigned > & randomSeed ()
const optional< unsigned > & randomSeed () const
void mergeConfig (const Config &conf)
Config getConfig () const

Protected Attributes

optional< std::string > _libraryName
optional< float > _objHeight
optional< float > _minObjHeight
optional< float > _maxObjHeight
optional< bool > _isTiled
optional< unsigned > _randomSeed

Detailed Description

Query object that you can use to search for applicable Skin resources from the ResourceLibrary.

Definition at line 113 of file Skins.


Constructor & Destructor Documentation

SkinSymbol::SkinSymbol ( const Config conf = Config())

Definition at line 137 of file Skins.cpp.

                                           :
_objHeight    ( 0.0f ),
_minObjHeight ( 0.0f ),
_maxObjHeight ( FLT_MAX ),
_isTiled      ( false ),
_randomSeed   ( 0 )
{
    if ( !conf.empty() )
        mergeConfig( conf );
}

Here is the call graph for this function:


Member Function Documentation

Config SkinSymbol::getConfig ( ) const [virtual]

Reimplemented from osgEarth::Symbology::Symbol.

Definition at line 162 of file Skins.cpp.

{
    Config conf = Symbol::getConfig();
    conf.key() = "skin";

    conf.addIfSet( "library",             _libraryName );
    conf.addIfSet( "object_height",       _objHeight );
    conf.addIfSet( "min_object_height",   _minObjHeight );
    conf.addIfSet( "max_object_height",   _maxObjHeight );
    conf.addIfSet( "tiled",               _isTiled );
    conf.addIfSet( "random_seed",         _randomSeed );

    std::string tagstring = this->tagString();
    if ( !tagstring.empty() )
        conf.attr("tags") = tagstring;

    return conf;
}

Here is the call graph for this function:

const optional<bool>& osgEarth::Symbology::SkinSymbol::isTiled ( ) const [inline]

Definition at line 138 of file Skins.

{ return _isTiled; }
optional<bool>& osgEarth::Symbology::SkinSymbol::isTiled ( ) [inline]

Whether this image is suitable for use as a vertically repeating texture

Definition at line 137 of file Skins.

{ return _isTiled; }

Here is the caller graph for this function:

const optional<std::string>& osgEarth::Symbology::SkinSymbol::libraryName ( ) const [inline]

Definition at line 122 of file Skins.

{ return _libraryName; }
optional<std::string>& osgEarth::Symbology::SkinSymbol::libraryName ( ) [inline]

Name of the resource library to use with this symbol.

Definition at line 121 of file Skins.

{ return _libraryName; }

Here is the caller graph for this function:

const optional<float>& osgEarth::Symbology::SkinSymbol::maxObjectHeight ( ) const [inline]

Definition at line 134 of file Skins.

{ return _minObjHeight; }
optional<float>& osgEarth::Symbology::SkinSymbol::maxObjectHeight ( ) [inline]

Maximum acceptable real-world object height for which this image would make an appropriate texture

Definition at line 133 of file Skins.

{ return _maxObjHeight; }

Here is the caller graph for this function:

void SkinSymbol::mergeConfig ( const Config conf)

Definition at line 149 of file Skins.cpp.

{
    conf.getIfSet( "library",             _libraryName );
    conf.getIfSet( "object_height",       _objHeight );
    conf.getIfSet( "min_object_height",   _minObjHeight );
    conf.getIfSet( "max_object_height",   _maxObjHeight );
    conf.getIfSet( "tiled",               _isTiled );
    conf.getIfSet( "random_seed",         _randomSeed );

    addTags( conf.value("tags" ) );
}

Here is the call graph for this function:

Here is the caller graph for this function:

const optional<float>& osgEarth::Symbology::SkinSymbol::minObjectHeight ( ) const [inline]

Definition at line 130 of file Skins.

{ return _minObjHeight; }
optional<float>& osgEarth::Symbology::SkinSymbol::minObjectHeight ( ) [inline]

Minimum acceptable real-world object height for which this image would make an appropriate texture

Definition at line 129 of file Skins.

{ return _minObjHeight; }

Here is the caller graph for this function:

const optional<float>& osgEarth::Symbology::SkinSymbol::objectHeight ( ) const [inline]

Definition at line 126 of file Skins.

{ return _objHeight; }
optional<float>& osgEarth::Symbology::SkinSymbol::objectHeight ( ) [inline]

Object height in meters (must fall in the skin's min/max object height range to be accepted)

Definition at line 125 of file Skins.

{ return _objHeight; }

Here is the caller graph for this function:

optional<unsigned>& osgEarth::Symbology::SkinSymbol::randomSeed ( ) [inline]

Random number seed value (for picking a candidate)

Definition at line 141 of file Skins.

{ return _randomSeed; }

Here is the caller graph for this function:

const optional<unsigned>& osgEarth::Symbology::SkinSymbol::randomSeed ( ) const [inline]

Definition at line 142 of file Skins.

{ return _randomSeed; }

Member Data Documentation

Definition at line 153 of file Skins.

Definition at line 149 of file Skins.

Definition at line 152 of file Skins.

Definition at line 151 of file Skins.

Definition at line 150 of file Skins.

Definition at line 154 of file Skins.


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