VR-Forces 4.0.4 Class Documentation
Classes | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
makVrf::DtSymbolTracker Class Reference

Contains makVrf::DtSymbolTracker class. More...

List of all members.

Classes

class  MyTimeStatistic
struct  TrackData

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 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.

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::pair
< makVrv::DtModel *, const
makVrv::DtStateView
< makVrv::DtVrlinkSimulatedEntityState > * > 
TrackingData
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 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)
 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
makVrv::DtCoordinateSystemmyCoordinateSystem
std::map< makVrv::DtElementID,
bool
myMadeConnection
std::map< makVrv::DtModel
*, makVrv::DtElementID
myModelToSimIdMap

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


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 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.

Returns the geocentric position of the model.

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

virtual void makVrf::DtSymbolTracker::checkTracked ( ) [protected, virtual]

Checks tracks items.

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

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  ) [protected, virtual]
virtual void makVrf::DtSymbolTracker::slot_simStateAdded ( makVrv::DtSimObjectEntry e) [protected, virtual]

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 ) [protected, virtual]

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

virtual void makVrf::DtSymbolTracker::updateRateForRange ( makVrv::DtModel ,
double  range 
) [protected, virtual]

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 [protected, virtual]

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

virtual void makVrf::DtSymbolTracker::tick ( ) [protected, virtual]

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

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

virtual void makVrf::DtSymbolTracker::updateData ( TrackData data,
bool  tracked = false 
) [protected, virtual]

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

virtual void makVrf::DtSymbolTracker::checkWaiting ( ) [protected, virtual]

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

Returns a simulation id from the model id.


Member Data Documentation

Sent the first time an entity is being tracked.

Signals sent for entity tracking changes

Sent when a tracked entity is updated.

Sent when a track entity is stopped from being tracked.

Signal when suspended.

DtTimedSection makVrf::DtSymbolTracker::myLastMovement [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)