![]() |
VR-Forces 4.5 Class Documentation
|
The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed. More...

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 char * | theWindSwitchFeatureName |
| Strings to get the different parts of the meta file Use these instead of hardcoded strings. | |
| static const char * | theTagWindSpeeds |
| static const char * | theTagSwitchIndices |
Protected Attributes | |
| float | myLastWindSpeed |
| Last update wind speed. | |
| DtDisplayUnitsConverter & | myConverter |
| To convert the wind speed to display units (km/h) | |
| osgSim::MultiSwitch * | myWindSwitchNode |
| The actual node that contains switch states. | |
| std::vector< double > | myWindSpeeds |
| Windspeeds. | |
| std::vector< int > | mySwitchIndices |
Protected Attributes inherited from makVrv::DtDynamicFeatureTickable | |
| DtDe & | myDe |
| The display engine. | |
| DtElementID | myElementId |
| Object element id. | |
| DtUniqueID | mySceneObjectId |
| To retrieve the scene object if needed. | |
| DtInstanceManager & | myInstanceManager |
| 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 | |
| DtTickableManagerInterface * | myManager |
| 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. | |
The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed.
| makVrv::DtWindSwitchTickable::DtWindSwitchTickable | ( | DtDe & | de, |
| DtElementID | elementId, | ||
| DtUniqueID | sceneObjectId, | ||
| DtUniqueID | uniqueId, | ||
| bool | useInstancing, | ||
| unsigned int | nodeTypeIndex | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Update the switch node based on the wind speed.
Implements makVrv::DtTickable.
The check function called by DtTickableManager to verify if an update is required.
If this function returns true, the DtTickableManager will then call update().
| [in] | tNow | is the current time-stamp. |
| true | if this object needs to be ticked. |
| false | otherwise. |
Reimplemented from makVrv::DtTickable.
|
virtual |
Configure the meta file tickable object.
Get the switch index based on the wind speed (km/h)
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
static |
|
static |
|
protected |
Last update wind speed.
|
protected |
To convert the wind speed to display units (km/h)
|
protected |
The actual node that contains switch states.
|
protected |
Windspeeds.
|
protected |