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

The DtNavigationLightManager matches streamed light controllers to other streamed features (buoys and beacons) that have the same location. More...

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

Public Member Functions

 DtNavigationLightManager (DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyLayer &buoyLayer)
 CTOR.
virtual ~DtNavigationLightManager ()
 DTOR.
virtual void addObject (DtNavigationFeature *object)
 Add a light controller. The manager takes ownership of the controller.
virtual bool needsUpdate (DtTime tNow)
 Tickable implementation The check function called by DtTickableManager to verify if an update is required.
virtual void update (DtTime tNow)
 The update function called by DtTickableManager during update-ticks.
void setLightColorSwitchNumber (int switchNum)
 Set/get the switch number to use for changing light colors on models.
int lightColorSwitchNumber () const
 Set/get the switch number to use for changing light colors on models.
void setLightSwitchNumber (int switchNum)
 Set/get the switch number to use for turn navigation lights on and off.
int lightSwitchNumber () const
 Set/get the switch number to use for turn navigation lights on and off.
void setDaylightLightLevel (float daylightLevel)
 Set/get the light level (as found in DtEnvironment) that must be met or exceeded to consider the current light conditions to be daylight, for turn on and off day / night only lights.
float daylightLightLevel () const
 Set/get the light level (as found in DtEnvironment) that must be met or exceeded to consider the current light conditions to be daylight, for turn on and off day / night only lights.
void setFogVisibilityLevel (float fogVisibilityLevel)
 Set/get the visibility level (as found in DtEnvironment) at or below which conditions are foggy (for activating fog lights).
float fogVisibilityLevel () const
 Set/get the visibility level (as found in DtEnvironment) at or below which conditions are foggy (for activating fog lights).
- Public Member Functions inherited from makVrv::DtNavigationFeatureManager
 DtNavigationFeatureManager (DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyLayer &buoyLayer)
 CTOR.
virtual ~DtNavigationFeatureManager ()
 DTOR.
bool readObjectStyleListFile (const std::string &path, const std::string &layerListFileName)
 Read the file that specifies the list of osgEarth style names that we wish to have our registered builder called for when features are streamed in.
DtNavigationFeaturefindObject (DtUniqueID elementId)
 Finds a pointer to the object controller with the given element id.
virtual bool destroyObject (DtUniqueID id)
 Destroys the object with the element id.
virtual DtUniqueID findObjectWithPosition (const DtVector &position)
 Look through the list of unattached objects for a object with the specified position.
const ObjectMapobjects () const
 Get the container of objects associated held by the manager.
ObjectMapobjects ()
 Get the container of objects associated held by the manager.
- Public Member Functions inherited from makVrv::DtTickable
virtual ~DtTickable ()
 Virtual DTOR.

Protected Member Functions

 DtNavigationLightManager ()
 CTOR (unimplemented default CTOR )
 DtNavigationLightManager (const DtNavigationLightManager &orig)
 Copy CTOR (unimplemented)
DtNavigationLightManageroperator= (const DtNavigationLightManager &rhs)
 Assigment operator (unimplemented)
virtual void attachToBuoy (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)
 Helper function for setting up a buoy attachment.
virtual void detachFromBuoy (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)
 Helper function for detaching from a buoy.
virtual void initializeFeatureCreators ()
 Register creators with the streamed feature manager for each light layer (osgEarth model style) of interest.
void slot_buoyCreated (DtBuoyOrBeaconFacade &buoy, const DtVector &initialPosition)
 Slot connected to signal from the streamed feature manager that a buoy has paged in.
- Protected Member Functions inherited from makVrv::DtNavigationFeatureManager
 DtNavigationFeatureManager ()
 CTOR (unimplemented default CTOR )
 DtNavigationFeatureManager (const DtNavigationFeatureManager &orig)
 Copy CTOR (unimplemented)
DtNavigationFeatureManageroperator= (const DtNavigationFeatureManager &rhs)
 Assigment operator (unimplemented)
virtual void moveObjectToDetachedObjectList (DtUniqueID controllerId)
 Move objects from the list of attached objects to the list of unattached objects.
virtual void moveObjectToAttachedObjectList (DtUniqueID controllerId)
 Move objects from the list of unattached objects to the list of attached objects.
virtual void slot_featureToBeDeleted (const std::string &myLayerName, DtUniqueID featureId)
 Slot connected to signal from the streamed feature manager that a object has paged out.
virtual void slot_buoyAboutToBeDestroyed (const DtBuoyOrBeaconFacade &buoy)
 Slot connected to signal from the streamed feature manager that a buoy has paged out.
void slot_sceneCreated ()
 If the IG is initialized when this is called, it will call initializeFeatureCreators.
void slot_postInitialize ()
 slot used to wait for postInitialized signal
- Protected Member Functions inherited from makVrv::DtTickable
 DtTickable (DtTickableManagerInterface *manager)
 CTOR.
 DtTickable ()
 Unimplemented default CTOR.

Protected Attributes

int myLightColorSwitchNumber
int myLightSwitchNumber
float myDaylightLightLevel
float myFogVisibilityLevel
- Protected Attributes inherited from makVrv::DtNavigationFeatureManager
const charObjectLayerList
const charObjectAttrMapFilename
DtDemyDe
DtAgentManagerInterfacemySceneInterface
ObjectMap myObjects
DtSignalConnectionManager myConnections
DtNavigationFeatureStringParsermyObjectStringParser
std::string myName
ObjectStylesList myObjectStylesList
 The list of osgEarth model styles we want to be notified about.
PendingObjectAttachmentMap myDetachedObjects
 Objects start here. When attached they move to...
PendingObjectAttachmentMap myAttachedObjects
 ...here.
ObjectToObjectMap myObjectToBuoyMap
ObjectToObjectMap myBuoyToObjectMap
DtBuoyLayermyBuoyLayer
 Access to the buoys.
boost::signals::connection myPostInitializeConnection
- Protected Attributes inherited from makVrv::DtTickable
DtTickableManagerInterfacemyManager
 Pointer to manager for removal during destruction.

Additional Inherited Members

- Public Types inherited from makVrv::DtNavigationFeatureManager
typedef std::map< DtUniqueID,
DtNavigationFeature * > 
ObjectMap
 Type for a map of controller IDs to DtNavigationFeature.
- Protected Types inherited from makVrv::DtNavigationFeatureManager
typedef std::list< std::string > ObjectStylesList
typedef boost::unordered_map
< DtUniqueID, DtVector
PendingObjectAttachmentMap
 Type for hash table of object ids and locations.
typedef boost::unordered_map
< DtUniqueID, DtUniqueID
ObjectToObjectMap
 Type for hash tables of objects to attached buoys and attached buoys to objects.

Detailed Description

The DtNavigationLightManager matches streamed light controllers to other streamed features (buoys and beacons) that have the same location.

It is also responsible for updating the lights and removing them when the streamed light controllers page out

Constructor & Destructor Documentation

makVrv::DtNavigationLightManager::DtNavigationLightManager ( DtDe de,
DtAgentManagerInterface sceneInterface,
DtBuoyLayer buoyLayer 
)

CTOR.

virtual makVrv::DtNavigationLightManager::~DtNavigationLightManager ( )
virtual

DTOR.

makVrv::DtNavigationLightManager::DtNavigationLightManager ( )
protected

CTOR (unimplemented default CTOR )

makVrv::DtNavigationLightManager::DtNavigationLightManager ( const DtNavigationLightManager orig)
protected

Copy CTOR (unimplemented)

Member Function Documentation

virtual void makVrv::DtNavigationLightManager::addObject ( DtNavigationFeature object)
virtual

Add a light controller. The manager takes ownership of the controller.

Implements makVrv::DtNavigationFeatureManager.

virtual bool makVrv::DtNavigationLightManager::needsUpdate ( DtTime  tNow)
virtual

Tickable implementation 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
true

Implements makVrv::DtNavigationFeatureManager.

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

The update function called by DtTickableManager during update-ticks.

Parameters
[in]tNowis the current time-stamp. This method calls update() for all attached light controllers

Implements makVrv::DtNavigationFeatureManager.

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

Set/get the switch number to use for changing light colors on models.

Normally DtModelSemanticsMapper::States::light_color, this provides a mechanism to change the value used.

int makVrv::DtNavigationLightManager::lightColorSwitchNumber ( ) const

Set/get the switch number to use for changing light colors on models.

Normally DtModelSemanticsMapper::States::light_color, this provides a mechanism to change the value used.

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

Set/get the switch number to use for turn navigation lights on and off.

Normally DtModelSemanticsMapper::States::navigation_lights, this provides a mechanism to change the value used.

int makVrv::DtNavigationLightManager::lightSwitchNumber ( ) const

Set/get the switch number to use for turn navigation lights on and off.

Normally DtModelSemanticsMapper::States::navigation_lights, this provides a mechanism to change the value used.

void makVrv::DtNavigationLightManager::setDaylightLightLevel ( float  daylightLevel)

Set/get the light level (as found in DtEnvironment) that must be met or exceeded to consider the current light conditions to be daylight, for turn on and off day / night only lights.

Normally 0.75 is used, but this provides a mechanism to change it.

float makVrv::DtNavigationLightManager::daylightLightLevel ( ) const

Set/get the light level (as found in DtEnvironment) that must be met or exceeded to consider the current light conditions to be daylight, for turn on and off day / night only lights.

Normally 0.75 is used, but this provides a mechanism to change it.

void makVrv::DtNavigationLightManager::setFogVisibilityLevel ( float  fogVisibilityLevel)

Set/get the visibility level (as found in DtEnvironment) at or below which conditions are foggy (for activating fog lights).

Normally

  1. m is used, but this can be used to change it
float makVrv::DtNavigationLightManager::fogVisibilityLevel ( ) const

Set/get the visibility level (as found in DtEnvironment) at or below which conditions are foggy (for activating fog lights).

Normally

  1. m is used, but this can be used to change it
DtNavigationLightManager& makVrv::DtNavigationLightManager::operator= ( const DtNavigationLightManager rhs)
protected

Assigment operator (unimplemented)

virtual void makVrv::DtNavigationLightManager::attachToBuoy ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoy 
)
protectedvirtual

Helper function for setting up a buoy attachment.

Implements makVrv::DtNavigationFeatureManager.

virtual void makVrv::DtNavigationLightManager::detachFromBuoy ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade buoy 
)
protectedvirtual

Helper function for detaching from a buoy.

Implements makVrv::DtNavigationFeatureManager.

virtual void makVrv::DtNavigationLightManager::initializeFeatureCreators ( )
protectedvirtual

Register creators with the streamed feature manager for each light layer (osgEarth model style) of interest.

Implements makVrv::DtNavigationFeatureManager.

void makVrv::DtNavigationLightManager::slot_buoyCreated ( DtBuoyOrBeaconFacade buoy,
const DtVector initialPosition 
)
protectedvirtual

Slot connected to signal from the streamed feature manager that a buoy has paged in.

Implements makVrv::DtNavigationFeatureManager.

Member Data Documentation

int makVrv::DtNavigationLightManager::myLightColorSwitchNumber
protected
int makVrv::DtNavigationLightManager::myLightSwitchNumber
protected
float makVrv::DtNavigationLightManager::myDaylightLightLevel
protected
float makVrv::DtNavigationLightManager::myFogVisibilityLevel
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)