VR-Forces 4.7 Class Documentation
 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::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 (const std::string &name, DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyBeaconLayer &buoyBeaconLayer, DtBuoyBeaconLayer::AttachableTypes attType, const std::string &featureLayerList, const std::string &featureAttrMapFilename, DtNavigationFeatureBuilder *featureBuilder, int presenceSwitchNum, int typeSwitchNum)
 CTOR.
virtual ~DtNavigationLightManager ()
 DTOR.
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 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
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
- Public Member Functions inherited from makVrv::DtNavigationFeatureManager
 DtNavigationFeatureManager (const std::string &name, DtDe &de, DtAgentManagerInterface &sceneInterface, DtBuoyBeaconLayer &buoyBeaconLayer, DtBuoyBeaconLayer::AttachableTypes attType, const std::string &featureLayerList, const std::string &featureAttrMapFilename, DtNavigationFeatureBuilder *featureBuilder, int presenceSwitchNum, int typeSwitchNum)
 CTOR.
virtual ~DtNavigationFeatureManager ()
 DTOR.
bool readFeatureStyleListFile (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.
virtual void addFeature (DtNavigationFeature *feature)
 Add a feature (ex.
DtNavigationFeaturefindFeature (DtUniqueID elementId)
 Finds a pointer to the feature controller with the given element id.
virtual bool destroyFeature (DtUniqueID id)
 Destroys the feature with the element id.
virtual DtUniqueID findFeatureWithPosition (const DtVector &position)
 Look through the list of unattached features for a feature with the specified position.
const FeatureMapfeatures () const
 Get the container of features associated held by the manager.
FeatureMapfeatures ()

Protected Member Functions

 DtNavigationLightManager ()
 CTOR (unimplemented default CTOR )
 DtNavigationLightManager (const DtNavigationLightManager &orig)
 Copy CTOR (unimplemented)
DtNavigationLightManageroperator= (const DtNavigationLightManager &rhs)
 Assigment operator (unimplemented)
virtual void attachToBuoyOrBeacon (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)
 Helper function for setting up a buoy attachment.
virtual void detachFromBuoyOrBeacon (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &buoy)
 Helper function for detaching from a buoy.
virtual void adjustHeightForLight (DtNavigationFeature &controller, DtBuoyOrBeaconFacade &facade)
 This method will adjust the height of the object IF it is not buoyant and IF the model definition for the object provides a heightAboveOrigin parameter.
- Protected Member Functions inherited from makVrv::DtNavigationFeatureManager
 DtNavigationFeatureManager ()
 CTOR (unimplemented default CTOR )
 DtNavigationFeatureManager (const DtNavigationFeatureManager &orig)
 Copy CTOR (unimplemented)
DtNavigationFeatureManageroperator= (const DtNavigationFeatureManager &rhs)
 Assignment operator (unimplemented)
virtual void setPresenceSwitchNumber (int switchNum)
virtual int presenceSwitchNumber () const
virtual void setTypeSwitchNumber (int typeNum)
virtual int typeSwitchNumber () const
virtual void moveFeatureToDetachedFeatureList (DtUniqueID controllerId)
 Move features from the list of attached features to the list of unattached features.
virtual void moveFeatureToAttachedFeatureList (DtUniqueID controllerId)
 Move features from the list of unattached features to the list of attached features.
virtual void initializeFeatureCreators ()
 Register creators with the streamed feature manager for each feature layer (osgEarth model style) of interest.
virtual void slot_featureToBeDeleted (const std::string &myLayerName, DtUniqueID featureId)
 Slot connected to signal from the streamed feature manager that a feature has paged out.
virtual void slot_buoyOrBeaconCreated (DtBuoyOrBeaconFacade &buoy, const DtVector &initialPosition)
 Slot connected to signal from the streamed feature manager that a buoy has paged in.
virtual void slot_buoyOrBeaconAboutToBeDestroyed (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 Attributes

float myDaylightLightLevel
float myFogVisibilityLevel
DtNavigationLightUpdater myUpdater
- Protected Attributes inherited from makVrv::DtNavigationFeatureManager
DtDemyDe
DtAgentManagerInterfacemySceneInterface
FeatureMap myFeatures
DtSignalConnectionManager myConnections
std::string myName
DtBuoyBeaconLayer::AttachableTypes myAttachableType
std::string myFeatureLayerList
std::string myFeatureAttrMapFilename
DtNavigationFeatureBuildermyNavigationFeatureBuilder
int myPresenceSwitchNumber
int myTypeSwitchNumber
FeatureStylesList myFeatureStylesList
 The list of osgEarth model styles we want to be notified about.
PendingFeatureAttachmentMap myDetachedFeatures
 Features start here. When attached they move to...
PendingFeatureAttachmentMap myAttachedFeatures
 ...here.
FeatureToFeatureMap myFeatureToBuoyOrBeaconMap
FeatureToFeatureMap myBuoyOrBeaconToFeatureMap
DtBuoyBeaconLayermyBuoyBeaconLayer
 Access to the buoys.
boost::signals::connection myPostInitializeConnection

Additional Inherited Members

- Public Types inherited from makVrv::DtNavigationFeatureManager
typedef std::map< DtUniqueID,
DtNavigationFeature * > 
FeatureMap
 Type for a map of controller IDs to DtNavigationFeature.
- Protected Types inherited from makVrv::DtNavigationFeatureManager
typedef std::list< std::string > FeatureStylesList
typedef boost::unordered_map
< DtUniqueID, DtVector
PendingFeatureAttachmentMap
 Type for hash table of feature ids and locations.
typedef boost::unordered_map
< DtUniqueID, DtUniqueID
FeatureToFeatureMap
 Type for hash tables of features to attached buoys and attached buoys to features.

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 ( const std::string &  name,
DtDe de,
DtAgentManagerInterface sceneInterface,
DtBuoyBeaconLayer buoyBeaconLayer,
DtBuoyBeaconLayer::AttachableTypes  attType,
const std::string &  featureLayerList,
const std::string &  featureAttrMapFilename,
DtNavigationFeatureBuilder featureBuilder,
int  presenceSwitchNum,
int  typeSwitchNum 
)

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 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
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
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
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
DtNavigationLightManager& makVrv::DtNavigationLightManager::operator= ( const DtNavigationLightManager rhs)
protected

Assigment operator (unimplemented)

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

Helper function for setting up a buoy attachment.

Reimplemented from makVrv::DtNavigationFeatureManager.

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

Helper function for detaching from a buoy.

Reimplemented from makVrv::DtNavigationFeatureManager.

virtual void makVrv::DtNavigationLightManager::adjustHeightForLight ( DtNavigationFeature controller,
DtBuoyOrBeaconFacade facade 
)
protectedvirtual

This method will adjust the height of the object IF it is not buoyant and IF the model definition for the object provides a heightAboveOrigin parameter.

Member Data Documentation

float makVrv::DtNavigationLightManager::myDaylightLightLevel
protected
float makVrv::DtNavigationLightManager::myFogVisibilityLevel
protected
DtNavigationLightUpdater makVrv::DtNavigationLightManager::myUpdater
protected

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

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)