MapLink Pro 11.1.1.0.
Envitia MapLink Pro: The Ultimate Mapping Application Toolkit
Loading...
Searching...
No Matches
TSLFlightPath Class Reference

Detailed Description

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 ()
 
TSLFlightPathoperator= (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
 

Constructor & Destructor Documentation

◆ TSLFlightPath() [1/2]

TSLFlightPath::TSLFlightPath ( TSL3DDrawingSurface * surface,
TSLTimeHelper const * timeHelper )

Constructor. Initialises the set of points with an empty collection.

Parameters
surfaceA pointer to a 3D drawing surface.
timeHelperThe current time helper.

◆ TSLFlightPath() [2/2]

TSLFlightPath::TSLFlightPath ( TSLFlightPath const & other)

Copy constructor.

◆ ~TSLFlightPath()

TSLFlightPath::~TSLFlightPath ( )

Destructor. Empties the collection of points.

Member Function Documentation

◆ addWayPoint()

void TSLFlightPath::addWayPoint ( TSLWayPoint const & wayPoint)

Add a waypoint.

Parameters
wayPointA (const) reference to the waypoint.

The waypoint is always added in sequence order. If another waypoint has the same sequence number, it is replaced.

◆ addWayPoints()

void TSLFlightPath::addWayPoints ( TSLWayPointSet const & points,
bool passThrough = true )

Adds a new set of waypoints to the path, replacing any previous set.

Parameters
pointsThe new set of waypoints.
passThroughIf true, then the actual flight path will pass through the waypoints. Default = true.

◆ empty()

bool TSLFlightPath::empty ( ) const

Returns true if no actual path points have been computed, false otherwise.

◆ flightPoint() [1/2]

TSLFlightPathPoint const * TSLFlightPath::flightPoint ( int N) const

Queries the flight path for the Nth point on the actual path.

Parameters
NThe index of the required point.
Returns
a pointer to the point, 0 if the index is out-of-bounds.

◆ flightPoint() [2/2]

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.

Parameters
timeThe given time.
tickIntervalThe current tick interval.
ptA reference to the point that will be be calculated for the given time.
calcTurnElevIf true, calculates the rate of turn and rate of change of altitude.
Returns
true if the point is on the path at the given time.

◆ operator=()

TSLFlightPath & TSLFlightPath::operator= ( TSLFlightPath const & rhs)

Assignment operator.

◆ passesThroughWayPoints()

bool TSLFlightPath::passesThroughWayPoints ( ) const
inline

Query method. Returns trus if the flight path passes through each waypoint.

◆ passThroughWayPoints()

void TSLFlightPath::passThroughWayPoints ( bool passThrough)

Tells the flight path whether it should pass through each waypoint or not.

Parameters
passThroughIf true, then the flight path will pass through each waypoint.

◆ removeWayPoint()

void TSLFlightPath::removeWayPoint ( int sequenceNumber)

Removes from the collection the waypoint with the given sequence number.

Parameters
sequenceNumberThe sequence number of the waypoint that is to be removed.

◆ removeWayPoints()

void TSLFlightPath::removeWayPoints ( )

Clears the current set of waypoints and flight path points.

◆ size()

int TSLFlightPath::size ( ) const

Returns the number of actual points in the path.

◆ wayPoints()

TSLWayPointSet const & TSLFlightPath::wayPoints ( ) const
inline

Returns a (const) reference to the path's set of points.