Artificial Intelligence
Public Member Functions

OpenSteer::Pathway Class Reference

#include <Pathway.h>

Inheritance diagram for OpenSteer::Pathway:
OpenSteer::SegmentedPathway OpenSteer::PolylineSegmentedPathwaySegmentRadii OpenSteer::PolylineSegmentedPathwaySingleRadius

List of all members.

Public Member Functions

virtual ~Pathway ()=0
virtual bool isValid () const =0
virtual Vec3 mapPointToPath (const Vec3 &point, Vec3 &tangent, float &outside) const =0
virtual Vec3 mapPathDistanceToPoint (float pathDistance) const =0
virtual float mapPointToPathDistance (const Vec3 &point) const =0
virtual bool isCyclic () const =0
virtual float length () const =0

Detailed Description

Pure virtual base class representing an abstract pathway in space. Could be used for example in path following.


Constructor & Destructor Documentation

OpenSteer::Pathway::~Pathway ( ) [pure virtual]

OpenSteer -- Steering Behaviors for Autonomous Characters

Copyright (c) 2002-2005, Sony Computer Entertainment America Original author: Craig Reynolds <craig_reynolds@playstation.sony.com>

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Author:
Bjoern Knafla <bknafla@uni-kassel.de>

Member Function Documentation

virtual bool OpenSteer::Pathway::isCyclic ( ) const [pure virtual]

Returns true f the path is closed, otherwise false.

Implemented in OpenSteer::PolylineSegmentedPathwaySegmentRadii, and OpenSteer::PolylineSegmentedPathwaySingleRadius.

virtual bool OpenSteer::Pathway::isValid ( ) const [pure virtual]

Returns true if the path is valid, false otherwise.

Implemented in OpenSteer::PolylineSegmentedPathwaySegmentRadii, and OpenSteer::PolylineSegmentedPathwaySingleRadius.

virtual float OpenSteer::Pathway::length ( ) const [pure virtual]
virtual Vec3 OpenSteer::Pathway::mapPathDistanceToPoint ( float  pathDistance) const [pure virtual]

Given a distance along the path, convert it to a point on the path. If isValid is false the behavior is undefined.

Implemented in OpenSteer::PolylineSegmentedPathwaySegmentRadii, and OpenSteer::PolylineSegmentedPathwaySingleRadius.

virtual Vec3 OpenSteer::Pathway::mapPointToPath ( const Vec3 point,
Vec3 tangent,
float &  outside 
) const [pure virtual]

Given an arbitrary point ("A"), returns the nearest point ("P") on this path center line. Also returns, via output arguments, the path tangent at P and a measure of how far A is outside the Pathway's "tube". Note that a negative distance indicates A is inside the Pathway.

If isValid is false the behavior is undefined.

Implemented in OpenSteer::PolylineSegmentedPathwaySegmentRadii, and OpenSteer::PolylineSegmentedPathwaySingleRadius.

virtual float OpenSteer::Pathway::mapPointToPathDistance ( const Vec3 point) const [pure virtual]

Given an arbitrary point, convert it to a distance along the path. If isValid is false the behavior is undefined.

Implemented in OpenSteer::PolylineSegmentedPathwaySegmentRadii, and OpenSteer::PolylineSegmentedPathwaySingleRadius.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines