![]() |
VR-Forces 5.0.2 Developer's Guide
|
The DtShipFlagDirTickable updates a transform node to rotate into the direction of the wind and ship.

Public Member Functions | |
| DtShipFlagDirTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, unsigned int nodeTypeIndex, DtOsgArticulatedModel *osgArticulatedModel) | |
| virtual | ~DtShipFlagDirTickable () |
| virtual void | update (DtTime tNow) |
| float | calcRotAngleForShipFlag (DtSceneObject *sceneObj, DtDeadReckonUpdater *updater, DtTime tNow, const DtVector &windDirVec, float windSpeedMperS) |
| DtVector | computeWindVec (DtSceneObject *sceneObj, float windDirRad) |
| virtual bool | needsUpdate (DtTime tNow) |
| virtual void | configure (osg::Node *n, const rapidjson::Value &windJsonData) |
| virtual void | modelToBeDestroyed (DtModel *model) |
Public Member Functions inherited from makVrv::DtDynamicFeatureTickable | |
| virtual | ~DtDynamicFeatureTickable () |
Public Member Functions inherited from makVrv::DtTickable | |
| virtual bool | updateIfNeeded (DtTime tNow) |
| virtual | ~DtTickable () |
| virtual void | setIsThreadSafe (bool safe) |
| virtual bool | isThreadSafe () const |
| virtual void | setTickableListState (TickableListState safeList) |
| virtual TickableListState | tickableListState () const |
| virtual void | setUpdatePeriod (unsigned int period) |
| virtual unsigned int | updatePeriod () const |
| virtual bool | lodSystemEnabled () const |
Public Member Functions inherited from makVrv::DtVirtualBaseClass | |
| DtVirtualBaseClass () | |
| virtual | ~DtVirtualBaseClass () |
Static Public Attributes | |
| static const char * | theShipFlagDirFeatureName |
| static const char * | theTagRotOffsetDeg |
| static const char * | theTagRotDir |
| static const char * | theRotDirCW |
Protected Member Functions | |
| virtual void | disconnectFromModel () |
| virtual void | slot_coordinateSystemChanged () |
Protected Member Functions inherited from makVrv::DtDynamicFeatureTickable | |
| DtDynamicFeatureTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, unsigned int nodeTypeIndex) | |
Protected Member Functions inherited from makVrv::DtTickable | |
| DtTickable (DtTickableManagerInterface *manager) | |
| DtTickable () | |
| virtual void | slot_managerAboutToBeDeleted () |
Protected Attributes | |
| DtSceneObject * | mySceneObject |
| float | myLastFlagDir |
| DtVector | myLastPos |
| DtTime | myLastTime |
| osgSim::DOFTransform * | myWindDirNode |
| float | myRotOffset |
| float | myRotDir |
| DtOsgArticulatedModel * | myOsgArticulatedModel |
| DtSignalConnectionManager | myConnections |
| DtCoordinateSystem * | myCoordinateSystem = nullptr |
Protected Attributes inherited from makVrv::DtDynamicFeatureTickable | |
| DtDe & | myDe |
| DtElementID | myElementId |
| DtUniqueID | mySceneObjectId |
| unsigned int | myNodeTypeIndex |
| DtUniqueID | myUniqueId |
| std::string | myFeatureName |
Protected Attributes inherited from makVrv::DtTickable | |
| DtTickableManagerInterface * | myManager |
| DtSignalConnectionManager | myConnections |
| unsigned int | myFrameCounter |
| unsigned int | myFrameToUpdate |
| unsigned int | myUpdatePeriod |
| DtTime | myLastUpdateTime |
| bool | myIsThreadSafe |
| TickableListState | myTickableListState |
Additional Inherited Members | |
Public Types inherited from makVrv::DtTickable | |
| enum | TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList } |
| makVrv::DtShipFlagDirTickable::DtShipFlagDirTickable | ( | DtDe & | de, |
| DtElementID | elementId, | ||
| DtUniqueID | sceneObjectId, | ||
| DtUniqueID | uniqueId, | ||
| unsigned int | nodeTypeIndex, | ||
| DtOsgArticulatedModel * | osgArticulatedModel | ||
| ) |
CTOR.
|
virtual |
DTOR.
|
virtual |
Update the wind direction.
Implements makVrv::DtTickable.
| float makVrv::DtShipFlagDirTickable::calcRotAngleForShipFlag | ( | DtSceneObject * | sceneObj, |
| DtDeadReckonUpdater * | updater, | ||
| DtTime | tNow, | ||
| const DtVector & | windDirVec, | ||
| float | windSpeedMperS | ||
| ) |
Calculate the rotation about Z for the flag given the ship velocity and wind velocity.
| DtVector makVrv::DtShipFlagDirTickable::computeWindVec | ( | DtSceneObject * | sceneObj, |
| float | windDirRad | ||
| ) |
Convert the wind angle to a directional vector.
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 node based on json data.
|
virtual |
listen to the model to be destroyed signal
|
protectedvirtual |
internal function to disconnect from the model
|
protectedvirtual |
slot for when the coordinate system changes
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
static |
Strings to get the different parts of the meta file Use these instead of hardcoded strings.
|
protected |
The scene object we are querying.
|
protected |
Last update wind direction.
|
protected |
Last position.
|
protected |
Last update time.
|
protected |
Transform for the wind to act upon.
|
protected |
The rotation offset to bring the model's rotation in line with the wind's direction.
|
protected |
Clockwise or counterclockwise rotation.
|
protected |
|
protected |
|
protected |
local clone of the system wide coordinate system. for thread safety.