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

The DtWindDirTickable updates a transform node to rotate into the direction of the wind. More...

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

Public Member Functions

 DtWindDirTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex)
 CTOR.
virtual ~DtWindDirTickable ()
 DTOR.
virtual void update (DtTime tNow)
 Update the wind direction.
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.
- Public Member Functions inherited from makVrv::DtDynamicFeatureTickable
 DtDynamicFeatureTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex)
 CTOR.
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
 Specify how often (in # of frames) this tickable should call update.
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor.
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor.

Static Public Attributes

static const chartheWindDirFeatureName
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheTagRotOffsetDeg
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheTagRotDir
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheRotDirCW
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.

Protected Attributes

float myLastWindDir
 Last update wind direction.
osgSim::DOFTransform * myWindDirNode
 Transform for the wind to act upon.
float myRotOffset
 The rotation offset to bring the model's rotation in line with the wind's direction.
float myRotDir
 Clockwise or counterclockwise rotation.
- 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::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.
virtual void slot_managerAboutToBeDeleted ()

Detailed Description

The DtWindDirTickable updates a transform node to rotate into the direction of the wind.

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtWindDirTickable::~DtWindDirTickable ( )
virtual

DTOR.

Member Function Documentation

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

Update the wind direction.

Implements makVrv::DtTickable.

virtual bool makVrv::DtWindDirTickable::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::DtWindDirTickable::configure ( osg::Node *  n,
const rapidjson::Value &  windJsonData 
)
virtual

Configure node based on json data.

Member Data Documentation

const char* makVrv::DtWindDirTickable::theWindDirFeatureName
static

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

const char* makVrv::DtWindDirTickable::theTagRotOffsetDeg
static

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

const char* makVrv::DtWindDirTickable::theTagRotDir
static

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

const char* makVrv::DtWindDirTickable::theRotDirCW
static

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

float makVrv::DtWindDirTickable::myLastWindDir
protected

Last update wind direction.

osgSim::DOFTransform* makVrv::DtWindDirTickable::myWindDirNode
protected

Transform for the wind to act upon.

float makVrv::DtWindDirTickable::myRotOffset
protected

The rotation offset to bring the model's rotation in line with the wind's direction.

float makVrv::DtWindDirTickable::myRotDir
protected

Clockwise or counterclockwise rotation.


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

Document ID: Generated on Tue Mar 8 22:13:38 EST 2016 from SVN revision 162938
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)