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

base::WaypointPathRep Class Reference

Concrete path representation as a sequence of 'waypoints' (including orientation). More...

Inheritance diagram for base::WaypointPathRep:

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

Collaboration graph
[legend]
List of all members.

Public Member Functions

 WaypointPathRep (const array< Point3 > &points, const array< Orient > &orients)
virtual Objectclone () const
virtual String className () const
virtual Point3 position (Real s) const
 get cartesian position at s:[0..1]

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

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

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

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

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

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

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

virtual bool isSameKindAs (const ReferencedObject &) const
virtual bool isSameKindAs (const Object &) const
void reference () const
bool unreference () const
const int referenceCount () const
void enableOnUnreferenceCall (bool enabled)
virtual void onUnreference () const

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 Types

enum  Flags { None = 0, ConstPos = 1, ConstOrient = 2 }

Protected Member Functions

 WaypointPathRep ()
 WaypointPathRep (const array< Point3 > &points, const array< Orient > &orients, array< Real > si, Int flags)
virtual void computeSis ()
Int findIndex (Real s) const
 find the closest index into points/orients before s


Protected Attributes

array< Point3points
array< Orientorients
array< Realsi
 value of s:[0..1] corresponding to each waypoint.

Int flags
int _refCount
bool onUnreferenceEnabled

Friends

class Serializable::SerializableDerivedInstantiator< WaypointPathRep >

Detailed Description

Concrete path representation as a sequence of 'waypoints' (including orientation).

Definition at line 36 of file WaypointPathRep.


Member Enumeration Documentation

enum base::WaypointPathRep::Flags [protected]
 

Enumeration values:
None 
ConstPos 
ConstOrient 

Definition at line 74 of file WaypointPathRep.


Constructor & Destructor Documentation

base::WaypointPathRep::WaypointPathRep const array< Point3 > &  points,
const array< Orient > &  orients
[inline]
 

Definition at line 39 of file WaypointPathRep.

References computeSis().

base::WaypointPathRep::WaypointPathRep  )  [inline, protected]
 

Definition at line 76 of file WaypointPathRep.

Referenced by clone().

base::WaypointPathRep::WaypointPathRep const array< Point3 > &  points,
const array< Orient > &  orients,
array< Real si,
Int  flags
[inline, protected]
 

Definition at line 77 of file WaypointPathRep.

References base::Int.


Member Function Documentation

virtual String base::WaypointPathRep::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::WaypointTrajectoryRep.

Definition at line 47 of file WaypointPathRep.

References base::String.

virtual Object& base::WaypointPathRep::clone  )  const [inline, virtual]
 

return a shallow copy, with Object& return type. Must be defined by derived classes.

Implements base::Cloneable.

Reimplemented in base::WaypointTrajectoryRep.

Definition at line 44 of file WaypointPathRep.

References NewObj, orients, points, si, and WaypointPathRep().

virtual void base::WaypointPathRep::computeSis  )  [protected, virtual]
 

compute si's using path length from start of path to waypoint i w.r.t. total path length (NB: for a path that has both constant position & orientation, si is unused/meaningless)

Reimplemented in base::WaypointTrajectoryRep.

Referenced by WaypointPathRep().

virtual Real base::WaypointPathRep::distinguishedValue Int  i  )  const [virtual]
 

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()

Reimplemented from base::PathRep.

void base::Referenced::enableOnUnreferenceCall bool  enabled  )  [inline, inherited]
 

If enabled, each call to unreference() will also call virtual method onUnreference()

Definition at line 115 of file Referenced.

References base::Referenced::onUnreferenceEnabled.

Int base::WaypointPathRep::findIndex Real  s  )  const [protected]
 

find the closest index into points/orients before s

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.

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

Definition at line 47 of file Object.

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

Definition at line 52 of file ReferencedObject.

virtual Int base::WaypointPathRep::numDistinguishedValues  )  const [virtual]
 

number of distinguished s values

Reimplemented from base::PathRep.

virtual void base::Referenced::onUnreference  )  const [inline, virtual, inherited]
 

Called by unreference() if enabled via enableOnUnreferenceCall(true). Typically overridden in subclasses that wish to know about unreference() calls - for example to handle manually breaking cyclic references

Reimplemented in robot::control::ControllableAdaptor::AdaptorControlInterface, and robot::control::ControllableAdaptor.

Definition at line 121 of file Referenced.

Referenced by base::Referenced::unreference().

virtual Orient base::WaypointPathRep::orientation Real  s  )  const [virtual]
 

get orientation at s:[0..1]

Implements base::PathRep.

virtual Point3 base::WaypointPathRep::position Real  s  )  const [virtual]
 

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

Implements base::PathRep.

void base::Referenced::reference  )  const [inline, inherited]
 

Increment the reference count by one, indicating that this object has another pointer which is referencing it.

Definition at line 65 of file Referenced.

References base::Referenced::_refCount.

const int base::Referenced::referenceCount  )  const [inline, inherited]
 

Return the number pointers currently referencing this object.

Definition at line 112 of file Referenced.

References base::Referenced::_refCount.

Referenced by robot::control::ControllableAdaptor::AdaptorControlInterface::onUnreference().

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.

virtual void base::WaypointPathRep::rotate const Quat4 r  )  [virtual]
 

rotate the path orientation by r

Implements base::PathRep.

virtual void base::WaypointPathRep::scalePosition Real  s  )  [virtual]
 

scale position coords. by s

Implements base::PathRep.

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

read or write object state to Serializer

Implements base::Serializable.

Reimplemented in base::WaypointTrajectoryRep.

virtual void base::WaypointPathRep::transform const Matrix4 m  )  [virtual]
 

transform the path by m

Implements base::PathRep.

virtual void base::WaypointPathRep::translate const Vector3 t  )  [virtual]
 

translate the path position by t

Implements base::PathRep.

bool base::Referenced::unreference  )  const [inline, inherited]
 

Decrement the reference count by one, indicating that a pointer to this object is referencing it. If the refence count goes to zero, it is assumed that this object is nolonger referenced and is automatically deleted.

Definition at line 81 of file Referenced.

References base::Referenced::_refCount, Exception, base::Referenced::onUnreference(), and base::Referenced::onUnreferenceEnabled.


Friends And Related Function Documentation

friend class Serializable::SerializableDerivedInstantiator< WaypointPathRep > [friend]
 

Definition at line 92 of file WaypointPathRep.


Member Data Documentation

int base::Referenced::_refCount [mutable, protected, inherited]
 

Definition at line 136 of file Referenced.

Referenced by base::Referenced::reference(), base::Referenced::referenceCount(), base::Referenced::Referenced(), base::Referenced::unreference(), and base::Referenced::~Referenced().

Int base::WaypointPathRep::flags [protected]
 

Definition at line 90 of file WaypointPathRep.

bool base::Referenced::onUnreferenceEnabled [protected, inherited]
 

Definition at line 137 of file Referenced.

Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference().

array<Orient> base::WaypointPathRep::orients [protected]
 

Definition at line 81 of file WaypointPathRep.

Referenced by clone().

array<Point3> base::WaypointPathRep::points [protected]
 

Definition at line 80 of file WaypointPathRep.

Referenced by clone().

array<Real> base::WaypointPathRep::si [protected]
 

value of s:[0..1] corresponding to each waypoint.

Definition at line 82 of file WaypointPathRep.

Referenced by clone().


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