Artificial Intelligence
Public Types | Public Member Functions

OpenSteer::SegmentedPath Class Reference

#include <SegmentedPath.h>

Inheritance diagram for OpenSteer::SegmentedPath:
OpenSteer::Path OpenSteer::PolylineSegmentedPath

List of all members.

Public Types

typedef size_t size_type

Public Member Functions

virtual ~SegmentedPath ()=0
virtual size_type pointCount () const =0
virtual Vec3 point (size_type pointIndex) const =0
virtual size_type segmentCount () const =0
virtual float segmentLength (size_type segmentIndex) const =0
virtual Vec3 segmentStart (size_type segmentIndex) const =0
virtual Vec3 segmentEnd (size_type segmentIndex) const =0
virtual float mapPointToSegmentDistance (size_type segmentIndex, Vec3 const &point) const =0
virtual Vec3 mapSegmentDistanceToPoint (size_type segmentIndex, float segmentDistance) const =0
virtual Vec3 mapSegmentDistanceToTangent (size_type segmentIndex, float segmentDistance) const =0
virtual void mapDistanceToSegmentPointAndTangent (size_type segmentIndex, float distance, Vec3 &pointOnPath, Vec3 &tangent) const =0
virtual void mapPointToSegmentDistanceAndPointAndTangent (size_type segmentIndex, Vec3 const &point, float &distance, Vec3 &pointOnPath, Vec3 &tangent) const =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

Path build by segments between points on the path.


Member Typedef Documentation


Constructor & Destructor Documentation

OpenSteer::SegmentedPath::~SegmentedPath ( ) [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::Path::isCyclic ( ) const [pure virtual, inherited]

Returns true f the path is closed, otherwise false.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual bool OpenSteer::Path::isValid ( ) const [pure virtual, inherited]

Returns true if the path is valid, false otherwise.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual float OpenSteer::Path::length ( ) const [pure virtual, inherited]

Returns the length of the path.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual void OpenSteer::SegmentedPath::mapDistanceToSegmentPointAndTangent ( size_type  segmentIndex,
float  distance,
Vec3 pointOnPath,
Vec3 tangent 
) const [pure virtual]

Combines mapSegmentDistanceToPoint and mapSegmentDistanceToTangent.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::Path::mapPathDistanceToPoint ( float  pathDistance) const [pure virtual, inherited]

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::PolylineSegmentedPath.

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

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::PolylineSegmentedPath.

virtual float OpenSteer::Path::mapPointToPathDistance ( const Vec3 point) const [pure virtual, inherited]

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

Implemented in OpenSteer::PolylineSegmentedPath.

virtual float OpenSteer::SegmentedPath::mapPointToSegmentDistance ( size_type  segmentIndex,
Vec3 const &  point 
) const [pure virtual]

Maps point to the nearest point on the center line of segment segmentIndex and returns the distance from the segment start to this point.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual void OpenSteer::SegmentedPath::mapPointToSegmentDistanceAndPointAndTangent ( size_type  segmentIndex,
Vec3 const &  point,
float &  distance,
Vec3 pointOnPath,
Vec3 tangent 
) const [pure virtual]

Combines mapPointToSegmentDistance, mapSegmentDistanceToPoint, and mapSegmentDistanceToTangent.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::SegmentedPath::mapSegmentDistanceToPoint ( size_type  segmentIndex,
float  segmentDistance 
) const [pure virtual]

Maps segmentDistance to the center line of segment segmentIndex and returns the reached point.

If segmentDistance is greater or smaller than the segment length is is clamped to 0.0f or segmentLength().

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::SegmentedPath::mapSegmentDistanceToTangent ( size_type  segmentIndex,
float  segmentDistance 
) const [pure virtual]

Maps segmentDistance to the centerline of the segment segmentIndex and returns the tangent of the pathway at the reached point.

If segmentDistance is greater or smaller than the segment length is is clamped to 0.0f or segmentLength().

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::SegmentedPath::point ( size_type  pointIndex) const [pure virtual]

Returns the point pointIndex.

If the path is cyclic also the last point that is the duplicated first one is accessible.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual size_type OpenSteer::SegmentedPath::pointCount ( ) const [pure virtual]

Returns the number of points defining the segments.

This also includes the duplicated first point if the path is cyclic.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual size_type OpenSteer::SegmentedPath::segmentCount ( ) const [pure virtual]

Returns the number of segments that build the pathway.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::SegmentedPath::segmentEnd ( size_type  segmentIndex) const [pure virtual]

Returns the end point of segment segmentIndex.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual float OpenSteer::SegmentedPath::segmentLength ( size_type  segmentIndex) const [pure virtual]

Returns the length of segment segmentIndex.

Implemented in OpenSteer::PolylineSegmentedPath.

virtual Vec3 OpenSteer::SegmentedPath::segmentStart ( size_type  segmentIndex) const [pure virtual]

Returns the start point of the segment segmentIndex.

Implemented in OpenSteer::PolylineSegmentedPath.


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