VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes
makVrf::DtBackendLineOfSightManager Class Reference

Overide that adds the ability to request information from the back-end for intervisibility checks. More...

Inheritance diagram for makVrf::DtBackendLineOfSightManager:
Inheritance graph
[legend]

Classes

struct  ColorWait
 
struct  LineOfSightPoint
 Vector of points to use for line of sight check. Points are in local database coordinates. More...
 
struct  UpdateCheckState
 

Public Types

typedef std::vector
< LineOfSightPoint
LineOfSightPoints
 
typedef
DtVrfExtendedIntervisibilitySettingsData::Color 
Color
 

Public Member Functions

 DtBackendLineOfSightManager (makVrv::DtDe &)
 
virtual ~DtBackendLineOfSightManager ()
 
virtual bool hasRequestPending (makVrv::DtUniqueID) const
 Returns true if there is a pending request for this id. More...
 
virtual void requestLineOfSightCheck (makVrv::DtUniqueID, const DtVector &start, const DtVector &end, bool intersectTerrain=true, bool intersectEntities=false, bool intersectFeatures=true)
 Makes a request for the pending id. Vectors are in local coordinates. More...
 
virtual void requestLineOfSightCheck (makVrv::DtUniqueID, const LineOfSightPoints &pts, bool intersectTerrain=true, bool intersectEntities=false, bool intersectFeatures=true)
 
virtual void addReference (makVrv::DtUniqueID)
 Use these calls to manager the checker list. More...
 
virtual void removeReference (makVrv::DtUniqueID)
 
virtual bool validBackendToCheck () const
 Returns true if there are any valid backends to check. More...
 
virtual bool needsRequestForBackendLineOfSight (makVrv::DtUniqueID id, const DtVector &startPoint, const DtVector &endPoint, double waitTimeRequest, bool intersectEntities, bool &startingTimeRequest, bool useAsTimer=false)
 Returns true if, given the start and end point, the given id needs to be updated for line of sight check. More...
 
virtual void setAlphaFactor (double)
 Factor to adjust alpha of color by if waiting for response from back-end. Default is 0.5. More...
 
virtual double alphaFactor () const
 
virtual void adjustAlpha (makVrv::DtUniqueID, double alpha)
 
virtual void adjustColor (makVrv::DtUniqueID, const Color &visible, const Color &blocked)
 
virtual bool itemIsSelected (makVrv::DtUniqueID) const
 
- Public Member Functions inherited from makVrv::DtVirtualBaseClass
 DtVirtualBaseClass ()
 Do nothing constructor. More...
 
virtual ~DtVirtualBaseClass ()
 Virtual do nothing destructor. More...
 

Static Public Member Functions

static
DtBackendLineOfSightManager
instance (makVrv::DtDe &de)
 Returns instance of the DtExtendedLabelsManager. More...
 
static void registerInstance (makVrv::DtDe &de, DtBackendLineOfSightManager *)
 

Public Attributes

boost::signals2::signal< void(makVrv::DtUniqueID,
const
DtIfIntersectionInformationResponse::IntersectionPairInformation &)> 
signal_lineOfSightResponse
 Signal sent when backend request has been received. More...
 
boost::signals2::signal< void(makVrv::DtUniqueID,
DtVrfExtendedIntervisibilitySettingsData::IntervisibilitySettings)> 
signal_extendedIntervisibilityOptionsChanged
 Signal sent when a listener changes it's settings. More...
 

Protected Member Functions

virtual void checkWaitingForColor ()
 
virtual void slot_visibleColorChanged (makVrv::DtUniqueID, float, float, float, float)
 
virtual void slot_blockedColorChanged (makVrv::DtUniqueID, float, float, float, float)
 
virtual void slot_extendedIntervisibilityOptionsChanged (makVrv::DtUniqueID id, DtVrfExtendedIntervisibilitySettingsData::IntervisibilitySettings)
 
virtual DtVrfSimBackendManagerbackendManager () const
 
virtual void removeRequestId (makVrv::DtUniqueID)
 
virtual void processIntersectionResponse (DtSimMessage *)
 
virtual void resetColor (makVrv::DtUniqueID, const Color &visibleColor, const Color &blockedColor)
 If the object is not selected, sets the alpha to what the alpha should be multiplied by the alpha factor to show if data is from back or front-end (more see through is from front-end, if back-end is being used) More...
 
virtual void slot_onCurrentSelectionChanged (const makVrv::DtSelectionManager::IdSet &deselected)
 
virtual void setupConnectionsForListener (makVrv::DtIntervisibilityStateListener *, makVrv::DtSignalConnectionManager *)
 
virtual void slot_elementToBeDestroyed (makVrv::DtIntervisibilityElement *)
 

Protected Attributes

makVrv::DtDemyDe
 
DtVrfSimBackendManagermyBackendManager
 
std::map< makVrv::DtUniqueID,
unsigned long
myKeyToRequestMap
 
std::map< unsigned long,
std::pair< makVrv::DtUniqueID,
DtSimulationAddress > > 
myRequestToKeyMap
 
std::map< makVrv::DtUniqueID,
UpdateCheckState
myUpdateCheckState
 
makVrv::DtSignalConnectionManager myConnections
 
boost::signalslib::connection mySelectionChangedConnection
 
double myAlphaFactor
 
std::map< makVrv::DtUniqueID,
ColorWait
myWaitForSelectionChange
 

Detailed Description

Overide that adds the ability to request information from the back-end for intervisibility checks.

Member Typedef Documentation

Constructor & Destructor Documentation

makVrf::DtBackendLineOfSightManager::DtBackendLineOfSightManager ( makVrv::DtDe )
virtual makVrf::DtBackendLineOfSightManager::~DtBackendLineOfSightManager ( )
virtual

Member Function Documentation

static DtBackendLineOfSightManager& makVrf::DtBackendLineOfSightManager::instance ( makVrv::DtDe de)
static

Returns instance of the DtExtendedLabelsManager.

static void makVrf::DtBackendLineOfSightManager::registerInstance ( makVrv::DtDe de,
DtBackendLineOfSightManager  
)
static
virtual bool makVrf::DtBackendLineOfSightManager::hasRequestPending ( makVrv::DtUniqueID  ) const
virtual

Returns true if there is a pending request for this id.

virtual void makVrf::DtBackendLineOfSightManager::requestLineOfSightCheck ( makVrv::DtUniqueID  ,
const DtVector start,
const DtVector end,
bool  intersectTerrain = true,
bool  intersectEntities = false,
bool  intersectFeatures = true 
)
virtual

Makes a request for the pending id. Vectors are in local coordinates.

virtual void makVrf::DtBackendLineOfSightManager::requestLineOfSightCheck ( makVrv::DtUniqueID  ,
const LineOfSightPoints pts,
bool  intersectTerrain = true,
bool  intersectEntities = false,
bool  intersectFeatures = true 
)
virtual
virtual void makVrf::DtBackendLineOfSightManager::addReference ( makVrv::DtUniqueID  )
virtual

Use these calls to manager the checker list.

If the checker list is not managed it can grow with each new check request

virtual void makVrf::DtBackendLineOfSightManager::removeReference ( makVrv::DtUniqueID  )
virtual
virtual bool makVrf::DtBackendLineOfSightManager::validBackendToCheck ( ) const
virtual

Returns true if there are any valid backends to check.

virtual bool makVrf::DtBackendLineOfSightManager::needsRequestForBackendLineOfSight ( makVrv::DtUniqueID  id,
const DtVector startPoint,
const DtVector endPoint,
double  waitTimeRequest,
bool  intersectEntities,
bool startingTimeRequest,
bool  useAsTimer = false 
)
virtual

Returns true if, given the start and end point, the given id needs to be updated for line of sight check.

virtual void makVrf::DtBackendLineOfSightManager::setAlphaFactor ( double  )
virtual

Factor to adjust alpha of color by if waiting for response from back-end. Default is 0.5.

virtual double makVrf::DtBackendLineOfSightManager::alphaFactor ( ) const
virtual
virtual void makVrf::DtBackendLineOfSightManager::adjustAlpha ( makVrv::DtUniqueID  ,
double  alpha 
)
virtual
virtual void makVrf::DtBackendLineOfSightManager::adjustColor ( makVrv::DtUniqueID  ,
const Color visible,
const Color blocked 
)
virtual
virtual bool makVrf::DtBackendLineOfSightManager::itemIsSelected ( makVrv::DtUniqueID  ) const
virtual
virtual void makVrf::DtBackendLineOfSightManager::checkWaitingForColor ( )
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::slot_visibleColorChanged ( makVrv::DtUniqueID  ,
float  ,
float  ,
float  ,
float   
)
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::slot_blockedColorChanged ( makVrv::DtUniqueID  ,
float  ,
float  ,
float  ,
float   
)
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::slot_extendedIntervisibilityOptionsChanged ( makVrv::DtUniqueID  id,
DtVrfExtendedIntervisibilitySettingsData::IntervisibilitySettings   
)
protectedvirtual
virtual DtVrfSimBackendManager& makVrf::DtBackendLineOfSightManager::backendManager ( ) const
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::removeRequestId ( makVrv::DtUniqueID  )
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::processIntersectionResponse ( DtSimMessage )
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::resetColor ( makVrv::DtUniqueID  ,
const Color visibleColor,
const Color blockedColor 
)
protectedvirtual

If the object is not selected, sets the alpha to what the alpha should be multiplied by the alpha factor to show if data is from back or front-end (more see through is from front-end, if back-end is being used)

virtual void makVrf::DtBackendLineOfSightManager::slot_onCurrentSelectionChanged ( const makVrv::DtSelectionManager::IdSet deselected)
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::setupConnectionsForListener ( makVrv::DtIntervisibilityStateListener ,
makVrv::DtSignalConnectionManager  
)
protectedvirtual
virtual void makVrf::DtBackendLineOfSightManager::slot_elementToBeDestroyed ( makVrv::DtIntervisibilityElement )
protectedvirtual

Member Data Documentation

boost::signals2::signal<void (makVrv::DtUniqueID, const DtIfIntersectionInformationResponse::IntersectionPairInformation&)> makVrf::DtBackendLineOfSightManager::signal_lineOfSightResponse

Signal sent when backend request has been received.

boost::signals2::signal<void (makVrv::DtUniqueID, DtVrfExtendedIntervisibilitySettingsData::IntervisibilitySettings)> makVrf::DtBackendLineOfSightManager::signal_extendedIntervisibilityOptionsChanged

Signal sent when a listener changes it's settings.

makVrv::DtDe& makVrf::DtBackendLineOfSightManager::myDe
protected
DtVrfSimBackendManager* makVrf::DtBackendLineOfSightManager::myBackendManager
mutableprotected
std::map<makVrv::DtUniqueID, unsigned long> makVrf::DtBackendLineOfSightManager::myKeyToRequestMap
protected
std::map<unsigned long, std::pair<makVrv::DtUniqueID, DtSimulationAddress> > makVrf::DtBackendLineOfSightManager::myRequestToKeyMap
protected
std::map<makVrv::DtUniqueID, UpdateCheckState> makVrf::DtBackendLineOfSightManager::myUpdateCheckState
protected
makVrv::DtSignalConnectionManager makVrf::DtBackendLineOfSightManager::myConnections
protected
boost::signalslib::connection makVrf::DtBackendLineOfSightManager::mySelectionChangedConnection
protected
double makVrf::DtBackendLineOfSightManager::myAlphaFactor
protected
std::map<makVrv::DtUniqueID, ColorWait> makVrf::DtBackendLineOfSightManager::myWaitForSelectionChange
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)