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

The DtNavigationLightController can be attached to any articulated model through an articulated model agent that has switchable colored lights. More...

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

Public Types

enum  NavigationLightExhibitCondition { NavigationLightExhibitConditionAlways = 1, NavigationLightExhibitConditionDay = 2, NavigationLightExhibitConditionFog = 3, NavigationLightExhibitConditionNight = 4 }
 enumeration used for exhibit conditions More...
typedef std::vector< float > SignalSequence
 Type to hold a set of on/off times that define a signal sequence.
typedef std::vector< intColorSequence

Public Member Functions

virtual ~DtNavigationLightController ()
 DTOR.
virtual void attach (DtArticulatedModelAgent *modelAgent)
 Attach the controller to an articulated model.
virtual void update (DtTime simTime, bool daylight, bool foggy)
 Update the state of the light (on or off) based on daylight conditions, fog, and signal sequence.
void setSignalSequence (const SignalSequence &sequence)
 Set/get a signal sequence for the controller to use This is a series of ON and OFF times, in seconds, starting with an ON time.
const SignalSequencesignalSequence () const
void setExhibitCondition (NavigationLightExhibitCondition condition)
 Set/get the exhibit condition for the controlled light.
NavigationLightExhibitCondition exhibitCondition () const
void setParameterValues (const std::string &values)
std::string parameterValues () const
void setColors (const ColorSequence &sequence)
 Set/get the color value this controller should set the model's light color switch to.
const ColorSequencecolors () const
 Set/get the color value this controller should set the model's light color switch to.
void setOnOffState (bool state)
 Set/get the controlled light's on off state (usually handled internally)
bool onOffState () const
 Set/get the controlled light's on off state (usually handled internally)
void setTimer (DtTime nextStateTime)
 Set/get the simTime that the controller should do the next signal sequence transition (usually handled internally).
DtTime timer () const
 Set/get the simTime that the controller should do the next signal sequence transition (usually handled internally).
void setSequenceCursor (int cursor)
 Set/get the cursor for the sequence.
int sequenceCursor () const
 Set/get the cursor for the sequence.
void setLightColorSwitchNumber (int switchNum)
 Set the number of the switch (State number) that controls the light color.
int lightColorSwitchNumber () const
 Set the number of the switch (State number) that controls the light color.
void setLightSwitchNumber (int switchNum)
 Set the number of the switch (State number) that controls the light on/off state.
int lightSwitchNumber () const
 Set the number of the switch (State number) that controls the light on/off state.
void setEnabled (bool enabled)
 Enable / disable a light.
bool enabled () const
 Enable / disable a light.
- Public Member Functions inherited from makVrv::DtNavigationFeature
virtual ~DtNavigationFeature ()
 DTOR.
DtUniqueID elementId () const
 Get the element id of this navigation feature.
DtArticulatedModelAgent *const modelAgent () const
 Access the articulated model agent this whose object this controls.
DtArticulatedModelAgent * modelAgent ()
 Access the articulated model agent this whose object this controls.
void setPosition (const DtVector &position)
 Set / get the position of the navigation feature.
const DtVectorposition () const
 Set / get the position of the navigation feature.

Public Attributes

std::string myParameterValues
 For debugging.

Protected Member Functions

 DtNavigationLightController (DtUniqueID elementId)
 CTOR (callable by creator)
 DtNavigationLightController ()
 Default CTOR (unimplemented)
 DtNavigationLightController (const DtNavigationLightController &orig)
 Copy CTOR (unimplemented)
const DtNavigationLightControlleroperator= (const DtNavigationLightController &rhs)
 Assignment Operator (unimplemented)
void checkEnabledState (bool daylight, bool foggy)
 Check daylight and fog values against the light controller's exhibit conditions, and enable or disable the light as appropriate.
- Protected Member Functions inherited from makVrv::DtNavigationFeature
 DtNavigationFeature (DtUniqueID elementId)
 CTOR (callable by creator)
 DtNavigationFeature ()
 Default CTOR (unimplemented)
 DtNavigationFeature (const DtNavigationFeature &orig)
 Copy CTOR (unimplemented)
const DtNavigationFeatureoperator= (const DtNavigationFeature &rhs)
 Assignment Operator (unimplemented)

Protected Attributes

ColorSequence myColors
int myColorCursor
bool myOnOffState
DtTime myTimer
SignalSequence mySignalSequence
int mySequenceCursor
int myLightColorSwitchNumber
int myLightSwitchNumber
NavigationLightExhibitCondition myExhibitCondition
bool myEnabled
- Protected Attributes inherited from makVrv::DtNavigationFeature
DtUniqueID myElementId
DtVector myPosition
DtArticulatedModelAgent * myModelAgent

Friends

class DtNavigationLightControllerCreator
 Constructed through this creator class.

Detailed Description

The DtNavigationLightController can be attached to any articulated model through an articulated model agent that has switchable colored lights.

It sets the objects light color; and it turns the light on and off according to a provided sequence string, time of day and visibility conditions. It is the responsibility of whatever attaches this to a model to set the attachment to Null (0) when the model is destroyed.

Member Typedef Documentation

Type to hold a set of on/off times that define a signal sequence.

Member Enumeration Documentation

enumeration used for exhibit conditions

Enumerator:
NavigationLightExhibitConditionAlways 
NavigationLightExhibitConditionDay 
NavigationLightExhibitConditionFog 
NavigationLightExhibitConditionNight 

Constructor & Destructor Documentation

virtual makVrv::DtNavigationLightController::~DtNavigationLightController ( )
virtual

DTOR.

makVrv::DtNavigationLightController::DtNavigationLightController ( DtUniqueID  elementId)
protected

CTOR (callable by creator)

makVrv::DtNavigationLightController::DtNavigationLightController ( )
protected

Default CTOR (unimplemented)

makVrv::DtNavigationLightController::DtNavigationLightController ( const DtNavigationLightController orig)
protected

Copy CTOR (unimplemented)

Member Function Documentation

virtual void makVrv::DtNavigationLightController::attach ( DtArticulatedModelAgent *  modelAgent)
virtual

Attach the controller to an articulated model.

The model should have a multiswitch for different colored lights; and an on/off switch for each light

virtual void makVrv::DtNavigationLightController::update ( DtTime  simTime,
bool  daylight,
bool  foggy 
)
virtual

Update the state of the light (on or off) based on daylight conditions, fog, and signal sequence.

simTime is only used for signal sequencing, not day/night determination

void makVrv::DtNavigationLightController::setColors ( const ColorSequence sequence)

Set/get the color value this controller should set the model's light color switch to.

const ColorSequence& makVrv::DtNavigationLightController::colors ( ) const

Set/get the color value this controller should set the model's light color switch to.

void makVrv::DtNavigationLightController::setSignalSequence ( const SignalSequence sequence)

Set/get a signal sequence for the controller to use This is a series of ON and OFF times, in seconds, starting with an ON time.

const SignalSequence& makVrv::DtNavigationLightController::signalSequence ( ) const
void makVrv::DtNavigationLightController::setExhibitCondition ( NavigationLightExhibitCondition  condition)

Set/get the exhibit condition for the controlled light.

NavigationLightExhibitCondition makVrv::DtNavigationLightController::exhibitCondition ( ) const
void makVrv::DtNavigationLightController::setOnOffState ( bool  state)

Set/get the controlled light's on off state (usually handled internally)

bool makVrv::DtNavigationLightController::onOffState ( ) const

Set/get the controlled light's on off state (usually handled internally)

void makVrv::DtNavigationLightController::setTimer ( DtTime  nextStateTime)

Set/get the simTime that the controller should do the next signal sequence transition (usually handled internally).

Set this to 0. will force a transition on the next update

DtTime makVrv::DtNavigationLightController::timer ( ) const

Set/get the simTime that the controller should do the next signal sequence transition (usually handled internally).

Set this to 0. will force a transition on the next update

void makVrv::DtNavigationLightController::setSequenceCursor ( int  cursor)

Set/get the cursor for the sequence.

When a transition occurs, this value is used to determine the time of the NEXT transition. If it is greater than the size of the signal sequence, it will be set to 0.

int makVrv::DtNavigationLightController::sequenceCursor ( ) const

Set/get the cursor for the sequence.

When a transition occurs, this value is used to determine the time of the NEXT transition. If it is greater than the size of the signal sequence, it will be set to 0.

void makVrv::DtNavigationLightController::setLightColorSwitchNumber ( int  switchNum)

Set the number of the switch (State number) that controls the light color.

By default, the controller uses DtModelSemanticsMapper::State::light_color

int makVrv::DtNavigationLightController::lightColorSwitchNumber ( ) const

Set the number of the switch (State number) that controls the light color.

By default, the controller uses DtModelSemanticsMapper::State::light_color

void makVrv::DtNavigationLightController::setLightSwitchNumber ( int  switchNum)

Set the number of the switch (State number) that controls the light on/off state.

By default, the controller uses DtModelSemanticsMapper::State::navigation_lights

int makVrv::DtNavigationLightController::lightSwitchNumber ( ) const

Set the number of the switch (State number) that controls the light on/off state.

By default, the controller uses DtModelSemanticsMapper::State::navigation_lights

void makVrv::DtNavigationLightController::setEnabled ( bool  enabled)

Enable / disable a light.

This is normally done internally based on exhibition condition, daylight, and fog indicators. To take manual control, set the exhibitCondition to NavigationLightExhibitConditionAlways

bool makVrv::DtNavigationLightController::enabled ( ) const

Enable / disable a light.

This is normally done internally based on exhibition condition, daylight, and fog indicators. To take manual control, set the exhibitCondition to NavigationLightExhibitConditionAlways

void makVrv::DtNavigationLightController::setParameterValues ( const std::string &  values)
inline
std::string makVrv::DtNavigationLightController::parameterValues ( ) const
inline
const DtNavigationLightController& makVrv::DtNavigationLightController::operator= ( const DtNavigationLightController rhs)
protected

Assignment Operator (unimplemented)

void makVrv::DtNavigationLightController::checkEnabledState ( bool  daylight,
bool  foggy 
)
protected

Check daylight and fog values against the light controller's exhibit conditions, and enable or disable the light as appropriate.

Friends And Related Function Documentation

Constructed through this creator class.

Member Data Documentation

std::string makVrv::DtNavigationLightController::myParameterValues

For debugging.

ColorSequence makVrv::DtNavigationLightController::myColors
protected
int makVrv::DtNavigationLightController::myColorCursor
protected
bool makVrv::DtNavigationLightController::myOnOffState
protected
DtTime makVrv::DtNavigationLightController::myTimer
protected
SignalSequence makVrv::DtNavigationLightController::mySignalSequence
protected
int makVrv::DtNavigationLightController::mySequenceCursor
protected
int makVrv::DtNavigationLightController::myLightColorSwitchNumber
protected
int makVrv::DtNavigationLightController::myLightSwitchNumber
protected
NavigationLightExhibitCondition makVrv::DtNavigationLightController::myExhibitCondition
protected
bool makVrv::DtNavigationLightController::myEnabled
protected

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

Document ID: Generated on Wed Mar 11 21:20:57 EDT 2015 from SVN revision 150940
Copyright © 2005-2014 VT MÄK. All Rights Reserved (www.mak.com)