![]() |
VR-Forces 4.7 Class Documentation
|
The DtNavigationLightController can be attached to any articulated model through an articulated model agent that has switchable colored lights. More...

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< int > | ColorSequence |
Public Member Functions | |
| virtual | ~DtNavigationLightController () |
| DTOR. | |
| virtual void | attach (DtBuoyOrBeaconFacade &buoyOrBeacon) |
| 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. | |
| virtual 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. | |
| virtual const SignalSequence & | signalSequence () const |
| virtual void | setExhibitCondition (NavigationLightExhibitCondition condition) |
| Set/get the exhibit condition for the controlled light. | |
| virtual NavigationLightExhibitCondition | exhibitCondition () const |
| void | setParameterValues (const std::string &values) |
| std::string | parameterValues () const |
| virtual void | setColors (const ColorSequence &sequence) |
| Set/get the color value this controller should set the model's light color switch to. | |
| virtual const ColorSequence & | colors () const |
| virtual void | setOnOffState (bool state) |
| Set/get the controlled light's on off state (usually handled internally) | |
| virtual bool | onOffState () const |
| virtual void | setTimer (DtTime nextStateTime) |
| Set/get the simTime that the controller should do the next signal sequence transition (usually handled internally). | |
| virtual DtTime | timer () const |
| virtual void | setSequenceCursor (int cursor) |
| Set/get the cursor for the sequence. | |
| virtual int | sequenceCursor () const |
| virtual void | setLightColorSwitchNumber (int switchNum) |
| Set the number of the switch (State number) that controls the light color. | |
| virtual int | lightColorSwitchNumber () const |
| virtual void | setLightSwitchNumber (int switchNum) |
| Set the number of the switch (State number) that controls the light on/off state. | |
| virtual int | lightSwitchNumber () const |
| virtual void | setEnabled (bool enabled) |
| Enable / disable a light. | |
| virtual bool | enabled () const |
| virtual void | setHeight (float height) |
| If a light height is specfied (!= 0.) then that height (and the object it's attached to's height of attach point) will be used to position the object (and hence the light height) | |
| virtual float | height () const |
| virtual void | setVisibleDistance (float distance) |
| If a light range is specified (!= 0) then that range will be used. | |
| virtual float | visibleDistance () const |
Public Member Functions inherited from makVrv::DtNavigationFeature | |
| virtual | ~DtNavigationFeature () |
| DTOR. | |
| DtUniqueID | elementId () const |
| Get the element id of this navigation feature. | |
| virtual void | detach (DtBuoyOrBeaconFacade &buoyOrBeacon) |
| virtual void | setPresenceSwitchNumber (int switchNum) |
| virtual int | presenceSwitchNumber () const |
| virtual void | setTypeSwitchNumber (int typeNum) |
| virtual int | typeSwitchNumber () const |
| virtual void | setAttachableType (DtBuoyBeaconLayer::AttachableTypes attType) |
| virtual DtBuoyBeaconLayer::AttachableTypes | attachableType () |
| DtArticulatedModelAgent *const | modelAgent () const |
| Access the articulated model agent this whose object this controls. | |
| DtArticulatedModelAgent * | modelAgent () |
| void | setPosition (const DtVector &position) |
| Set / get the position of the navigation feature. | |
| const DtVector & | position () const |
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 DtNavigationLightController & | operator= (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. | |
| virtual void | attachModel (DtArticulatedModelAgent *modelAgent) |
| Model agent-specific forms of public methods. | |
| virtual void | updateModel (DtArticulatedModelAgent *modelAgent, DtTime simTime, bool daylight, bool foggy) |
| virtual void | setModelColors (DtArticulatedModelAgent *modelAgent) |
| virtual void | setModelOnOffState (DtArticulatedModelAgent *modelAgent) |
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 DtNavigationFeature & | operator= (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 |
| float | myHeight |
| float | myVisibleDistance |
| bool | myEnabled |
Protected Attributes inherited from makVrv::DtNavigationFeature | |
| DtUniqueID | myElementId |
| DtVector | myPosition |
| DtArticulatedModelAgent * | myModelAgent |
| DtArticulatedModelAgent * | myColorizedModelAgent |
| int | myPresenceSwitchNumber |
| int | myTypeSwitchNumber |
| DtBuoyBeaconLayer::AttachableTypes | myAttachableType |
Friends | |
| class | DtNavigationLightControllerCreator |
| Constructed through this creator class. | |
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.
| typedef std::vector<float> makVrv::DtNavigationLightController::SignalSequence |
Type to hold a set of on/off times that define a signal sequence.
| typedef std::vector<int> makVrv::DtNavigationLightController::ColorSequence |
|
virtual |
DTOR.
|
protected |
CTOR (callable by creator)
|
protected |
Default CTOR (unimplemented)
|
protected |
Copy CTOR (unimplemented)
|
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
Reimplemented from makVrv::DtNavigationFeature.
|
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
|
virtual |
Set/get the color value this controller should set the model's light color switch to.
|
virtual |
|
virtual |
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.
|
virtual |
|
virtual |
Set/get the exhibit condition for the controlled light.
|
virtual |
|
virtual |
Set/get the controlled light's on off state (usually handled internally)
|
virtual |
|
virtual |
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
|
virtual |
|
virtual |
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.
|
virtual |
|
virtual |
Set the number of the switch (State number) that controls the light color.
By default, the controller uses DtModelSemanticsMapper::State::light_color
|
virtual |
|
virtual |
Set the number of the switch (State number) that controls the light on/off state.
By default, the controller uses DtModelSemanticsMapper::State::navigation_lights
|
virtual |
|
virtual |
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
|
virtual |
|
virtual |
If a light height is specfied (!= 0.) then that height (and the object it's attached to's height of attach point) will be used to position the object (and hence the light height)
|
virtual |
|
virtual |
If a light range is specified (!= 0) then that range will be used.
Otherwise any range set in the osgSim::LightPointNode itself will be used. Note that this value is only used when the light is attached to a buoy or beacon; it must be set before the attachment occurs
|
virtual |
|
inline |
|
inline |
|
protected |
Assignment Operator (unimplemented)
Check daylight and fog values against the light controller's exhibit conditions, and enable or disable the light as appropriate.
|
protectedvirtual |
Model agent-specific forms of public methods.
|
protectedvirtual |
|
protectedvirtual |
|
protectedvirtual |
|
friend |
Constructed through this creator class.
| std::string makVrv::DtNavigationLightController::myParameterValues |
For debugging.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |