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

physics::ODESolidSystem Class Reference

Inheritance diagram for physics::ODESolidSystem:

Inheritance graph
[legend]
Collaboration diagram for physics::ODESolidSystem:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Int Attributes
typedef Int VisualType
enum  AttributeFlags {
  ShowAxes = 1, ShowBounds = 2, ShowCollisions = 4, ShowCollisionModel = 8,
  ShowCollisionDetection = 16, ShowEdges = 32, ShowNormals = 64, VerticesOnly = 128
}
typedef std::bitset< sizeof(Int)*8 CollidableFlags )
typedef Int CollidableFlag

Public Member Functions

 ODESolidSystem ()
 ODESolidSystem (const ODESolidSystem &ss)
virtual ~ODESolidSystem ()
virtual String className () const
virtual ref< SolidcreateSolid (ref< const Shape > shape, ref< const Material > material)
 create a new Solid

virtual ref< ConstraintGroupcreateConstraintGroup ()
 new ConstraintGroup

virtual ref< BallJointcreateBallJoint ()
 new Ball & Socket joint constraint

virtual ref< HingeJointcreateHingeJoint ()
 new Hinge joint constraint

virtual ref< DoubleHingeJointcreateDoubleHingeJoint ()
 new Double Hinge joint constraint

virtual ref< SliderJointcreateSliderJoint ()
 new Slider joint constraint

virtual ref< UniversalJointcreateUniversalJoint ()
 new Universal joint constraint

virtual ref< FixedConstraintcreateFixedConstraint ()
 new FixedConstraint

virtual ref< ContactConstraintcreateContactConstraint ()
 new ContactConstraint

virtual ref< MotorcreateMotor ()
 new Joint Motor

virtual void setGround (ref< Solid > ground, const Point3 &position)
 Set the ground Solid (which is fixed to the world frame and doesn't move from position).

virtual ref< SolidgetGround () const
 Get the ground Solid.

virtual void setGravity (const Vector3 &v)
 set acceleration due to gravity

virtual void addSolid (ref< Solid > solid)
 add solid to the system (Solid must be from createSolid()

virtual void removeSolid (ref< const Solid > solid)
 remove solid from the system

virtual void addConstraintGroup (ref< ConstraintGroup > group)
 add a constraint group to the system

virtual void removeConstraintGroup (ref< const ConstraintGroup > group)
 remove constraint group from the system

virtual void setCollidable (ref< Collidable > collidable)
virtual void setCollisionCuller (ref< CollisionCuller > collisionCuller)
 called to cull Collidables from collision detection

virtual ref< CollisionCullergetCollisionCuller () const
 get the current CollisionCuller

virtual void setCollisionDetector (ref< CollisionDetector > collisionDetector)
 called to detect collisions

virtual ref< CollisionDetectorgetCollisionDetector () const
 get the current CollisionDetector (or null if none)

virtual void setCollisionResponseHandler (ref< CollisionResponseHandler > collisionResponseHandler)
 called to handle collisions

virtual ref< CollisionResponseHandlergetCollisionResponseHandler () const
virtual void setParameter (const String &name, Real value)
 Set implementation specific parameters. Unknown names will throw a std::invald_argument exception.

virtual void preSimulate ()
virtual void simulateForSimTime (const base::Time &dt)
virtual bool visualTypeSupported (VisualType type) const
virtual osg::Node * createOSGVisual (Visual::Attributes visualAttributes=0) const
virtual ref< CollidablecreateCollidable (CollidableFlags flags=0)
virtual void reset ()
virtual void potentialCollision (ref< const Collidable > collidable1, ref< const Collidable > collidable2)
virtual void simulateForSimTime (const Time &dt)=0
void simulateForRealTime (const Time &dt, Real simTimeStepSize=minSimStepSize)
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 Attributes

const Real minSimStepSize
const Int OSGVisual = 1

Protected Types

typedef base::reflist< SolidSolids
typedef base::reflist< ConstraintGroupConstraintGroups
typedef std::pair< ref< const
Collidable >, ref< const Collidable > > 
CollidablePair
typedef array< CollidablePairPenetratingPairs
enum  CollisionListenMode { HandleCollisions, RecordInterpenetrations }

Protected Member Functions

void updateVisual () const

Protected Attributes

bool active
 if false, physics simulation or collision detection is performed

dWorldID worldID
 ODE's World ID.

Solids solids
ConstraintGroups constraintGroups
CollisionListenMode collisionListenMode
bool initialPenetrations
PenetratingPairs initiallyPenetratingPairs
ref< CollisionCullercollisionCuller
ref< CollisionDetectorcollisionDetector
ref< CollisionResponseHandlercollisionHandler
ref< Collidablecollidable
ref< Solidground
 the Solid ground (or 0)

dJointID groundJoint
 fixed joint that connects the ground Solid to the world frame.

bool preSimulateCalled
Visual::Attributes attributes
ref_ptr< osg::Group > node
int _refCount
bool onUnreferenceEnabled

Member Typedef Documentation

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

Definition at line 39 of file Visual.

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

typedef Int physics::CollidableProvider::CollidableFlag [inherited]
 

Definition at line 45 of file CollidableProvider.

typedef std::bitset<sizeof(Int)*8 physics::CollidableProvider::CollidableFlags) [inherited]
 

Definition at line 44 of file CollidableProvider.

typedef std::pair< ref<const Collidable>, ref<const Collidable> > physics::ODESolidSystem::CollidablePair [protected]
 

Definition at line 115 of file ODESolidSystem.

typedef base::reflist<ConstraintGroup> physics::ODESolidSystem::ConstraintGroups [protected]
 

Definition at line 109 of file ODESolidSystem.

typedef array<CollidablePair> physics::ODESolidSystem::PenetratingPairs [protected]
 

Definition at line 116 of file ODESolidSystem.

typedef base::reflist<Solid> physics::ODESolidSystem::Solids [protected]
 

Definition at line 106 of file ODESolidSystem.

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 physics::ODESolidSystem::CollisionListenMode [protected]
 

Enumeration values:
HandleCollisions 
RecordInterpenetrations 

Definition at line 112 of file ODESolidSystem.


Constructor & Destructor Documentation

physics::ODESolidSystem::ODESolidSystem  ) 
 

physics::ODESolidSystem::ODESolidSystem const ODESolidSystem ss  ) 
 

virtual physics::ODESolidSystem::~ODESolidSystem  )  [virtual]
 


Member Function Documentation

virtual void physics::ODESolidSystem::addConstraintGroup ref< ConstraintGroup group  )  [virtual]
 

add a constraint group to the system

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::addSolid ref< Solid solid  )  [virtual]
 

add solid to the system (Solid must be from createSolid()

Implements physics::SolidSystem.

virtual String physics::ODESolidSystem::className  )  const [inline, virtual]
 

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

Implements base::Object.

Definition at line 47 of file ODESolidSystem.

virtual ref<BallJoint> physics::ODESolidSystem::createBallJoint  )  [virtual]
 

new Ball & Socket joint constraint

Implements physics::SolidSystem.

virtual ref<Collidable> physics::ODESolidSystem::createCollidable CollidableFlags  flags = 0  )  [virtual]
 

Implements physics::CollidableProvider.

virtual ref<ConstraintGroup> physics::ODESolidSystem::createConstraintGroup  )  [virtual]
 

new ConstraintGroup

Implements physics::SolidSystem.

virtual ref<ContactConstraint> physics::ODESolidSystem::createContactConstraint  )  [virtual]
 

new ContactConstraint

Implements physics::SolidSystem.

virtual ref<DoubleHingeJoint> physics::ODESolidSystem::createDoubleHingeJoint  )  [virtual]
 

new Double Hinge joint constraint

Implements physics::SolidSystem.

virtual ref<FixedConstraint> physics::ODESolidSystem::createFixedConstraint  )  [virtual]
 

new FixedConstraint

Implements physics::SolidSystem.

virtual ref<HingeJoint> physics::ODESolidSystem::createHingeJoint  )  [virtual]
 

new Hinge joint constraint

Implements physics::SolidSystem.

virtual ref<Motor> physics::ODESolidSystem::createMotor  )  [virtual]
 

new Joint Motor

Implements physics::SolidSystem.

virtual osg::Node* physics::ODESolidSystem::createOSGVisual Visual::Attributes  visualAttributes = 0  )  const [virtual]
 

Reimplemented from gfx::Visual.

virtual ref<SliderJoint> physics::ODESolidSystem::createSliderJoint  )  [virtual]
 

new Slider joint constraint

Implements physics::SolidSystem.

virtual ref<Solid> physics::ODESolidSystem::createSolid ref< const Shape shape,
ref< const Material material
[virtual]
 

create a new Solid

Implements physics::SolidSystem.

virtual ref<UniversalJoint> physics::ODESolidSystem::createUniversalJoint  )  [virtual]
 

new Universal joint constraint

Implements physics::SolidSystem.

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.

virtual ref<CollisionCuller> physics::ODESolidSystem::getCollisionCuller  )  const [virtual]
 

get the current CollisionCuller

Implements physics::SolidSystem.

virtual ref<CollisionDetector> physics::ODESolidSystem::getCollisionDetector  )  const [virtual]
 

get the current CollisionDetector (or null if none)

Implements physics::SolidSystem.

virtual ref<CollisionResponseHandler> physics::ODESolidSystem::getCollisionResponseHandler  )  const [virtual]
 

Implements physics::SolidSystem.

virtual ref<Solid> physics::ODESolidSystem::getGround  )  const [virtual]
 

Get the ground Solid.

Implements physics::SolidSystem.

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 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 void physics::ODESolidSystem::potentialCollision ref< const Collidable collidable1,
ref< const Collidable collidable2
[virtual]
 

Implements physics::PotentialCollisionListener.

virtual void physics::ODESolidSystem::preSimulate  )  [virtual]
 

Implements base::Simulatable.

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

virtual void physics::ODESolidSystem::removeConstraintGroup ref< const ConstraintGroup group  )  [virtual]
 

remove constraint group from the system

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::removeSolid ref< const Solid solid  )  [virtual]
 

remove solid from the system

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::reset  )  [virtual]
 

Reimplemented from physics::PotentialCollisionListener.

virtual void physics::ODESolidSystem::setCollidable ref< Collidable collidable  )  [inline, virtual]
 

Implements physics::SolidSystem.

Definition at line 73 of file ODESolidSystem.

virtual void physics::ODESolidSystem::setCollisionCuller ref< CollisionCuller collisionCuller  )  [virtual]
 

called to cull Collidables from collision detection

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::setCollisionDetector ref< CollisionDetector collisionDetector  )  [virtual]
 

called to detect collisions

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::setCollisionResponseHandler ref< CollisionResponseHandler collisionResponseHandler  )  [virtual]
 

called to handle collisions

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::setGravity const Vector3 v  )  [virtual]
 

set acceleration due to gravity

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::setGround ref< Solid ground,
const Point3 position
[virtual]
 

Set the ground Solid (which is fixed to the world frame and doesn't move from position).

Implements physics::SolidSystem.

virtual void physics::ODESolidSystem::setParameter const String &  name,
Real  value
[virtual]
 

Set implementation specific parameters. Unknown names will throw a std::invald_argument exception.

Reimplemented from physics::SolidSystem.

void base::Simulatable::simulateForRealTime const Time dt,
Real  simTimeStepSize = minSimStepSize
[inherited]
 

Reimplemented in base::Universe.

virtual void base::Simulatable::simulateForSimTime const Time dt  )  [pure virtual, inherited]
 

Implemented in base::Universe.

virtual void physics::ODESolidSystem::simulateForSimTime const base::Time dt  )  [virtual]
 

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.

void physics::ODESolidSystem::updateVisual  )  const [protected]
 

virtual bool physics::ODESolidSystem::visualTypeSupported VisualType  type  )  const [inline, virtual]
 

Reimplemented from gfx::Visual.

Definition at line 91 of file ODESolidSystem.


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

bool physics::ODESolidSystem::active [protected]
 

if false, physics simulation or collision detection is performed

Definition at line 102 of file ODESolidSystem.

Visual::Attributes physics::ODESolidSystem::attributes [mutable, protected]
 

Definition at line 131 of file ODESolidSystem.

ref<Collidable> physics::ODESolidSystem::collidable [protected]
 

Definition at line 123 of file ODESolidSystem.

ref<CollisionCuller> physics::ODESolidSystem::collisionCuller [protected]
 

Definition at line 119 of file ODESolidSystem.

ref<CollisionDetector> physics::ODESolidSystem::collisionDetector [protected]
 

Definition at line 120 of file ODESolidSystem.

ref<CollisionResponseHandler> physics::ODESolidSystem::collisionHandler [protected]
 

Definition at line 121 of file ODESolidSystem.

CollisionListenMode physics::ODESolidSystem::collisionListenMode [protected]
 

Definition at line 113 of file ODESolidSystem.

ConstraintGroups physics::ODESolidSystem::constraintGroups [protected]
 

Definition at line 110 of file ODESolidSystem.

ref<Solid> physics::ODESolidSystem::ground [protected]
 

the Solid ground (or 0)

Definition at line 125 of file ODESolidSystem.

dJointID physics::ODESolidSystem::groundJoint [protected]
 

fixed joint that connects the ground Solid to the world frame.

Definition at line 126 of file ODESolidSystem.

PenetratingPairs physics::ODESolidSystem::initiallyPenetratingPairs [protected]
 

Definition at line 117 of file ODESolidSystem.

bool physics::ODESolidSystem::initialPenetrations [protected]
 

Definition at line 114 of file ODESolidSystem.

const Real base::Simulatable::minSimStepSize [static, inherited]
 

Definition at line 39 of file Simulatable.

ref_ptr<osg::Group> physics::ODESolidSystem::node [mutable, protected]
 

Definition at line 132 of file ODESolidSystem.

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

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

Definition at line 45 of file Visual.

bool physics::ODESolidSystem::preSimulateCalled [protected]
 

Definition at line 128 of file ODESolidSystem.

Solids physics::ODESolidSystem::solids [protected]
 

Definition at line 107 of file ODESolidSystem.

dWorldID physics::ODESolidSystem::worldID [protected]
 

ODE's World ID.

Definition at line 104 of file ODESolidSystem.


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