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

Contains makVrf::DtSymbolTracker class. More...

Classes

class  MyTimeStatistic
struct  TrackData
struct  TrackingData

Public Member Functions

 DtSymbolTracker (makVrv::DtDe &)
virtual ~DtSymbolTracker ()
virtual void setLinePoints (const std::vector< DtVector > &)
 Sets the points on the line in which to track.
virtual void setShowObjectsWithinRange (double)
 Sets the range from the line in which entities need to be in order to be considered tracked with the line.
virtual void findAllInRange ()
 Finds all the objects within the given range, looking at the objects not in the tracked list and those in the tracked list.
virtual void setSuspendForMovement (bool)
 Sets whether or not the symbol tracker will suspend if the line points are changing. Default is true.
virtual bool suspendForMovement () const
virtual void setDistanceMoveTolerance (double)
 Distance a tracked entity must move to signal an update. Default is 10 meters.
virtual double distanceMoveTolerance () const
virtual void setAlwaysTrack (makVrv::DtUniqueID)
 Once ID is in the track, always track it.
makVrv::DtUniqueID alwaysTrack () const
virtual bool canTrack (makVrv::DtModel *model, double &range, DtVector *retPosition=0)
 Checks to see if this item can be tracked.
virtual bool withinRange (const DtVector &, double &range) const
 Returns true if the location is within range of the line.
virtual void suspend ()
 Suspends this symbol tracker. This means that there shall be no updates made to this symbol tracker.
virtual void resume ()
 Resumes symbol tracker updates. Will do a full re-investigation of symbols.
virtual bool isSuspended () const
 Returns true if this tracker has been suspended.
virtual DtVector geocentricPosition (makVrv::DtModel *) const
 Returns the geocentric position of the model.
virtual void modelAboutToBeDestroyed (makVrv::DtModel *)
 Called when a model is destroyed, removes from internal lists.
virtual void tickTrackedItems ()
 Updates items that are currently tracked regardless of time slick.

Public Attributes

boost::signal< void(DtVector
geocentricPosition, const
makVrv::DtStateView
< makVrv::DtVrlinkSimulatedEntityState > *)> 
signal_trackingEntity
 Sent the first time an entity is being tracked.
boost::signal< void(DtVector
geocentricPosition, const
makVrv::DtStateView
< makVrv::DtVrlinkSimulatedEntityState > *)> 
signal_trackingEntityUpdated
 Sent when a tracked entity is updated.
boost::signal< void(makVrv::DtElementID)> signal_stoppedTrackingEntity
 Sent when a track entity is stopped from being tracked.
boost::signal< void()> signal_suspended
 Signal when suspended.

Protected Types

typedef std::map
< makVrv::DtElementID,
TrackingData
TrackingMap

Protected Member Functions

virtual void checkTracked ()
 Checks tracks items.
virtual void slot_simObjectEntryAboutToBeRemoved (makVrv::DtSimObjectEntry &e)
 Called when an object is about to be removed, will remove this entity if the ID is being tracked.
virtual void removeTrackedItem (makVrv::DtElementID)
virtual bool watchModel (makVrv::DtModel *)
virtual void slot_simStateAdded (makVrv::DtSimObjectEntry &e)
 Called when a new state is added, if not being tracked, and the state is an entity state, then check to see if it can be tracked.
virtual void reset (TrackingMap &)
 Resets and clears the map that comes in for all states to be at NoUpdates.
virtual void updateRateForRange (makVrv::DtModel *, double range)
 Updates rate for range. Within twice distance at 4 seconds. Greater than twice distance at 8 seconds.
virtual bool checkAndRemove (makVrv::DtElementID id, TrackingMap &map) const
 Checks to see if id is in list, and, if so, removes it and returns true.
virtual void tick ()
 Updates the internal data for tracking and waiting given timers on each.
virtual makVrv::DtModelfindModelFor (makVrv::DtElementID) const
 Finds the projected widget model on the PVD display. Used for tracking symbols.
virtual void updateData (TrackData &data, bool tracked=false, bool force=false)
 Checks data in the map, and, if time will update.
virtual void checkWaiting ()
 Checks waiting list to see if any newly added items are ready to be checked.
virtual makVrv::DtElementID simIdFromModel (makVrv::DtModel *) const
 Returns a simulation id from the model id.

Protected Attributes

makVrv::DtDemyDe
std::vector< DtVectormyLinePoints
double myRange
makVrv::DtSignalConnectionManager myConnectionManager
TrackData myTrackingMap
TrackData myAt4s
TrackData myAt8s
TrackData myWaiting
DtTimedSection myLastMovement
int myLastMovementTime
bool mySuspended
bool mySuspendedByMovement
bool mySuspendForMovement
makVrv::DtCoordinateSystemmyCoordinateSystem
std::map< makVrv::DtElementID,
bool
myMadeConnection
std::map< makVrv::DtModel
*, makVrv::DtElementID
myModelToSimIdMap
double myDistanceMoveTolerance
makVrv::DtUniqueID myAlwaysTrack

Detailed Description

Contains makVrf::DtSymbolTracker class.

The symbol tracker class will watch entities that are within a certain distance of the given line. Signals will be emitted when an entity comes close, moves away or moves within the region of a line. Note that all points given on the line are in geocentric and the locations emitted are also in geocentric

Member Typedef Documentation

Constructor & Destructor Documentation

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

Member Function Documentation

virtual void makVrf::DtSymbolTracker::setLinePoints ( const std::vector< DtVector > &  )
virtual

Sets the points on the line in which to track.

If the points change then all entities are re-evaluated against the new line. Points given must be in geocentric

virtual void makVrf::DtSymbolTracker::setShowObjectsWithinRange ( double  )
virtual

Sets the range from the line in which entities need to be in order to be considered tracked with the line.

When setting this value all entities are re-evaluated against the line and distance

virtual void makVrf::DtSymbolTracker::findAllInRange ( )
virtual

Finds all the objects within the given range, looking at the objects not in the tracked list and those in the tracked list.

virtual void makVrf::DtSymbolTracker::setSuspendForMovement ( bool  )
virtual

Sets whether or not the symbol tracker will suspend if the line points are changing. Default is true.

virtual bool makVrf::DtSymbolTracker::suspendForMovement ( ) const
virtual
virtual void makVrf::DtSymbolTracker::setDistanceMoveTolerance ( double  )
virtual

Distance a tracked entity must move to signal an update. Default is 10 meters.

virtual double makVrf::DtSymbolTracker::distanceMoveTolerance ( ) const
virtual
virtual void makVrf::DtSymbolTracker::setAlwaysTrack ( makVrv::DtUniqueID  )
virtual

Once ID is in the track, always track it.

makVrv::DtUniqueID makVrf::DtSymbolTracker::alwaysTrack ( ) const
inline
virtual bool makVrf::DtSymbolTracker::canTrack ( makVrv::DtModel model,
double &  range,
DtVector retPosition = 0 
)
virtual

Checks to see if this item can be tracked.

If not will remove from tracked list if there. If it is not in the tracked list adds it and emits a signal. Returns true if the item can be tracked. Range is filled in with entity range to line

virtual bool makVrf::DtSymbolTracker::withinRange ( const DtVector ,
double &  range 
) const
virtual

Returns true if the location is within range of the line.

Vector is in geocentric. Range is filled in with the range the entity is to the line

virtual void makVrf::DtSymbolTracker::suspend ( )
virtual

Suspends this symbol tracker. This means that there shall be no updates made to this symbol tracker.

virtual void makVrf::DtSymbolTracker::resume ( )
virtual

Resumes symbol tracker updates. Will do a full re-investigation of symbols.

virtual bool makVrf::DtSymbolTracker::isSuspended ( ) const
virtual

Returns true if this tracker has been suspended.

virtual DtVector makVrf::DtSymbolTracker::geocentricPosition ( makVrv::DtModel ) const
virtual

Returns the geocentric position of the model.

virtual void makVrf::DtSymbolTracker::modelAboutToBeDestroyed ( makVrv::DtModel )
virtual

Called when a model is destroyed, removes from internal lists.

virtual void makVrf::DtSymbolTracker::tickTrackedItems ( )
virtual

Updates items that are currently tracked regardless of time slick.

virtual void makVrf::DtSymbolTracker::checkTracked ( )
protectedvirtual

Checks tracks items.

For those that are no longer being tracked removes from tracked list and emits signal

virtual void makVrf::DtSymbolTracker::slot_simObjectEntryAboutToBeRemoved ( makVrv::DtSimObjectEntry e)
protectedvirtual

Called when an object is about to be removed, will remove this entity if the ID is being tracked.

virtual void makVrf::DtSymbolTracker::removeTrackedItem ( makVrv::DtElementID  )
protectedvirtual
virtual bool makVrf::DtSymbolTracker::watchModel ( makVrv::DtModel )
protectedvirtual
virtual void makVrf::DtSymbolTracker::slot_simStateAdded ( makVrv::DtSimObjectEntry e)
protectedvirtual

Called when a new state is added, if not being tracked, and the state is an entity state, then check to see if it can be tracked.

virtual void makVrf::DtSymbolTracker::reset ( TrackingMap )
protectedvirtual

Resets and clears the map that comes in for all states to be at NoUpdates.

virtual void makVrf::DtSymbolTracker::updateRateForRange ( makVrv::DtModel ,
double  range 
)
protectedvirtual

Updates rate for range. Within twice distance at 4 seconds. Greater than twice distance at 8 seconds.

virtual bool makVrf::DtSymbolTracker::checkAndRemove ( makVrv::DtElementID  id,
TrackingMap map 
) const
protectedvirtual

Checks to see if id is in list, and, if so, removes it and returns true.

virtual void makVrf::DtSymbolTracker::tick ( )
protectedvirtual

Updates the internal data for tracking and waiting given timers on each.

virtual makVrv::DtModel* makVrf::DtSymbolTracker::findModelFor ( makVrv::DtElementID  ) const
protectedvirtual

Finds the projected widget model on the PVD display. Used for tracking symbols.

virtual void makVrf::DtSymbolTracker::updateData ( TrackData data,
bool  tracked = false,
bool  force = false 
)
protectedvirtual

Checks data in the map, and, if time will update.

virtual void makVrf::DtSymbolTracker::checkWaiting ( )
protectedvirtual

Checks waiting list to see if any newly added items are ready to be checked.

virtual makVrv::DtElementID makVrf::DtSymbolTracker::simIdFromModel ( makVrv::DtModel ) const
protectedvirtual

Returns a simulation id from the model id.

Member Data Documentation

boost::signal<void (DtVector geocentricPosition, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedEntityState>*)> makVrf::DtSymbolTracker::signal_trackingEntity

Sent the first time an entity is being tracked.

Signals sent for entity tracking changes

boost::signal<void (DtVector geocentricPosition, const makVrv::DtStateView<makVrv::DtVrlinkSimulatedEntityState>*)> makVrf::DtSymbolTracker::signal_trackingEntityUpdated

Sent when a tracked entity is updated.

boost::signal<void (makVrv::DtElementID)> makVrf::DtSymbolTracker::signal_stoppedTrackingEntity

Sent when a track entity is stopped from being tracked.

boost::signal<void ()> makVrf::DtSymbolTracker::signal_suspended

Signal when suspended.

makVrv::DtDe& makVrf::DtSymbolTracker::myDe
protected
std::vector<DtVector> makVrf::DtSymbolTracker::myLinePoints
protected
double makVrf::DtSymbolTracker::myRange
protected
makVrv::DtSignalConnectionManager makVrf::DtSymbolTracker::myConnectionManager
protected
TrackData makVrf::DtSymbolTracker::myTrackingMap
protected
TrackData makVrf::DtSymbolTracker::myAt4s
protected
TrackData makVrf::DtSymbolTracker::myAt8s
protected
TrackData makVrf::DtSymbolTracker::myWaiting
protected
DtTimedSection makVrf::DtSymbolTracker::myLastMovement
protected
int makVrf::DtSymbolTracker::myLastMovementTime
protected
bool makVrf::DtSymbolTracker::mySuspended
protected
bool makVrf::DtSymbolTracker::mySuspendedByMovement
protected
bool makVrf::DtSymbolTracker::mySuspendForMovement
protected
makVrv::DtCoordinateSystem& makVrf::DtSymbolTracker::myCoordinateSystem
protected
std::map<makVrv::DtElementID, bool> makVrf::DtSymbolTracker::myMadeConnection
protected
std::map<makVrv::DtModel*, makVrv::DtElementID> makVrf::DtSymbolTracker::myModelToSimIdMap
protected
double makVrf::DtSymbolTracker::myDistanceMoveTolerance
protected
makVrv::DtUniqueID makVrf::DtSymbolTracker::myAlwaysTrack
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)