dtAI::WaypointPair Class Reference

A WaypointPair is used to represent a pair of waypoints where the path between them is traversable. More...

#include <waypointpair.h>

List of all members.

Public Member Functions

 WaypointPair (const Waypoint *pFrom, const Waypoint *pTo)
 constructor assigns the two waypoints, calculates slope and 2D Distance
 WaypointPair ()
virtual ~WaypointPair ()
osg::Vec3 ClosestPointTo (const osg::Vec3 &pPoint)
 returns the closest point to the path between these two waypoints, currently unused and unimplemented, but seems like it could be useful.
void Calculate3DDistance ()
 calculates distance between the two points
float Get3DDistance () const
void CalculateSlope ()
 Calculates the slope in the Z Plane.
float GetSlope () const
void SetFrom (const Waypoint *pWaypoint)
 Setters for the From and To waypoints if this is used remember to call Calculate2DDistance() and CalculateSlope().
void SetTo (const Waypoint *pWaypoint)
const WaypointGetWaypointFrom () const
 Getters for the waypoints.
const WaypointGetWaypointTo () const
const osg::Vec3 & GetFrom () const
 Getters that return a reference the the actual position just for convenience really.
const osg::Vec3 & GetTo () const


Detailed Description

A WaypointPair is used to represent a pair of waypoints where the path between them is traversable.

Also used as a helper for computing costs between waypoints.


Constructor & Destructor Documentation

dtAI::WaypointPair::WaypointPair ( const Waypoint pFrom,
const Waypoint pTo 
)

constructor assigns the two waypoints, calculates slope and 2D Distance

dtAI::WaypointPair::WaypointPair (  ) 

dtAI::WaypointPair::~WaypointPair (  )  [virtual]


Member Function Documentation

osg::Vec3 dtAI::WaypointPair::ClosestPointTo ( const osg::Vec3 &  pPoint  ) 

returns the closest point to the path between these two waypoints, currently unused and unimplemented, but seems like it could be useful.

void dtAI::WaypointPair::Calculate3DDistance (  ) 

calculates distance between the two points

float dtAI::WaypointPair::Get3DDistance (  )  const

void dtAI::WaypointPair::CalculateSlope (  ) 

Calculates the slope in the Z Plane.

float dtAI::WaypointPair::GetSlope (  )  const

void dtAI::WaypointPair::SetFrom ( const Waypoint pWaypoint  ) 

Setters for the From and To waypoints if this is used remember to call Calculate2DDistance() and CalculateSlope().

void dtAI::WaypointPair::SetTo ( const Waypoint pWaypoint  ) 

const Waypoint * dtAI::WaypointPair::GetWaypointFrom (  )  const

Getters for the waypoints.

const Waypoint * dtAI::WaypointPair::GetWaypointTo (  )  const

const osg::Vec3 & dtAI::WaypointPair::GetFrom (  )  const

Getters that return a reference the the actual position just for convenience really.

const osg::Vec3 & dtAI::WaypointPair::GetTo (  )  const


http://www.delta3d.org
2.0.0 generated 14 Feb 2008