Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

base::Path Class Reference

Inheritance diagram for base::Path:

Inheritance graph
[legend]
Collaboration diagram for base::Path:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }

Public Member Functions

 Path ()
 default path - all points are 0

 Path (const Path &p)
 copy path p

 Path (const Point3 &sp, const Orient &so, const Point3 &ep, const Orient &eo)
 simple line segment start[position|orientation] - end[position|orientation]

 Path (const array< Point3 > &points, const array< Orient > &orients=array< Orient >(), bool deltas=false)
 Path (const array< Vector > &points, bool deltas=false)
 Path (const ExpressionVector &p)
 arbitrary path defined by symbolic expressions for x,y,z,qx,qy,qz,qw in terms of s

virtual String className () const
Point3 position (Real s) const
 get cartesian position at s:[0..1]

Orient orientation (Real s) const
 get orientation at s:[0..1]

void resample (Int samples=100)
 discard distinguished points and replace them by 'samples' distingushed points over s=[0..1]

void resample (const Real dxmax)
 add distinguished points as necessary to ensure that distance between the positions of any pair of distinguished points is <= dxmax

const StringgetCoordFrame () const
void setCoordFrame (const String &coordFrame)
 set application defined coordinate frame specifier.

const StringgetUnits () const
void setUnits (const String &unitSpecifier)
 set application defined unit specifier.

Real distinguishedValue (Int i) const
Int numDistinguishedValues () const
 < number of distinguished s values

void translate (const Vector3 &t)
 translate the path position by t

void rotate (const Quat4 &r)
 rotate the path orientation by r

void transform (const Matrix4 &m)
 transform the path by m

void scalePosition (Real s)
 scale position coords. by s

virtual void serialize (Serializer &s)
 read or write object state to Serializer

virtual bool formatSupported (String format, Real version=1.0, ExternalizationType type=IO) const
 query if specific format is supported (for input, output or both)

virtual void externalize (Externalizer &e, String format="", Real version=1.0)
 read or write object state to Externalizer

virtual bool isSameKindAs (const Object &) const
virtual void externalize (Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

void load (ref< VFile > archive, const String &format="", Real version=1.0)
void save (ref< VFile > archive, const String &format="", Real version=1.0)

Static Public Member Functions

template<class BaseClass, class DerivedClass> void registerSerializableInstantiator (const SerializableInstantiator &instantiator)
void registerSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName, const SerializableInstantiator &instantiator)
template<class BaseClass> const SerializableInstantiator & getSerializableInstantiator (const String &derivedClassTypeName)
const SerializableInstantiator & getSerializableInstantiator (const String &baseClassTypeName, const String &derivedClassTypeName)

Protected Member Functions

virtual void create ()
virtual void create (const Path &p)
virtual void create (const Point3 &sp, const Orient &so, const Point3 &ep, const Orient &eo)
virtual void create (const array< Point3 > &points, const array< Orient > &orients, bool deltas)
virtual void create (const array< Vector > &points, bool deltas)
virtual void create (const ExpressionVector &p)
void init (const array< Point3 > &points, const array< Orient > &orients, bool deltas)

Protected Attributes

ref< PathReprep
 representation

String frame
 application defined coord. frame specifier

String units
 application defined unit specifier

Serializable::SerializableDerivedInstantiator<
LineSegPathRep
lineSegPathRepInstantiator
Serializable::SerializableDerivedInstantiator<
WaypointPathRep
waypointPathRepInstantiator

Friends

class Trajectory

Detailed Description

A Path specifies a bounded inifinite number of continous points in 6-space (cartesian position via Point3 and orientation via Orient). The points are expressed parametrically in terms of s:[0..1] over the path length.

Definition at line 50 of file Path.


Member Enumeration Documentation

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.


Constructor & Destructor Documentation

base::Path::Path  ) 
 

default path - all points are 0

base::Path::Path const Path p  ) 
 

copy path p

base::Path::Path const Point3 sp,
const Orient so,
const Point3 ep,
const Orient eo
 

simple line segment start[position|orientation] - end[position|orientation]

base::Path::Path const array< Point3 > &  points,
const array< Orient > &  orients = array< Orient >(),
bool  deltas = false
 

a set of 'waypoints' - actually points and their corresponding orientations. if deltas is true, the arrays are considered to specify the inter-waypoint deltas instead (with the first point/orient being 0)

base::Path::Path const array< Vector > &  points,
bool  deltas = false
 

a set of 'waypoints'. If vector dim is 3, specifies position only; dim 6, specifies position and orientation using the EulerRPY (roll, pitch, yaw) convention; dim 7 specifies position and orientation as a quaternion qx,qy,qz,qw. if deltas is true, the arrays are considered to specify the inter-waypoint deltas instead (with the first point/orient being 0)

base::Path::Path const ExpressionVector p  ) 
 

arbitrary path defined by symbolic expressions for x,y,z,qx,qy,qz,qw in terms of s


Member Function Documentation

virtual String base::Path::className  )  const [inline, virtual]
 

return the name of the object's class type. Must be defined by derived classes.

Implements base::Object.

Reimplemented in base::Trajectory, and gfx::VisualPath.

Definition at line 78 of file Path.

References base::String.

virtual void base::Path::create const ExpressionVector p  )  [protected, virtual]
 

Reimplemented in base::Trajectory.

virtual void base::Path::create const array< Vector > &  points,
bool  deltas
[protected, virtual]
 

Reimplemented in base::Trajectory.

virtual void base::Path::create const array< Point3 > &  points,
const array< Orient > &  orients,
bool  deltas
[protected, virtual]
 

Reimplemented in base::Trajectory.

virtual void base::Path::create const Point3 sp,
const Orient so,
const Point3 ep,
const Orient eo
[protected, virtual]
 

Reimplemented in base::Trajectory.

virtual void base::Path::create const Path p  )  [protected, virtual]
 

virtual void base::Path::create  )  [protected, virtual]
 

Reimplemented in base::Trajectory.

Real base::Path::distinguishedValue Int  i  )  const [inline]
 

some values of s may correspond to distinguished points along a path. the values s=0 and s=1 are always distinguished values. For example, if the path was specified using waypoints, then there will be a distinguished value of s for each waypoint. 0 <= i < numDistinguishedValues()

Definition at line 114 of file Path.

References base::Int, and base::Real.

virtual void base::Externalizable::externalize Externalizer e,
String  format = "",
Real  version = 1.0
const [virtual, inherited]
 

write object state to Externalizer (throws if e is in Input)

Reimplemented in physics::Box, physics::Capsule, physics::Cone, physics::Cylinder, physics::LODTerrain, physics::Polyhedron, physics::Sphere, robot::KinematicChain::Link, robot::KinematicChain, robot::ManipulatorDescription, robot::PlatformDescription, robot::RobotDescription, robot::sim::SimulatedManipulatorDescription, robot::sim::SimulatedRobotDescription, robot::sim::SimulatedSerialManipulator, robot::sim::SimulatedTool, and robot::ToolDescription.

virtual void base::Path::externalize Externalizer e,
String  format = "",
Real  version = 1.0
[virtual]
 

read or write object state to Externalizer

Implements base::Externalizable.

Reimplemented in base::Trajectory.

virtual bool base::Path::formatSupported String  format,
Real  version = 1.0,
ExternalizationType  type = IO
const [virtual]
 

query if specific format is supported (for input, output or both)

Implements base::Externalizable.

Reimplemented in base::Trajectory.

const String& base::Path::getCoordFrame  )  const [inline]
 

get application defined coordinate frame specifier. Some means of creating a Path provide a coordinate frame specifier. e.g. xml externalization this returns that string (or whatever was set via setCoordFrame() - defaults to the empty String)

Definition at line 95 of file Path.

References frame, and base::String.

const SerializableInstantiator& base::Serializable::getSerializableInstantiator const String baseClassTypeName,
const String derivedClassTypeName
[static, inherited]
 

template<class BaseClass>
const SerializableInstantiator& base::Serializable::getSerializableInstantiator const String derivedClassTypeName  )  [inline, static, inherited]
 

Definition at line 71 of file Serializable.

References base::String.

const String& base::Path::getUnits  )  const [inline]
 

get application defined unit specifier. Some means of creating a Path provide unit specifier. e.g. xml externalization this returns that string (or whatever was set via setUnits() - defaults to the empty String)

Definition at line 104 of file Path.

References base::String, and units.

void base::Path::init const array< Point3 > &  points,
const array< Orient > &  orients,
bool  deltas
[protected]
 

virtual bool base::Object::isSameKindAs const Object  )  const [inline, virtual, inherited]
 

Definition at line 47 of file Object.

void base::Externalizable::load ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

Int base::Path::numDistinguishedValues  )  const [inline]
 

< number of distinguished s values

Definition at line 116 of file Path.

References base::Int.

Orient base::Path::orientation Real  s  )  const [inline]
 

get orientation at s:[0..1]

Definition at line 84 of file Path.

References base::Real.

Point3 base::Path::position Real  s  )  const [inline]
 

get cartesian position at s:[0..1]

Definition at line 81 of file Path.

References base::Point3, and base::Real.

void base::Serializable::registerSerializableInstantiator const String baseClassTypeName,
const String derivedClassTypeName,
const SerializableInstantiator instantiator
[static, inherited]
 

template<class BaseClass, class DerivedClass>
void base::Serializable::registerSerializableInstantiator const SerializableInstantiator instantiator  )  [inline, static, inherited]
 

Definition at line 62 of file Serializable.

void base::Path::resample const Real  dxmax  ) 
 

add distinguished points as necessary to ensure that distance between the positions of any pair of distinguished points is <= dxmax

Reimplemented in base::Trajectory.

void base::Path::resample Int  samples = 100  ) 
 

discard distinguished points and replace them by 'samples' distingushed points over s=[0..1]

Reimplemented in base::Trajectory.

void base::Path::rotate const Quat4 r  )  [inline]
 

rotate the path orientation by r

Definition at line 123 of file Path.

void base::Externalizable::save ref< VFile archive,
const String format = "",
Real  version = 1.0
[inherited]
 

void base::Path::scalePosition Real  s  )  [inline]
 

scale position coords. by s

Definition at line 129 of file Path.

References base::Real.

virtual void base::Path::serialize Serializer s  )  [virtual]
 

read or write object state to Serializer

Implements base::Serializable.

Reimplemented in base::Trajectory.

void base::Path::setCoordFrame const String coordFrame  )  [inline]
 

set application defined coordinate frame specifier.

Definition at line 98 of file Path.

References frame, and base::String.

void base::Path::setUnits const String unitSpecifier  )  [inline]
 

set application defined unit specifier.

Definition at line 107 of file Path.

References base::String, and units.

void base::Path::transform const Matrix4 m  )  [inline]
 

transform the path by m

Definition at line 126 of file Path.

void base::Path::translate const Vector3 t  )  [inline]
 

translate the path position by t

Definition at line 120 of file Path.


Friends And Related Function Documentation

friend class Trajectory [friend]
 

Definition at line 156 of file Path.


Member Data Documentation

String base::Path::frame [protected]
 

application defined coord. frame specifier

Definition at line 147 of file Path.

Referenced by getCoordFrame(), and setCoordFrame().

Serializable::SerializableDerivedInstantiator<LineSegPathRep> base::Path::lineSegPathRepInstantiator [protected]
 

Definition at line 153 of file Path.

ref<PathRep> base::Path::rep [protected]
 

representation

Definition at line 146 of file Path.

String base::Path::units [protected]
 

application defined unit specifier

Definition at line 148 of file Path.

Referenced by getUnits(), and setUnits().

Serializable::SerializableDerivedInstantiator<WaypointPathRep> base::Path::waypointPathRepInstantiator [protected]
 

Definition at line 154 of file Path.


The documentation for this class was generated from the following file:
Generated on Thu Jul 29 16:38:55 2004 for OpenSim by doxygen 1.3.6