VR-Forces Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
makVrv::DtWindRotTickable Class Reference

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

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

Public Member Functions

 DtWindRotTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, unsigned int nodeTypeIndex, DtOsgArticulatedModel *osgArticulatedModel)
 
virtual ~DtWindRotTickable ()
 
virtual void update (DtTime tNow)
 
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 setTickableEnabled (bool enabled)
 
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 adaptiveTickLodEnabled () const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 
virtual ~DtVirtualBaseClass ()
 

Static Public Attributes

static const chartheWindRotFeatureName
 
static const chartheTagDelayBeforeRot
 
static const chartheTagDegPerKPH
 

Protected Member Functions

virtual void disconnectFromModel ()
 
virtual float computeInitialOrientation (void) const
 
virtual void setVelocity (float radianSpeed)
 
- 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 ()=delete
 
virtual void slot_managerAboutToBeDeleted ()
 

Protected Attributes

const DtDisplayUnitsConvertermyConverter
 
osgSim::DOFTransform * myWindRotNode
 
float myWindSpeedTreshold
 
float myDegPerKPH
 
float myLastWindSpeedKmPerHr = -1
 
DtOsgArticulatedModelmyOsgArticulatedModel
 
bool myInitialRotationSet = false
 
bool myRotating = false
 
boost::signalslib::connection myModelToBeDestroyedConnection
 
- Protected Attributes inherited from makVrv::DtDynamicFeatureTickable
DtDemyDe
 
DtElementID myElementId
 
DtUniqueID mySceneObjectId
 
unsigned int myNodeTypeIndex
 
DtUniqueID myUniqueId
 
std::string myFeatureName
 
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 
DtSignalConnectionManager myConnections
 
unsigned int myFrameCounter
 
unsigned int myFrameToUpdate
 
unsigned int myUpdatePeriod
 
unsigned int myTickableIndex
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Static Protected Attributes

static const int theAnimationFlags
 

Additional Inherited Members

- Public Types inherited from makVrv::DtTickable
enum  TickableListState { TickableNotOnList, TickableOnMainList, TickableOnThreadSafeList }
 

Constructor & Destructor Documentation

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

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.

virtual void makVrv::DtWindRotTickable::modelToBeDestroyed ( DtModel model)
virtual

listen to the model to be destroyed signal

virtual void makVrv::DtWindRotTickable::disconnectFromModel ( )
protectedvirtual

internal function to disconnect from the model

virtual float makVrv::DtWindRotTickable::computeInitialOrientation ( void  ) const
protectedvirtual

add in some offset, so that different entities (e.g. wind turbines) don't look in sync

virtual void makVrv::DtWindRotTickable::setVelocity ( float  radianSpeed)
protectedvirtual

internal

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.

const 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::myWindSpeedTreshold
protected

To constrain the rotation with respect to wind.

float makVrv::DtWindRotTickable::myDegPerKPH
protected
float makVrv::DtWindRotTickable::myLastWindSpeedKmPerHr = -1
protected

last speed, the update executed

DtOsgArticulatedModel* makVrv::DtWindRotTickable::myOsgArticulatedModel
protected
bool makVrv::DtWindRotTickable::myInitialRotationSet = false
protected

whether the initial orientation was set

bool makVrv::DtWindRotTickable::myRotating = false
protected

whether rotating

const int makVrv::DtWindRotTickable::theAnimationFlags
staticprotected
boost::signalslib::connection makVrv::DtWindRotTickable::myModelToBeDestroyedConnection
protected

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

Document ID: Generated on Tue Sep 24 19:28:17 EDT 2024 from SVN revision 269799
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)