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
makVrv::DtWindSwitchTickable Class Reference

The DtWindSwitchTickable class is responsible for switching nodes based on the current wind speed.

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

Public Member Functions

 DtWindSwitchTickable (DtDe &de, DtElementID elementId, DtUniqueID sceneObjectId, DtUniqueID uniqueId, unsigned int nodeTypeIndex, DtOsgArticulatedModel *osgArticulatedModel)
 
virtual ~DtWindSwitchTickable ()
 
virtual void update (DtTime tNow)
 
virtual bool needsUpdate (DtTime tNow)
 
virtual void configure (osg::Node *n, const rapidjson::Value &windJsonData)
 
unsigned int getSwitchIndexForSpeed (double windSpeedMperS)
 
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 char * theWindSwitchFeatureName
 
static const char * theTagWindSpeeds
 
static const char * theTagSwitchIndices
 

Protected Member Functions

virtual void disconnectFromModel ()
 
- 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

float myLastWindSpeed
 
const DtDisplayUnitsConverter & myConverter
 
osgSim::MultiSwitch * myWindSwitchNode
 
std::vector< double > myWindSpeeds
 
std::vector< int > mySwitchIndices
 
DtOsgArticulatedModel * myOsgArticulatedModel
 
boost::signalslib::connection myModelToBeDestroyedConnection
 
- 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
 
unsigned int myTickableIndex
 
DtTime myLastUpdateTime
 
bool myIsThreadSafe
 
TickableListState myTickableListState
 

Additional Inherited Members

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

Constructor & Destructor Documentation

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

CTOR.

virtual makVrv::DtWindSwitchTickable::~DtWindSwitchTickable ( )
virtual

DTOR.

Member Function Documentation

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

Update the switch node based on the wind speed.

Implements makVrv::DtTickable.

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

Configure the meta file tickable object.

unsigned int makVrv::DtWindSwitchTickable::getSwitchIndexForSpeed ( double  windSpeedMperS)

Get the switch index based on the wind speed (m/s)

virtual void makVrv::DtWindSwitchTickable::modelToBeDestroyed ( DtModel *  model)
virtual

listen to the model to be destroyed signal

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

internal function to disconnect from the model

Member Data Documentation

const char* makVrv::DtWindSwitchTickable::theWindSwitchFeatureName
static

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

const char* makVrv::DtWindSwitchTickable::theTagWindSpeeds
static

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

const char* makVrv::DtWindSwitchTickable::theTagSwitchIndices
static

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

float makVrv::DtWindSwitchTickable::myLastWindSpeed
protected

Last update wind speed.

const DtDisplayUnitsConverter& makVrv::DtWindSwitchTickable::myConverter
protected

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

osgSim::MultiSwitch* makVrv::DtWindSwitchTickable::myWindSwitchNode
protected

The actual node that contains switch states.

std::vector<double> makVrv::DtWindSwitchTickable::myWindSpeeds
protected

Windspeeds.

std::vector<int> makVrv::DtWindSwitchTickable::mySwitchIndices
protected
DtOsgArticulatedModel* makVrv::DtWindSwitchTickable::myOsgArticulatedModel
protected
boost::signalslib::connection makVrv::DtWindSwitchTickable::myModelToBeDestroyedConnection
protected

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

Document ID: Generated on Thu Oct 15 21:27:02 EDT 2026 from SVN revision 296421
Copyright © 2005-2026 MAK Technologies. All Rights Reserved (www.mak.com)