#include <Simulation/path.h>
Inheritance diagram for Path:

Public Types | |
| enum | Error { INIT_ERROR, RESULT_PAST_PATH, RESULT_BEHIND_PATH, NOT_ON_PATH, PROTECTION_FAULT, INVALID_COORD } |
| Special Path Errors. More... | |
Public Member Functions | |
| void | Step (Point &in_pt, const double delta) const |
| Step displaces in_pt delta distance along the path. | |
| virtual void | Jump (Point &in_pt, const double dist) const |
| Jump displaces in_pt to a point on the path that is delta distance away in 3 space. | |
| void | Reduce (const double dist, LineContext *lc_array) |
| Optimize the SAMPLE representation of the path. | |
| virtual void | Splice (const double begin, const double end) |
| Clip path to subsection as per length coordinates. | |
| virtual double | Length (void) const |
| the length of the path | |
| virtual double | Curvature (void) const |
| measure of path's curvature; integration of the 2nd derivative | |
| virtual LineContext * | ClosestDistance (LineContext *lc_array) const |
| find the distance to the obstacle closest to the path | |
| virtual Intersection | Collide (const double radius, LineContext *lc_array) const |
| see if any obstacle is within a certain distance of the path | |
| virtual double | GetDistance (const Path &path, Point &ret1, Point &ret2) const |
| determine the closest distance between two paths | |
| void | SetProtectedLength (const double len) |
| protect the path range [0..len] from any mutations | |
| virtual Point | ProjectPoint (const Vector &p) const |
| find point on path closest to p | |
| virtual Point | GetPoint (const Vector &p) const |
| retrieve point on path | |
| virtual Point | GetPoint (const double d) const |
| retrieve point on path | |
| Point | operator[] (const double s) const |
| retrieve point on path | |
| Point | operator[] (const Vector &v) const |
| retrieve point on path | |
| virtual Vector | Tangent (const Point &p) const |
| retrieve tangent of a path point given 3D position | |
| virtual Vector | Tangent (const double d) const |
| retrieve tangent of a path point given path coordinate | |
| void | AddSample (const Vector &pos) |
| append a sample to the path; note that this connects pos to the current end of the path | |
| Path & | operator+= (const Vector &v) |
| operator version of AddSample | |
| Path & | operator+= (const Path &app) |
| much like AddSample, but adds an entire path at once | |
| Path | operator+ (const Path &app) const |
| much like AddSample, but adds an entire path at once | |
| virtual Path | Subsection (const double begin, const double end) const |
| similar to Splice, except does not modify parent path | |
| void | Render (const double color[]) const |
| draw the path's samples with the desired color (RGBA) | |
| void | Render (void) const |
| render the path's samples with the path's default color | |
| virtual ConStruct | ToConstruct () const |
| archives the path in a ConStruct and outputs to a file | |
| void | SetColor (const Vector &color, double opacity) |
| set the path's color | |
| virtual Path | Clone (void) const |
| Explicitly copy data to new Path, instead of just getting a reference. | |
| Path () | |
| constructs empty path | |
| Path (const Path &path) | |
| copy constructor | |
| Path (const ConStruct &con) | |
| constructs path from ConStruct data | |
| virtual | ~Path () |
| destructor | |
Static Public Member Functions | |
| static Path | Combine (const Path &p1, const Path &p2) |
| appends the list of SAMPLES in p2 to the SAMPLES in p1 | |
Static Public Attributes | |
| static const double | BEGIN = 0. |
| specifies the beginning of the path in path coordinates | |
| static const double | END = -1. |
| specifies the end of the path in path coordinates | |
Protected Attributes | |
| double | fixed_length |
| prevents mutation of path from [0..fixed_length] | |
| Samples * | samples |
| pointer to the path's data | |
Classes | |
| class | Point |
| an estimate of a sample on a path More... | |
| struct | Samples |
| all relevant path data; in a struct to make reference counting easier More... | |
For descendents of Path, the POINT ACQUISITION functions *should* guarantee that they will return an accurate estimate on the path. In the case of Path, it returns an interpolated point.
Path will throw two kinds of exceptions: regular Construct Errors and special Path Errors.
|
|
|
append a sample to the path; note that this connects pos to the current end of the path
|
|
|
Explicitly copy data to new Path, instead of just getting a reference.
|
|
|
find the distance to the obstacle closest to the path
|
|
||||||||||||
|
see if any obstacle is within a certain distance of the path
|
|
||||||||||||
|
appends the list of SAMPLES in p2 to the SAMPLES in p1
|
|
||||||||||||||||
|
determine the closest distance between two paths
|
|
|
retrieve point on path
|
|
|
retrieve point on path
|
|
||||||||||||
|
Jump displaces in_pt to a point on the path that is delta distance away in 3 space.
|
|
|
much like AddSample, but adds an entire path at once
|
|
|
much like AddSample, but adds an entire path at once
|
|
|
operator version of AddSample
|
|
|
retrieve point on path
|
|
|
retrieve point on path
|
|
|
find point on path closest to p
|
|
||||||||||||
|
Optimize the SAMPLE representation of the path.
|
|
|
draw the path's samples with the desired color (RGBA)
|
|
||||||||||||
|
set the path's color
|
|
|
protect the path range [0..len] from any mutations
|
|
||||||||||||
|
Clip path to subsection as per length coordinates.
|
|
||||||||||||
|
Step displaces in_pt delta distance along the path.
|
|
||||||||||||
|
similar to Splice, except does not modify parent path
|
|
|
retrieve tangent of a path point given path coordinate
|
|
|
retrieve tangent of a path point given 3D position
|
|
|
archives the path in a ConStruct and outputs to a file
|
1.4.3-20050530