Class containing utility functions for analyzing the output of the DtRailObstructionFinder.
More...
Public Member Functions |
| | DtRailObstructionAnalyzer () |
| virtual | ~DtRailObstructionAnalyzer () |
| virtual void | setObstructionList (const std::list< DtRailObstructionPtr > &obstructionList) |
virtual const std::list
< DtRailObstructionPtr > & | obstructionList () const |
| virtual void | setRailStartOffset (double offset) |
| virtual double | railStartOffset () const |
| virtual void | setLastCalcHitTime (double hitTime) |
| virtual double | lastCalcHitTime () const |
| virtual void | setLastObstruction (DtRailObstructionPtr obs) |
| virtual DtRailObstructionPtr | lastObstruction () const |
| virtual void | setConvoyTarget (const DtUUID &convoyTarget) |
| virtual const DtUUID & | convoyTarget () const |
| virtual void | setVelocity (double velocity) |
| virtual double | velocity () const |
| virtual bool | closestObstructionInLane (int lane, const std::list< DtRailObstructionPtr > &obstructionList, DtRailObstructionPtr &obstruction, bool checkForwardOnly) const |
| | Finds the closest obstruction in the list that blocks the specified lane.
|
| virtual bool | firstHitObstructionInLane (int lane, double railVelocity, double railStartOffset, const std::list< DtRailObstructionPtr > &obstructionList, DtRailObstructionPtr &obstruction, double &hitTime) const |
| | Finds the first obstruction that will be hit in the specified lane, using the specified velocity along the rail.
|
| virtual bool | timeToHit (double railVelocity, double railStartOffset, const DtRailObstructionPtr &obstruction, double &hitTime) const |
Detailed Description
Class containing utility functions for analyzing the output of the DtRailObstructionFinder.
These functions are genreally entity centric.
Constructor & Destructor Documentation
| DtRailObstructionAnalyzer::DtRailObstructionAnalyzer |
( |
| ) |
|
| virtual DtRailObstructionAnalyzer::~DtRailObstructionAnalyzer |
( |
| ) |
|
|
virtual |
Member Function Documentation
| virtual void DtRailObstructionAnalyzer::setObstructionList |
( |
const std::list< DtRailObstructionPtr > & |
obstructionList | ) |
|
|
virtual |
| virtual void DtRailObstructionAnalyzer::setRailStartOffset |
( |
double |
offset | ) |
|
|
virtual |
| virtual double DtRailObstructionAnalyzer::railStartOffset |
( |
| ) |
const |
|
virtual |
| virtual void DtRailObstructionAnalyzer::setLastCalcHitTime |
( |
double |
hitTime | ) |
|
|
virtual |
| virtual double DtRailObstructionAnalyzer::lastCalcHitTime |
( |
| ) |
const |
|
virtual |
| virtual void DtRailObstructionAnalyzer::setConvoyTarget |
( |
const DtUUID & |
convoyTarget | ) |
|
|
virtual |
| virtual const DtUUID& DtRailObstructionAnalyzer::convoyTarget |
( |
| ) |
const |
|
virtual |
| virtual void DtRailObstructionAnalyzer::setVelocity |
( |
double |
velocity | ) |
|
|
virtual |
| virtual double DtRailObstructionAnalyzer::velocity |
( |
| ) |
const |
|
virtual |
Finds the closest obstruction in the list that blocks the specified lane.
- Parameters
-
| obstruction | The returned obstruction, if found. |
- Returns
- True if any obstruction is found.
- Note
- This function using the current positions of the obstructions, and does not take any obstruction velocities into account.
| virtual bool DtRailObstructionAnalyzer::firstHitObstructionInLane |
( |
int |
lane, |
|
|
double |
railVelocity, |
|
|
double |
railStartOffset, |
|
|
const std::list< DtRailObstructionPtr > & |
obstructionList, |
|
|
DtRailObstructionPtr & |
obstruction, |
|
|
double & |
hitTime |
|
) |
| const |
|
virtual |
Finds the first obstruction that will be hit in the specified lane, using the specified velocity along the rail.
This uses the positions and velocities of the obstructions in the list.
- Parameters
-
| obstruction | The returned obstruction. |
| hitTime | The amount of time before the collision would occur. |
| railVelocity | The velocity along the rail which the entity doing this check is traveling. |
| railStartOffset | The distance ahead from 0 on the rail that is considered part of the entity doing this check. Typically 0 is the entity center, so this is the half length of the entity. |
- Returns
- True if any obstruction is found.
| virtual bool DtRailObstructionAnalyzer::timeToHit |
( |
double |
railVelocity, |
|
|
double |
railStartOffset, |
|
|
const DtRailObstructionPtr & |
obstruction, |
|
|
double & |
hitTime |
|
) |
| const |
|
virtual |
Member Data Documentation
| double DtRailObstructionAnalyzer::myRailStartOffset |
|
private |
| double DtRailObstructionAnalyzer::myLastCalculatedHitTime |
|
private |
| double DtRailObstructionAnalyzer::myVelocity |
|
private |
| DtUUID DtRailObstructionAnalyzer::myConvoyTarget |
|
private |
The documentation for this class was generated from the following file: