![]() |
MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
|
The class represents a path through 3D space. It takes the user-defined set of waypoints and creates a smooth interpolated path. By default, the path will pass through each waypoint. An alternative is for the path to treat the waypoints as control points and provide a smooth interpolation without necessarily going through each way point. To achieve this, call the method passThroughWayPoints() passing in false.
Public Member Functions | |
TSLFlightPath (TSL3DDrawingSurface *surface, TSLTimeHelper const *timeHelper) | |
TSLFlightPath (TSLFlightPath const &other) | |
~TSLFlightPath () | |
TSLFlightPath & | operator= (TSLFlightPath const &rhs) |
void | addWayPoint (TSLWayPoint const &wayPoint) |
void | addWayPoints (TSLWayPointSet const &points, bool passThrough=true) |
bool | empty () const |
bool | flightPoint (TSLTimeInstant const &time, TSLTimeInterval const &tickInterval, TSLFlightPathPoint &pt, bool calcTurnElev) const |
TSLFlightPathPoint const * | flightPoint (int N) const |
void | passThroughWayPoints (bool passThrough) |
void | removeWayPoint (int sequenceNumber) |
void | removeWayPoints () |
int | size () const |
bool | passesThroughWayPoints () const |
TSLWayPointSet const & | wayPoints () const |
TSLFlightPath::TSLFlightPath | ( | TSL3DDrawingSurface * | surface, |
TSLTimeHelper const * | timeHelper ) |
Constructor. Initialises the set of points with an empty collection.
surface | A pointer to a 3D drawing surface. |
timeHelper | The current time helper. |
TSLFlightPath::TSLFlightPath | ( | TSLFlightPath const & | other | ) |
Copy constructor.
TSLFlightPath::~TSLFlightPath | ( | ) |
Destructor. Empties the collection of points.
void TSLFlightPath::addWayPoint | ( | TSLWayPoint const & | wayPoint | ) |
Add a waypoint.
wayPoint | A (const) reference to the waypoint. |
The waypoint is always added in sequence order. If another waypoint has the same sequence number, it is replaced.
void TSLFlightPath::addWayPoints | ( | TSLWayPointSet const & | points, |
bool | passThrough = true ) |
Adds a new set of waypoints to the path, replacing any previous set.
points | The new set of waypoints. |
passThrough | If true, then the actual flight path will pass through the waypoints. Default = true. |
bool TSLFlightPath::empty | ( | ) | const |
Returns true if no actual path points have been computed, false otherwise.
TSLFlightPathPoint const * TSLFlightPath::flightPoint | ( | int | N | ) | const |
Queries the flight path for the Nth point on the actual path.
N | The index of the required point. |
bool TSLFlightPath::flightPoint | ( | TSLTimeInstant const & | time, |
TSLTimeInterval const & | tickInterval, | ||
TSLFlightPathPoint & | pt, | ||
bool | calcTurnElev ) const |
Queries the flight path for a point on the actual path for the given time.
time | The given time. |
tickInterval | The current tick interval. |
pt | A reference to the point that will be be calculated for the given time. |
calcTurnElev | If true, calculates the rate of turn and rate of change of altitude. |
TSLFlightPath & TSLFlightPath::operator= | ( | TSLFlightPath const & | rhs | ) |
Assignment operator.
|
inline |
Query method. Returns trus if the flight path passes through each waypoint.
void TSLFlightPath::passThroughWayPoints | ( | bool | passThrough | ) |
Tells the flight path whether it should pass through each waypoint or not.
passThrough | If true, then the flight path will pass through each waypoint. |
void TSLFlightPath::removeWayPoint | ( | int | sequenceNumber | ) |
Removes from the collection the waypoint with the given sequence number.
sequenceNumber | The sequence number of the waypoint that is to be removed. |
void TSLFlightPath::removeWayPoints | ( | ) |
Clears the current set of waypoints and flight path points.
int TSLFlightPath::size | ( | ) | const |
Returns the number of actual points in the path.
|
inline |
Returns a (const) reference to the path's set of points.