VR-Forces 4.6 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
makVrv::DtWindSwitchTickable Class Reference

The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed. More...

Inheritance diagram for makVrv::DtWindSwitchTickable:
Inheritance graph
[legend]

Public Member Functions

 DtWindSwitchTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex)
 CTOR.
virtual ~DtWindSwitchTickable ()
 DTOR.
virtual void update (DtTime tNow)
 Update the switch node based on the wind speed.
virtual bool needsUpdate (DtTime tNow)
 The check function called by DtTickableManager to verify if an update is required.
virtual void configure (osg::Node *n, DtOsgArticulatedModel *osgArticulatedModel, const rapidjson::Value &windJsonData)
 Configure the meta file tickable object.
unsigned int getSwitchIndexForSpeed (double windSpeed)
 Get the switch index based on the wind speed (km/h)
- Public Member Functions inherited from makVrv::DtDynamicFeatureTickable
virtual ~DtDynamicFeatureTickable ()
 DTOR.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.
virtual void setUpdatePeriod (unsigned int period)
 Specify how often (in # of frames) this tickable should call update.
virtual unsigned int updatePeriod () const
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Attributes

static const chartheWindSwitchFeatureName
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheTagWindSpeeds
static const chartheTagSwitchIndices

Protected Attributes

float myLastWindSpeed
 Last update wind speed.
DtDisplayUnitsConvertermyConverter
 To convert the wind speed to display units (km/h)
osgSim::MultiSwitch * myWindSwitchNode
 The actual node that contains switch states.
std::vector< doublemyWindSpeeds
 Windspeeds.
std::vector< intmySwitchIndices
- Protected Attributes inherited from makVrv::DtDynamicFeatureTickable
DtDemyDe
 The display engine.
DtElementID myElementId
 Object element id.
DtUniqueID mySceneObjectId
 To retrieve the scene object if needed.
DtInstanceManagermyInstanceManager
 The instance manager in case we have instancing on.
bool myUseInstancing
 Is instancing enabled?
unsigned int myNodeTypeIndex
 For the node type used in the tickable, the index in the instancing array for that node type (so we update the right one)
DtUniqueID myUniqueId
 For retrieving the instance state from the instance manager.
std::string myFeatureName
 The name of the feature in the .meta file.
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.
DtSignalConnectionManager myConnections
unsigned int myFrameCounter
unsigned int myFrameToUpdate
unsigned int myUpdatePeriod

Additional Inherited Members

- Protected Member Functions inherited from makVrv::DtDynamicFeatureTickable
 DtDynamicFeatureTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex)
 CTOR.

Detailed Description

The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed.

Constructor & Destructor Documentation

makVrv::DtWindSwitchTickable::DtWindSwitchTickable ( DtDe de,
DtElementID  elementId,
DtUniqueID  sceneObjectId,
DtUniqueID  uniqueId,
bool  useInstancing,
unsigned int  nodeTypeIndex 
)

CTOR.

virtual makVrv::DtWindSwitchTickable::~DtWindSwitchTickable ( )
virtual

DTOR.

Member Function Documentation

virtual void makVrv::DtWindSwitchTickable::update ( DtTime  tNow)
virtual

Update the switch node based on the wind speed.

Implements makVrv::DtTickable.

virtual bool makVrv::DtWindSwitchTickable::needsUpdate ( DtTime  tNow)
virtual

The check function called by DtTickableManager to verify if an update is required.

If this function returns true, the DtTickableManager will then call update().

Parameters
[in]tNowis the current time-stamp.
Return values
trueif this object needs to be ticked.
falseotherwise.

Reimplemented from makVrv::DtTickable.

virtual void makVrv::DtWindSwitchTickable::configure ( osg::Node *  n,
DtOsgArticulatedModel osgArticulatedModel,
const rapidjson::Value &  windJsonData 
)
virtual

Configure the meta file tickable object.

unsigned int makVrv::DtWindSwitchTickable::getSwitchIndexForSpeed ( double  windSpeed)

Get the switch index based on the wind speed (km/h)

Member Data Documentation

const char* makVrv::DtWindSwitchTickable::theWindSwitchFeatureName
static

Strings to get the different parts of the meta file Use these instead of hardcoded strings.

const char* makVrv::DtWindSwitchTickable::theTagWindSpeeds
static
const char* makVrv::DtWindSwitchTickable::theTagSwitchIndices
static
float makVrv::DtWindSwitchTickable::myLastWindSpeed
protected

Last update wind speed.

DtDisplayUnitsConverter& makVrv::DtWindSwitchTickable::myConverter
protected

To convert the wind speed to display units (km/h)

osgSim::MultiSwitch* makVrv::DtWindSwitchTickable::myWindSwitchNode
protected

The actual node that contains switch states.

std::vector<double> makVrv::DtWindSwitchTickable::myWindSpeeds
protected

Windspeeds.

std::vector<int> makVrv::DtWindSwitchTickable::mySwitchIndices
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Apr 12 03:15:37 EDT 2018 from SVN revision 187986
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)