VR-Forces 4.3.1 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::DtWindRotTickable Class Reference

The DtWindRotTickable rotates along X (like a fan blade) depending on the speed of the wind. More...

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

Public Member Functions

 DtWindRotTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, bool useInstancing, unsigned int nodeTypeIndex)
 CTOR.
virtual ~DtWindRotTickable ()
 DTOR.
virtual void update (DtTime tNow)
 Update the wind rotation for the node based on the environment.
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 chartheWindRotFeatureName
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheTagDelayBeforeRot
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.
static const chartheTagDegPerKPH
 Strings to get the different parts of the meta file Use these instead of hardcoded strings.

Protected Attributes

float myLastWindRot
 Last wind rotation amount.
DtTime myLastUpdateTime
 The last time update was called.
DtDisplayUnitsConvertermyConverter
 To convert the wind speed to display units (km/h)
osgSim::DOFTransform * myWindRotNode
 The node affected by the update rotation calculations.
float myDelayBeforeRot
 To constrain the rotation with respect to wind.
float myDegPerKPH
float myCurrRotInRad
 The current radial position of the fan blades.
- 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 DtWindRotTickable rotates along X (like a fan blade) depending on the speed of the wind.

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtWindRotTickable::~DtWindRotTickable ( )
virtual

DTOR.

Member Function Documentation

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

Update the wind rotation for the node based on the environment.

Implements makVrv::DtTickable.

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

Configure node based on json data.

Member Data Documentation

const char* makVrv::DtWindRotTickable::theWindRotFeatureName
static

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

const char* makVrv::DtWindRotTickable::theTagDelayBeforeRot
static

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

const char* makVrv::DtWindRotTickable::theTagDegPerKPH
static

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

float makVrv::DtWindRotTickable::myLastWindRot
protected

Last wind rotation amount.

DtTime makVrv::DtWindRotTickable::myLastUpdateTime
protected

The last time update was called.

DtDisplayUnitsConverter& makVrv::DtWindRotTickable::myConverter
protected

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

osgSim::DOFTransform* makVrv::DtWindRotTickable::myWindRotNode
protected

The node affected by the update rotation calculations.

float makVrv::DtWindRotTickable::myDelayBeforeRot
protected

To constrain the rotation with respect to wind.

float makVrv::DtWindRotTickable::myDegPerKPH
protected
float makVrv::DtWindRotTickable::myCurrRotInRad
protected

The current radial position of the fan blades.


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

Document ID: Generated on Wed Jul 29 00:55:00 EDT 2015 from SVN revision 155257
Copyright © 2005-2015 VT MÄK. All Rights Reserved (www.mak.com)