The DtShipFlagDirTickable updates a transform node to rotate into the direction of the wind and ship.
More...
Public Member Functions |
| | DtShipFlagDirTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex) |
| | CTOR.
|
| virtual | ~DtShipFlagDirTickable () |
| | DTOR.
|
| virtual void | update (DtTime tNow) |
| | Update the wind direction.
|
| float | calcRotAngleForShipFlag (DtSceneObject *sceneObj, DtDeadReckonUpdater *updater, DtTime tNow, DtVector windDirVec, float windSpeedKPH) |
| | Calculate the rotation about Z for the flag given the ship velocity and wind velocity.
|
| DtVector | computeWindVec (DtSceneObject *sceneObj, float windDirRad) |
| | Convert the wind angle to a directional vector.
|
| virtual bool | needsUpdate (DtTime tNow) |
| | The check function called by DtTickableManager to verify if an update is required.
|
| virtual void | configure (osg::Node *n, const rapidjson::Value &windJsonData) |
| | Configure node based on json data.
|
| | DtDynamicFeatureTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex) |
| | CTOR.
|
| virtual | ~DtDynamicFeatureTickable () |
| | DTOR.
|
| virtual | ~DtTickable () |
| | Virtual DTOR.
|
| | DtVirtualBaseClass () |
| | Do nothing constructor.
|
| virtual | ~DtVirtualBaseClass () |
| | Virtual do nothing destructor.
|
Static Public Attributes |
|
| static const char * | theShipFlagDirFeatureName |
| | Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
| static const char * | theTagRotOffsetDeg |
| | Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
| static const char * | theTagRotDir |
| | Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
| static const char * | theRotDirCW |
| | Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
Detailed Description
The DtShipFlagDirTickable updates a transform node to rotate into the direction of the wind and ship.
Constructor & Destructor Documentation
| virtual makVrv::DtShipFlagDirTickable::~DtShipFlagDirTickable |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void makVrv::DtShipFlagDirTickable::update |
( |
DtTime |
tNow | ) |
|
|
virtual |
Calculate the rotation about Z for the flag given the ship velocity and wind velocity.
Convert the wind angle to a directional vector.
| virtual bool makVrv::DtShipFlagDirTickable::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] | tNow | is the current time-stamp. |
- Return values
-
| true | if this object needs to be ticked. |
| false | otherwise. |
Implements makVrv::DtTickable.
| virtual void makVrv::DtShipFlagDirTickable::configure |
( |
osg::Node * |
n, |
|
|
const rapidjson::Value & |
windJsonData |
|
) |
| |
|
virtual |
Configure node based on json data.
Member Data Documentation
| const char* makVrv::DtShipFlagDirTickable::theShipFlagDirFeatureName |
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
| const char* makVrv::DtShipFlagDirTickable::theTagRotOffsetDeg |
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
| const char* makVrv::DtShipFlagDirTickable::theTagRotDir |
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
| const char* makVrv::DtShipFlagDirTickable::theRotDirCW |
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
The scene object we are querying.
| float makVrv::DtShipFlagDirTickable::myLastFlagDir |
|
protected |
Last update wind direction.
| DtVector makVrv::DtShipFlagDirTickable::myLastPos |
|
protected |
| DtTime makVrv::DtShipFlagDirTickable::myLastTime |
|
protected |
| osgSim::DOFTransform* makVrv::DtShipFlagDirTickable::myWindDirNode |
|
protected |
Transform for the wind to act upon.
| float makVrv::DtShipFlagDirTickable::myRotOffset |
|
protected |
The rotation offset to bring the model's rotation in line with the wind's direction.
| float makVrv::DtShipFlagDirTickable::myRotDir |
|
protected |
Clockwise or counterclockwise rotation.
The documentation for this class was generated from the following file: