OpenSim::ContactGeometry Class Reference

This class represents the physical shape of an object for use in contact modeling. More...

#include <ContactGeometry.h>

Inheritance diagram for OpenSim::ContactGeometry:
OpenSim::ModelComponent OpenSim::Object OpenSim::ContactHalfSpace OpenSim::ContactMesh OpenSim::ContactSphere

List of all members.

Public Member Functions

 ContactGeometry (const ContactGeometry &geom)
 ~ContactGeometry ()
void copyData (const ContactGeometry &geom)
virtual Objectcopy () const =0
 Construct and return a copy of this object.
const SimTK::Vec3 & getLocation () const
 Get the location of the geometry within the Body it is attached to.
void setLocation (const SimTK::Vec3 &location)
 Set the location of the geometry within the Body it is attached to.
const SimTK::Vec3 & getOrientation () const
 Get the orientation of the geometry within the Body it is attached to.
void setOrientation (const SimTK::Vec3 &orientation)
 Set the orientation of the geometry within the Body it is attached to.
const OpenSim::BodygetBody () const
 Get the Body this geometry is attached to.
OpenSim::BodygetBody ()
 Get the Body this geometry is attached to.
void setBody (OpenSim::Body &body)
 Set the Body this geometry is attached to.
const std::string & getBodyName ()
 Get the name of the Body this geometry is attached to.
void setBodyName (const std::string &name)
 Set the name of the Body this geometry is attached to.
virtual SimTK::ContactGeometry createSimTKContactGeometry ()=0
 Create a new SimTK::ContactGeometry based on this object.
SimTK::Transform getTransform ()
 Get a Transform representing the position and orientation of the geometry within the Body it is attached to.
void setup (Model &aModel)
 Perform setup functions that happen after the object has been deserialized or copied.
virtual void scale (const ScaleSet &aScaleSet)
 Scale a ContactGeometry based on XYZ scale factors for the bodies.
virtual const VisibleObjectgetDisplayer () const
virtual VisibleObjectupdDisplayer ()
virtual void updateGeometry ()

Protected Member Functions

 ContactGeometry ()
 Construct an empty ContactGeometry.
 ContactGeometry (const SimTK::Vec3 &location, const SimTK::Vec3 &orientation, OpenSim::Body &body)
 Construct a ContactGeometry.

Protected Attributes

Body_body
PropertyStr _bodyNameProp
std::string & _bodyName
PropertyDblVec3 _locationInBodyProp
SimTK::Vec3 & _locationInBody
PropertyDblVec3 _orientationInBodyProp
SimTK::Vec3 & _orientationInBody
VisibleObject _displayer

Detailed Description

This class represents the physical shape of an object for use in contact modeling.

It is an abstract class, with subclasses for particular geometric representations.

Author:
Peter Eastman

Constructor & Destructor Documentation

OpenSim::ContactGeometry::ContactGeometry (  )  [protected]

Construct an empty ContactGeometry.

This constructor is protected, and is used by subclasses.

OpenSim::ContactGeometry::ContactGeometry ( const SimTK::Vec3 &  location,
const SimTK::Vec3 &  orientation,
OpenSim::Body body 
) [protected]

Construct a ContactGeometry.

This constructor is protected, and is used by subclasses.

Parameters:
location the location of the geometry within the Body it is attached to
orientation the orientation of the geometry within the Body it is attached to
body the Body this geometry is attached to
OpenSim::ContactGeometry::ContactGeometry ( const ContactGeometry geom  ) 
OpenSim::ContactGeometry::~ContactGeometry (  ) 

Member Function Documentation

virtual Object* OpenSim::ContactGeometry::copy (  )  const [pure virtual]

Construct and return a copy of this object.

The object is allocated using the new operator, so the caller is responsible for deleting the returned object.

Returns:
Copy of this object.

Reimplemented from OpenSim::Object.

Implemented in OpenSim::ContactHalfSpace, OpenSim::ContactMesh, and OpenSim::ContactSphere.

void OpenSim::ContactGeometry::copyData ( const ContactGeometry geom  ) 
virtual SimTK::ContactGeometry OpenSim::ContactGeometry::createSimTKContactGeometry (  )  [pure virtual]

Create a new SimTK::ContactGeometry based on this object.

Implemented in OpenSim::ContactHalfSpace, OpenSim::ContactMesh, and OpenSim::ContactSphere.

Body & OpenSim::ContactGeometry::getBody (  ) 

Get the Body this geometry is attached to.

const Body & OpenSim::ContactGeometry::getBody (  )  const

Get the Body this geometry is attached to.

const std::string & OpenSim::ContactGeometry::getBodyName (  ) 

Get the name of the Body this geometry is attached to.

virtual const VisibleObject* OpenSim::ContactGeometry::getDisplayer (  )  const [inline, virtual]

Reimplemented from OpenSim::Object.

const Vec3 & OpenSim::ContactGeometry::getLocation (  )  const

Get the location of the geometry within the Body it is attached to.

const Vec3 & OpenSim::ContactGeometry::getOrientation (  )  const

Get the orientation of the geometry within the Body it is attached to.

SimTK::Transform OpenSim::ContactGeometry::getTransform (  ) 

Get a Transform representing the position and orientation of the geometry within the Body it is attached to.

void OpenSim::ContactGeometry::scale ( const ScaleSet aScaleSet  )  [virtual]

Scale a ContactGeometry based on XYZ scale factors for the bodies.

Parameters:
aScaleSet Set of XYZ scale factors for the bodies.
void OpenSim::ContactGeometry::setBody ( OpenSim::Body body  ) 

Set the Body this geometry is attached to.

void OpenSim::ContactGeometry::setBodyName ( const std::string &  name  ) 

Set the name of the Body this geometry is attached to.

This will cause the Body to be set to NULL, then resolved when setup() is called.

void OpenSim::ContactGeometry::setLocation ( const SimTK::Vec3 &  location  ) 

Set the location of the geometry within the Body it is attached to.

void OpenSim::ContactGeometry::setOrientation ( const SimTK::Vec3 &  orientation  ) 

Set the orientation of the geometry within the Body it is attached to.

void OpenSim::ContactGeometry::setup ( Model aModel  ) 

Perform setup functions that happen after the object has been deserialized or copied.

Parameters:
aModel OpenSim model containing this Joint.
virtual void OpenSim::ContactGeometry::updateGeometry (  )  [inline, virtual]
virtual VisibleObject* OpenSim::ContactGeometry::updDisplayer (  )  [inline, virtual]

Reimplemented from OpenSim::Object.


Member Data Documentation

std::string& OpenSim::ContactGeometry::_bodyName [protected]

The documentation for this class was generated from the following files:

Generated on Wed Dec 16 15:03:45 2009 for OpenSim by  doxygen 1.6.1