head 1.4; access; symbols; locks; strict; comment @# @; 1.4 date 2002.09.07.01.50.36; author curt; state Exp; branches; next 1.3; 1.3 date 2002.08.31.19.01.51; author curt; state Exp; branches; next 1.2; 1.2 date 2002.08.31.18.53.59; author curt; state Exp; branches; next 1.1; 1.1 date 2002.02.15.17.21.55; author curt; state Exp; branches; next ; desc @@ 1.4 log @Updated doxygen docs. @ text @
Main Page Class Hierarchy Compound List File List Compound Members File Members

# SGRoute Class Reference

A class to manage a list of waypoints (i.e. More...

`#include <route.hxx>`

List of all members.

## Public Methods
| SGRoute ()
| Constructor.
| ~SGRoute ()
| Destructor.
void | clear ()
| Clear the entire route.
void | add_waypoint (const SGWayPoint &wp)
| Add a waypoint.
int | size () const
| Get the number of waypoints (i.e.
SGWayPoint | get_first () const
| Get the front waypoint.
SGWayPoint | get_current () const
| Get the current waypoint.
void | set_current (int n)
| Set the current waypoint.
void | increment_current ()
| Increment the current waypoint pointer.
SGWayPoint | get_waypoint (const int n) const
| Get the nth waypoint.
void | delete_first ()
| Delete the front waypoint.
double | distance_off_route (double x, double y) const
| Calculate perpendicular distance from the current route segment This routine assumes all points are laying on a flat plane and ignores the altitude (or Z) dimension.

## Detailed Description

A class to manage a list of waypoints (i.e.

a route).

Definition at line 50 of file route.hxx.

## Member Function Documentation

void SGRoute::add_waypoint | ( | const SGWayPoint & | wp | ) | `[inline]`

  | Add a waypoint. Parameters:
  wp | a waypoint
Definition at line 76 of file route.hxx. References SGWayPoint::CourseAndDistance(), and size().

double SGRoute::distance_off_route | ( | double | x,
|  | double | y
| ) | const

| Calculate perpendicular distance from the current route segment This routine assumes all points are laying on a flat plane and ignores the altitude (or Z) dimension. For most accurate results, use with CARTESIAN way points. Definition at line 46 of file route.cxx.

SGWayPoint SGRoute::get_current | ( |  | ) | const`[inline]`

| Get the current waypoint. Returns: the current waypoint Definition at line 110 of file route.hxx.

SGWayPoint SGRoute::get_first | ( |  | ) | const`[inline]`

| Get the front waypoint. Returns: the first waypoint. Definition at line 98 of file route.hxx.

SGWayPoint SGRoute::get_waypoint | ( | const int | n | ) | const`[inline]`

  | Get the nth waypoint. Parameters:
  n | waypoint number
Returns: the nth waypoint Definition at line 140 of file route.hxx.

void SGRoute::set_current | ( | int | n | ) | `[inline]`

  | Set the current waypoint. Parameters:
  number | of waypoint to make current.
Definition at line 122 of file route.hxx.

int SGRoute::size | ( |  | ) | const`[inline]`

| Get the number of waypoints (i.e. route length ) Returns: route length Definition at line 92 of file route.hxx. Referenced by add_waypoint().

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

- route.hxx
- route.cxx

@ 1.3 log @Oops, try again. @ text @d323 1 a323 1