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< Solid > | createSolid (ref< const Shape > shape, ref< const Material > material) |
create a new Solid | |
virtual ref< ConstraintGroup > | createConstraintGroup () |
new ConstraintGroup | |
virtual ref< BallJoint > | createBallJoint () |
new Ball & Socket joint constraint | |
virtual ref< HingeJoint > | createHingeJoint () |
new Hinge joint constraint | |
virtual ref< DoubleHingeJoint > | createDoubleHingeJoint () |
new Double Hinge joint constraint | |
virtual ref< SliderJoint > | createSliderJoint () |
new Slider joint constraint | |
virtual ref< UniversalJoint > | createUniversalJoint () |
new Universal joint constraint | |
virtual ref< FixedConstraint > | createFixedConstraint () |
new FixedConstraint | |
virtual ref< ContactConstraint > | createContactConstraint () |
new ContactConstraint | |
virtual ref< Motor > | createMotor () |
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< Solid > | getGround () 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< CollisionCuller > | getCollisionCuller () const |
get the current CollisionCuller | |
virtual void | setCollisionDetector (ref< CollisionDetector > collisionDetector) |
called to detect collisions | |
virtual ref< CollisionDetector > | getCollisionDetector () const |
get the current CollisionDetector (or null if none) | |
virtual void | setCollisionResponseHandler (ref< CollisionResponseHandler > collisionResponseHandler) |
called to handle collisions | |
virtual ref< CollisionResponseHandler > | getCollisionResponseHandler () 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< Collidable > | createCollidable (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< Solid > | Solids |
typedef base::reflist< ConstraintGroup > | ConstraintGroups |
typedef std::pair< ref< const Collidable >, ref< const Collidable > > | CollidablePair |
typedef array< CollidablePair > | PenetratingPairs |
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< CollisionCuller > | collisionCuller |
ref< CollisionDetector > | collisionDetector |
ref< CollisionResponseHandler > | collisionHandler |
ref< Collidable > | collidable |
ref< Solid > | ground |
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 |
|
Definition at line 39 of file Visual. Referenced by gfx::Visual::createOSGVisual(). |
|
Definition at line 45 of file CollidableProvider. |
|
Definition at line 44 of file CollidableProvider. |
|
Definition at line 115 of file ODESolidSystem. |
|
Definition at line 109 of file ODESolidSystem. |
|
Definition at line 116 of file ODESolidSystem. |
|
Definition at line 106 of file ODESolidSystem. |
|
Definition at line 44 of file Visual. Referenced by gfx::Visual::visualTypeSupported(). |
|
|
|
Definition at line 112 of file ODESolidSystem. |
|
|
|
|
|
|
|
add a constraint group to the system
Implements physics::SolidSystem. |
|
add solid to the system (Solid must be from createSolid()
Implements physics::SolidSystem. |
|
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. |
|
new Ball & Socket joint constraint
Implements physics::SolidSystem. |
|
Implements physics::CollidableProvider. |
|
new ConstraintGroup
Implements physics::SolidSystem. |
|
Implements physics::SolidSystem. |
|
new Double Hinge joint constraint
Implements physics::SolidSystem. |
|
new FixedConstraint
Implements physics::SolidSystem. |
|
new Hinge joint constraint
Implements physics::SolidSystem. |
|
Implements physics::SolidSystem. |
|
Reimplemented from gfx::Visual. |
|
new Slider joint constraint
Implements physics::SolidSystem. |
|
create a new Solid
Implements physics::SolidSystem. |
|
new Universal joint constraint
Implements physics::SolidSystem. |
|
If enabled, each call to unreference() will also call virtual method onUnreference() Definition at line 115 of file Referenced. References base::Referenced::onUnreferenceEnabled. |
|
get the current CollisionCuller
Implements physics::SolidSystem. |
|
get the current CollisionDetector (or null if none)
Implements physics::SolidSystem. |
|
Implements physics::SolidSystem. |
|
Get the ground Solid.
Implements physics::SolidSystem. |
|
|
|
Definition at line 52 of file ReferencedObject. |
|
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(). |
|
Implements physics::PotentialCollisionListener. |
|
Implements base::Simulatable. |
|
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. |
|
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(). |
|
remove constraint group from the system
Implements physics::SolidSystem. |
|
remove solid from the system
Implements physics::SolidSystem. |
|
Reimplemented from physics::PotentialCollisionListener. |
|
Implements physics::SolidSystem. Definition at line 73 of file ODESolidSystem. |
|
called to cull Collidables from collision detection
Implements physics::SolidSystem. |
|
called to detect collisions
Implements physics::SolidSystem. |
|
called to handle collisions
Implements physics::SolidSystem. |
|
set acceleration due to gravity
Implements physics::SolidSystem. |
|
Set the ground Solid (which is fixed to the world frame and doesn't move from position).
Implements physics::SolidSystem. |
|
Set implementation specific parameters. Unknown names will throw a std::invald_argument exception.
Reimplemented from physics::SolidSystem. |
|
Reimplemented in base::Universe. |
|
Implemented in base::Universe. |
|
|
|
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. |
|
|
|
Reimplemented from gfx::Visual. Definition at line 91 of file ODESolidSystem. |
|
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(). |
|
if false, physics simulation or collision detection is performed
Definition at line 102 of file ODESolidSystem. |
|
Definition at line 131 of file ODESolidSystem. |
|
Definition at line 123 of file ODESolidSystem. |
|
Definition at line 119 of file ODESolidSystem. |
|
Definition at line 120 of file ODESolidSystem. |
|
Definition at line 121 of file ODESolidSystem. |
|
Definition at line 113 of file ODESolidSystem. |
|
Definition at line 110 of file ODESolidSystem. |
|
the Solid ground (or 0)
Definition at line 125 of file ODESolidSystem. |
|
fixed joint that connects the ground Solid to the world frame.
Definition at line 126 of file ODESolidSystem. |
|
Definition at line 117 of file ODESolidSystem. |
|
Definition at line 114 of file ODESolidSystem. |
|
Definition at line 39 of file Simulatable. |
|
Definition at line 132 of file ODESolidSystem. |
|
Definition at line 137 of file Referenced. Referenced by base::Referenced::enableOnUnreferenceCall(), base::Referenced::Referenced(), and base::Referenced::unreference(). |
|
|
|
Definition at line 128 of file ODESolidSystem. |
|
Definition at line 107 of file ODESolidSystem. |
|
ODE's World ID.
Definition at line 104 of file ODESolidSystem. |