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

gfx::VisualPath Class Reference

Inheritance diagram for gfx::VisualPath:

Inheritance graph
[legend]
Collaboration diagram for gfx::VisualPath:

Collaboration graph
[legend]
List of all members.

Public Types

enum  ExternalizationType { Input = 1, Output = 2, IO = 3 }
typedef Int Attributes
typedef Int VisualType
enum  AttributeFlags {
  ShowAxes = 1, ShowBounds = 2, ShowCollisions = 4, ShowCollisionModel = 8,
  ShowCollisionDetection = 16, ShowEdges = 32, ShowNormals = 64, VerticesOnly = 128
}

Public Member Functions

 VisualPath ()
 default path - all points are 0

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

 VisualPath (const array< base::Point3 > &points, const array< base::Orient > &orients=array< base::Orient >())
 a set of 'waypoints' - actually points and their corresponding orientations

 VisualPath (const array< base::Vector > &points)
 VisualPath (const base::ExpressionVector &p)
 arbitrary path defined by symbolic expressions for x,y,z,qx,qy,qz,qw in terms of s

virtual String className () const
virtual bool visualTypeSupported (VisualType type) const
virtual osg::Node * createOSGVisual (Attributes visualAttributes=0) 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 String & getCoordFrame () const
void setCoordFrame (const String &coordFrame)
 set application defined coordinate frame specifier.

const String & getUnits () 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 void externalize (Externalizer &e, String format="", Real version=1.0) const
 write object state to Externalizer (throws if e is in Input)

virtual bool isSameKindAs (const Object &) const
void load (ref< VFile > archive, const String &format="", Real version=1.0)
void save (ref< VFile > archive, const String &format="", Real version=1.0)
virtual osg::Node * createOSGVisual (Visual::Attributes visualAttributes=0) 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)

Static Public Attributes

const Int OSGVisual = 1

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< PathRep > rep
 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

Member Typedef Documentation

typedef Int gfx::Visual::Attributes [inherited]
 

Definition at line 39 of file Visual.

Referenced by gfx::Visual::createOSGVisual().

typedef Int gfx::Visual::VisualType [inherited]
 

Definition at line 44 of file Visual.

Referenced by gfx::Visual::visualTypeSupported().


Member Enumeration Documentation

enum gfx::Visual::AttributeFlags [inherited]
 

Enumeration values:
ShowAxes 
ShowBounds 
ShowCollisions 
ShowCollisionModel 
ShowCollisionDetection 
ShowEdges 
ShowNormals 
VerticesOnly 

Definition at line 40 of file Visual.

enum base::Externalizable::ExternalizationType [inherited]
 

Enumeration values:
Input 
Output 
IO 

Definition at line 40 of file Externalizable.


Constructor & Destructor Documentation

gfx::VisualPath::VisualPath  )  [inline]
 

default path - all points are 0

Definition at line 43 of file VisualPath.

gfx::VisualPath::VisualPath const Path &  p  )  [inline]
 

Definition at line 46 of file VisualPath.

gfx::VisualPath::VisualPath const base::Point3 sp,
const base::Orient so,
const base::Point3 ep,
const base::Orient eo
[inline]
 

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

Definition at line 50 of file VisualPath.

References base::Point3.

gfx::VisualPath::VisualPath const array< base::Point3 > &  points,
const array< base::Orient > &  orients = array<base::Orient>()
[inline]
 

a set of 'waypoints' - actually points and their corresponding orientations

Definition at line 54 of file VisualPath.

gfx::VisualPath::VisualPath const array< base::Vector > &  points  )  [inline]
 

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.

Definition at line 60 of file VisualPath.

gfx::VisualPath::VisualPath const base::ExpressionVector p  )  [inline]
 

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

Definition at line 64 of file VisualPath.

References base::ExpressionVector.


Member Function Documentation

virtual String gfx::VisualPath::className  )  const [inline, virtual]
 

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

Reimplemented from base::Path.

Definition at line 67 of file VisualPath.

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

Reimplemented in base::Trajectory.

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

Reimplemented in base::Trajectory.

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

Reimplemented in base::Trajectory.

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

Reimplemented in base::Trajectory.

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

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

Reimplemented in base::Trajectory.

virtual osg::Node* gfx::Visual::createOSGVisual Visual::Attributes  visualAttributes = 0  )  const [inline, virtual, inherited]
 

Reimplemented in physics::GJKCollisionDetector, physics::OBBCollisionModel, physics::ODECollisionModel, physics::ODESolidSystem, physics::Solid, physics::SOLIDCollisionModel, and robot::sim::SimulatedBasicEnvironment.

Definition at line 49 of file Visual.

References gfx::Visual::Attributes, Logln, and NewObj.

virtual osg::Node* gfx::VisualPath::createOSGVisual Attributes  visualAttributes = 0  )  const [virtual]
 

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

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, inherited]
 

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, inherited]
 

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, inherited]
 

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 base::Path::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, inherited]
 

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 base::Path::units.

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

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, inherited]
 

< number of distinguished s values

Definition at line 116 of file Path.

References base::Int.

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

get orientation at s:[0..1]

Definition at line 84 of file Path.

References base::Real.

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

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  )  [inherited]
 

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  )  [inherited]
 

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, inherited]
 

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, inherited]
 

scale position coords. by s

Definition at line 129 of file Path.

References base::Real.

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

read or write object state to Serializer

Implements base::Serializable.

Reimplemented in base::Trajectory.

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

set application defined coordinate frame specifier.

Definition at line 98 of file Path.

References base::Path::frame, and base::String.

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

set application defined unit specifier.

Definition at line 107 of file Path.

References base::String, and base::Path::units.

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

transform the path by m

Definition at line 126 of file Path.

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

translate the path position by t

Definition at line 120 of file Path.

virtual bool gfx::VisualPath::visualTypeSupported VisualType  type  )  const [inline, virtual]
 

Reimplemented from gfx::Visual.

Definition at line 70 of file VisualPath.


Friends And Related Function Documentation

friend class Trajectory [friend, inherited]
 

Definition at line 156 of file Path.


Member Data Documentation

String base::Path::frame [protected, inherited]
 

application defined coord. frame specifier

Definition at line 147 of file Path.

Referenced by base::Path::getCoordFrame(), and base::Path::setCoordFrame().

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

Definition at line 153 of file Path.

const Int gfx::Visual::OSGVisual = 1 [static, inherited]
 

Definition at line 45 of file Visual.

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

representation

Definition at line 146 of file Path.

String base::Path::units [protected, inherited]
 

application defined unit specifier

Definition at line 148 of file Path.

Referenced by base::Path::getUnits(), and base::Path::setUnits().

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

Definition at line 154 of file Path.


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