#include <collider.h>
Inheritance diagram for oxygen::Collider:
Public Types | |
enum | ECollisionType { CT_DIRECT, CT_SYMMETRIC } |
enumerates the two different collision instances reported to the OnCollision member for each collision reported from ODE. More... | |
Public Member Functions | |
Collider () | |
virtual | ~Collider () |
virtual void | OnCollision (boost::shared_ptr< Collider > collidee, dContact &contact, ECollisionType type) |
notifies the Collider that a collision with another geometry object has occured. | |
bool | AddCollisionHandler (const std::string &handlerName) |
registers a new collision handler to this collider. | |
dGeomID | GetODEGeom () |
returns the ID of managed ODE geom | |
virtual void | SetPosition (const salt::Vector3f &pos) |
sets the relative position of the managed geom directly. | |
virtual void | SetRotation (const salt::Matrix &rot) |
sets the relative orientation of the managed geom directly. | |
bool | Intersects (boost::shared_ptr< Collider > collider) |
returns true if the ODE geom managed by this Collider intersects with the geom managed by the given collider | |
Static Public Member Functions | |
static boost::shared_ptr< Collider > | GetCollider (dGeomID id) |
returns the Collider corresponding to the given ODE geom | |
Protected Member Functions | |
virtual void | OnLink () |
registers the managed geom to the Space of the Scene and to the associated ODE body | |
virtual void | OnUnlink () |
unregisters the managed geom from the Space of the Scene. | |
virtual void | PrePhysicsUpdateInternal (float deltaTime) |
registers a ContactJointHandler if no handler node was registered | |
Protected Attributes | |
dGeomID | mODEGeom |
the ode collision geometry |
Geoms are the fundamental objects in the collision system. They represent a single rigid shape as for example a sphere or a box. A special kind of geom called 'space' can represent a group of other geoms. A placeable geom can be associated with rigid body objects. This allows the collision engine to get the position and orientation of the geoms from the bodies. A body and a geom together represent all the properties of the simulated object.
Definition at line 43 of file collider.h.
|
enumerates the two different collision instances reported to the OnCollision member for each collision reported from ODE.
Definition at line 52 of file collider.h. |
|
Definition at line 33 of file collider.cpp. |
|
Definition at line 37 of file collider.cpp. References mODEGeom. |
|
registers a new collision handler to this collider. If no collision handler is registered until the first call to OnCollision a ContactJointHandler is automatically registered.
Definition at line 123 of file collider.cpp. References zeitgeist::Node::AddChildReference(), zeitgeist::Object::GetCore(), and zeitgeist::Object::GetLog(). Referenced by PrePhysicsUpdateInternal(). Here is the call graph for this function: ![]() |
|
returns the Collider corresponding to the given ODE geom
Definition at line 169 of file collider.cpp. References zeitgeist::Object::GetSelf(). Referenced by oxygen::Space::HandleCollide(). Here is the call graph for this function: ![]() |
|
returns the ID of managed ODE geom
Definition at line 118 of file collider.cpp. References mODEGeom. |
|
returns true if the ODE geom managed by this Collider intersects with the geom managed by the given collider
Definition at line 213 of file collider.cpp. References mODEGeom. |
|
notifies the Collider that a collision with another geometry object has occured. It is called from Space::HandleCollide. For the effects of a collision to be considered in the further simulation the Collider has to construct an ODE contact joint between the bodies associated to the affected geoms. This task among others is delegated to a set of CollisionHandler objects registered to a Collider.
Definition at line 141 of file collider.cpp. References CT_SYMMETRIC. |
|
registers the managed geom to the Space of the Scene and to the associated ODE body
Reimplemented from zeitgeist::Leaf. Definition at line 46 of file collider.cpp. References zeitgeist::Leaf::GetParent(), oxygen::ODEObject::GetSpaceID(), oxygen::BaseNode::GetWorldTransform(), mODEGeom, zeitgeist::Leaf::OnLink(), SetPosition(), and SetRotation(). Here is the call graph for this function: ![]() |
|
unregisters the managed geom from the Space of the Scene. The geom is removed from the body later within the destructor. Reimplemented from zeitgeist::Leaf. Definition at line 82 of file collider.cpp. References oxygen::ODEObject::GetSpaceID(), mODEGeom, and zeitgeist::Leaf::OnUnlink(). Here is the call graph for this function: ![]() |
|
registers a ContactJointHandler if no handler node was registered
Reimplemented from oxygen::BaseNode. Definition at line 106 of file collider.cpp. References AddCollisionHandler(), and zeitgeist::Node::GetChildSupportingClass(). Here is the call graph for this function: ![]() |
|
sets the relative position of the managed geom directly. If the geom is connected to a body, the position of the body will also be changed Reimplemented in oxygen::PlaneCollider. Definition at line 207 of file collider.cpp. References oxygen::BaseNode::GetWorldTransform(), and mODEGeom. Referenced by OnLink(). Here is the call graph for this function: ![]() |
|
sets the relative orientation of the managed geom directly. If the geom is connected to a body, the orientation of the body will also be changed Reimplemented in oxygen::PlaneCollider. Definition at line 200 of file collider.cpp. References oxygen::ODEObject::ConvertRotationMatrix(), and mODEGeom. Referenced by OnLink(). Here is the call graph for this function: ![]() |
|