Updraft  1.0
Open source glider flight visualisation tool.
Updraft::TPLayer Class Reference

Class storing a turn-points layer. More...

#include <tplayer.h>

Collaboration diagram for Updraft::TPLayer:

List of all members.

Public Member Functions

 TPLayer (bool displayed_, osgEarth::Util::ObjectPlacer *objectPlacer_, const TPFile *file_, TurnPoints *parent_, const QVector< SettingInterface * > &settings)
virtual ~TPLayer ()
osg::Node * getNode () const
osg::Node * getLblNode () const
bool isDisplayed ()
void display (bool displayed_)
 Changes display state.

Private Member Functions

osg::Geometry * createGeometry (qreal scale)
 Creates osg::Geometry for turn-point billboard.
osg::Geode * createGeode (qreal scale, bool isAirfield)
 Creates osg::Geometry for turn-point billboard.
osg::AutoTransform * createAutoTransform (const osg::Matrix &matrix, osg::Geode *geode)
 Creates osg::AutoTransform for turn-point billboard.
osg::Node * createAutoScale (const osg::Vec3 &position, qreal characterSize, const QString &message, qreal minScale=0.0, qreal maxScale=FLT_MAX)
 Autoscale creates the osg::Node Label.

Private Attributes

osg::Group * group
 osg Node representing this turn-points layer
osgEarth::Util::ObjectPlacer * objectPlacer
 osgEarth placer for placing objects to specific geo.coordinates
const TPFilefile
bool displayed
TurnPointsparent
QList< TPMapObject * > mapObjects
qreal labelMinScale
 Text min/max visibility setting.
qreal labelMaxScale
qreal labelDrawDist
 Labels display distance from camera.
qreal lblSize
 Label font size.

Detailed Description

Class storing a turn-points layer.


Constructor & Destructor Documentation

Updraft::TPLayer::TPLayer ( bool  displayed_,
osgEarth::Util::ObjectPlacer *  objectPlacer_,
const TPFile file_,
TurnPoints parent_,
const QVector< SettingInterface * > &  settings 
)

Member Function Documentation

osg::Node * Updraft::TPLayer::createAutoScale ( const osg::Vec3 &  position,
qreal  characterSize,
const QString &  message,
qreal  minScale = 0.0,
qreal  maxScale = FLT_MAX 
) [private]

Autoscale creates the osg::Node Label.

osg::AutoTransform * Updraft::TPLayer::createAutoTransform ( const osg::Matrix &  matrix,
osg::Geode *  geode 
) [private]

Creates osg::AutoTransform for turn-point billboard.

This function is called for each TP.

Parameters:
matrixtransformation of a TP
geodenode used for object visualization
Returns:
A new instance of osg::AutoTransform
osg::Geode * Updraft::TPLayer::createGeode ( qreal  scale,
bool  isAirfield 
) [private]

Creates osg::Geometry for turn-point billboard.

Parameters:
scalerelative size of the node.
isAirfieldWhether the turn-point is an air-field
Returns:
A new instance of osg::Geode
osg::Geometry * Updraft::TPLayer::createGeometry ( qreal  scale) [private]

Creates osg::Geometry for turn-point billboard.

Parameters:
scalerelative size of the node.
Returns:
A new instance of osg::Geometry
void Updraft::TPLayer::display ( bool  displayed_)

Changes display state.

Parameters:
displayed_new value of a display state
osg::Node* Updraft::TPLayer::getLblNode ( ) const
osg::Node * Updraft::TPLayer::getNode ( ) const
Returns:
osgNode associated with the layer.
Returns:
Display state

Member Data Documentation

const TPFile* Updraft::TPLayer::file [private]
osg::Group* Updraft::TPLayer::group [private]

osg Node representing this turn-points layer

Labels display distance from camera.

This value is the distance that LOD starts to display the labels. Reasonable value : 4000 (default)

Text min/max visibility setting.

qreal Updraft::TPLayer::lblSize [private]

Label font size.

osgEarth::Util::ObjectPlacer* Updraft::TPLayer::objectPlacer [private]

osgEarth placer for placing objects to specific geo.coordinates


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