![]() |
VR-Forces 4.6 Class Documentation
|
Public Member Functions | |
| DtRailSplineCalculator () | |
| virtual | ~DtRailSplineCalculator () |
| virtual bool | setUpTurnSpline (const DtRailSegment *currentSeg, const DtRailSegment *nextSeg, const int currentLane, const int desiredLane, Coordinate_System *coordinateSystem, bool useDefinedEntry=false, DtVector entryPt=DtVector::zero()) |
| Set up spline to achieve turning from one segment to another. Returns true if able to construct a spline. | |
| virtual bool | setUpLaneSwitchSpline (const DtVector &projectedLocation, const DtRailSegment *currentSeg, const double bvolHL, const int currentLane, const int desiredLane, Coordinate_System *coordinateSystem) |
| Set up spline to achieve a lane switch. | |
| virtual bool | recalculateSpline (const DtRailSegment *currentSeg, const DtRailSegment *nextSeg, const int currentLane, const int passingLane, const int previousSwitchDirection, Coordinate_System *coordinateSystem) |
| virtual bool | modifySpline (const DtVector ¤tLocalPos, const DtRailSegment *currentSeg, const DtRailSegment *nextSeg, const int currentLane, const int passingLane, Coordinate_System *coordinateSystem) |
| virtual void | calculateTurnPath (const DtVector &pathEntryPt, const DtVector &pathMidPt, const DtVector &pathExitPt) |
| generates the turn path needed to provide a smooth turn that connects the segments on the path. | |
| virtual DtVector | determinePositionAlongCurve (double distance) |
| If the entity is using turn smoothing and it is currently turning this will find where on the curve the entity is. | |
| virtual std::list< DtVector > | getCurvePoints () |
| Generate a set of about 10 points that lie along the spline from start to end. For debugging. | |
| virtual double | calculateTurnHeading (double oldHeading) |
| Starting from the old heading add the percentage of the difference covered given the spline time. | |
| virtual double | calculateLaneSwitchHeading (double oldHeading) |
| virtual bool | finishTurn (double oldHeading, double newHeading) |
| virtual bool | finishLaneSwitch (double oldHeading, double newHeading) |
| virtual const DtVector & | splineLocalEntryPoint () const |
| These are the generated local entry,mid, exit points for the spline transformed from the pathEntryPt,pathMidPt, pathExitPt supplied to the calculateTurnPath function. | |
| virtual const DtVector & | splineLocalMidPoint () const |
| virtual const DtVector & | splineLocalExitPoint () const |
| virtual const int | turnEntryLane () const |
| virtual void | setDrivingOnLeft (bool left) |
| virtual bool | drivingOnLeft () const |
| virtual void | setTurnDirection (const int dir) |
| These are set by the updater when setUpTurn is called to intialize the spline calculator. | |
| virtual const int | turnDirection () const |
| virtual void | setLocalToTopoTransform (const DtCoordTransform &transform) |
| virtual void | setTopoToLocalTransform (const DtCoordTransform &transform) |
| virtual void | clear () |
Protected Attributes | |
| double | myTotalSplineDistance |
| This is the distance along the current segment from turn entry point to end point plus the the distance along the next segment to the turn exit point. | |
| double | mySplineTime |
| Keeps track of the parametric time, where we are on the curve. | |
| double | myHeadingShift |
| This is the difference between our current heading and desired heading. | |
| int | myTurnDirection |
| Direction of the curve–going to left(-1) or right(1) | |
| int | myTurnEntryLane |
| Lane we use to enter the turn. | |
| bool | myDrivingOnLeft |
| Are we driving on the left or right side of the road. | |
| DtVector | myLocalEntryPoint |
| The points used to generate the spline in local coordinates. | |
| DtVector | myLocalMidPoint |
| DtVector | myLocalExitPoint |
| std::vector< DtVector > | mySplineCoefficents |
| The spline coefficents used to determine a position along a curve. | |
| DtCoordTransform | myLocalToTopoTransform |
| These aren't really topographic coordinate transforms; they transform to from a coordinate system that has xy in the horizontal plane (like topographic) but x oriented in the segment direction. | |
| DtCoordTransform | myTopoToLocalTransform |
Private Member Functions | |
| DtRailSplineCalculator (const DtRailSplineCalculator &orig) | |
| copy constructor | |
| DtRailSplineCalculator & | operator= (const DtRailSplineCalculator &orig) |
| assignment operator | |
| DtRailSplineCalculator::DtRailSplineCalculator | ( | ) |
|
virtual |
|
private |
copy constructor
|
virtual |
Set up spline to achieve turning from one segment to another. Returns true if able to construct a spline.
|
virtual |
Set up spline to achieve a lane switch.
|
virtual |
|
virtual |
|
virtual |
generates the turn path needed to provide a smooth turn that connects the segments on the path.
Uses 3 points in the intersection to generate a simple quadratic spline curve. Points are in whatever coordinate systems the supplied path points are in.
If the entity is using turn smoothing and it is currently turning this will find where on the curve the entity is.
|
virtual |
Generate a set of about 10 points that lie along the spline from start to end. For debugging.
Starting from the old heading add the percentage of the difference covered given the spline time.
|
virtual |
|
virtual |
These are the generated local entry,mid, exit points for the spline transformed from the pathEntryPt,pathMidPt, pathExitPt supplied to the calculateTurnPath function.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
These are set by the updater when setUpTurn is called to intialize the spline calculator.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
private |
assignment operator
|
protected |
This is the distance along the current segment from turn entry point to end point plus the the distance along the next segment to the turn exit point.
|
protected |
Keeps track of the parametric time, where we are on the curve.
|
protected |
This is the difference between our current heading and desired heading.
Used to determine the heading of the entity as it moves along the spline.
|
protected |
These aren't really topographic coordinate transforms; they transform to from a coordinate system that has xy in the horizontal plane (like topographic) but x oriented in the segment direction.
|
protected |
|
protected |
Direction of the curve–going to left(-1) or right(1)
|
protected |
Lane we use to enter the turn.
|
protected |
Are we driving on the left or right side of the road.
This affects how you set up the turn splines!
|
protected |
The points used to generate the spline in local coordinates.
|
protected |
|
protected |
|
protected |
The spline coefficents used to determine a position along a curve.