#include <GeometryHandlers.h>

Public Types | |
| enum | EGeomType { SPHERE = dSphereClass, BOX = dBoxClass, CAPSULE = dCapsuleClass, CYLINDER = dCylinderClass, PLANE = dPlaneClass, RAY = dRayClass, CONVEX = dConvexClass, TRANSFORM = dGeomTransformClass, MESH = dTriMeshClass, HEIGHT_FIELD = dHeightfieldClass, USER1 = dFirstUserClass } |
| Geom types (builtin or user classes). More... | |
| enum | EBodyADOverride { AD_NO_OVERRIDE = 0, AD_FLAG = 0x01, AD_LINEAR = 0x02, AD_ANGULAR = 0x04, AD_STEPS = 0x08, AD_TIME = 0x10, AD_SAMPLES_COUNT = 0x20 } |
| Flags to say which param to override when attaching a body to a geom. More... | |
Public Member Functions | |
| GeometryHandler () | |
| virtual EGeomType | type () const =0 |
| virtual GeometryHandler * | clone () const =0 |
Auto-disable hints | |
The reason for auto-disable override hints is that some geoms need different parameters.
For exemple, when the body has remained a disable candidate for a certain number of steps (AutoDisableSteps), it is disabled. This is almost completely for boxes, which like to land and bounce up on two points, and teeter motionless for a few steps before falling back down. Round items generally need a much lower (like 1) AutoDisableSteps than boxes do (10+), 10 is the default. | |
| virtual UINT | getADOverrideFlag () |
| Gets the auto-disable override flag (default is no override - can be overloaded in derivates). The method returns which parameters can be overriden by the geometry. | |
| virtual bool | getADFlag () |
Returns true if the geometry can be auto-disabled. | |
| virtual dReal | getADLinearThreshold () |
| virtual dReal | getADAngularThreshold () |
| virtual UINT | getADSteps () |
| virtual dReal | getADTime () |
| virtual UINT | getADSamplesCount () |
Protected Member Functions | |
| virtual dGeomID | create (dSpaceID spaceId)=0 |
| virtual | ~GeometryHandler () |
| Protected destructor forces the object to be deleted by being dereferenced. | |
Protected Attributes | |
| dGeomID | id |
Friends | |
| class | Geom |
On-change callback | |
| The geometry handler can call functions on property change (Like the radius of the sphere, the length of the box, etc.
). | |
| osg::ref_ptr< GHChangeCallback > | pChangeCallback |
| void | addOrSetChangeCallback (GHChangeCallback *callback) |
) Geometry handlers are responsible for the geom creation (create() method), not their destruction ! They're a kind of factory. They also contain hints for body auto-disable feature (when a geom is attached to a body).
Definition at line 73 of file GeometryHandlers.h.
Flags to say which param to override when attaching a body to a geom.
Definition at line 80 of file GeometryHandlers.h.
Geom types (builtin or user classes).
Dev note : be careful about not defining too much classes. See dLastUserClass.
Definition at line 77 of file GeometryHandlers.h.
| Physics::GeometryHandler::GeometryHandler | ( | ) | [inline] |
Definition at line 90 of file GeometryHandlers.h.
| virtual Physics::GeometryHandler::~GeometryHandler | ( | ) | [inline, protected, virtual] |
Protected destructor forces the object to be deleted by being dereferenced.
Also avoids the object from beeing created on the stack.
Definition at line 124 of file GeometryHandlers.h.
| void Physics::GeometryHandler::addOrSetChangeCallback | ( | GHChangeCallback * | callback | ) | [inline] |
| virtual GeometryHandler* Physics::GeometryHandler::clone | ( | ) | const [pure virtual] |
| virtual dGeomID Physics::GeometryHandler::create | ( | dSpaceID | spaceId | ) | [protected, pure virtual] |
| virtual dReal Physics::GeometryHandler::getADAngularThreshold | ( | ) | [inline, virtual] |
| virtual bool Physics::GeometryHandler::getADFlag | ( | ) | [inline, virtual] |
Returns true if the geometry can be auto-disabled.
Definition at line 99 of file GeometryHandlers.h.
| virtual dReal Physics::GeometryHandler::getADLinearThreshold | ( | ) | [inline, virtual] |
| virtual UINT Physics::GeometryHandler::getADOverrideFlag | ( | ) | [inline, virtual] |
Gets the auto-disable override flag (default is no override - can be overloaded in derivates). The method returns which parameters can be overriden by the geometry.
Reimplemented in Physics::SphereHandler, and Physics::MeshHandler.
Definition at line 98 of file GeometryHandlers.h.
| virtual UINT Physics::GeometryHandler::getADSamplesCount | ( | ) | [inline, virtual] |
| virtual UINT Physics::GeometryHandler::getADSteps | ( | ) | [inline, virtual] |
Reimplemented in Physics::SphereHandler, and Physics::MeshHandler.
Definition at line 102 of file GeometryHandlers.h.
| virtual dReal Physics::GeometryHandler::getADTime | ( | ) | [inline, virtual] |
Definition at line 103 of file GeometryHandlers.h.
| virtual EGeomType Physics::GeometryHandler::type | ( | ) | const [pure virtual] |
Implemented in Physics::SphereHandler, Physics::BoxHandler, Physics::PlaneHandler, Physics::CylinderHandler, Physics::CapsuleHandler, Physics::RayHandler, Physics::HeightFieldHandler, and Physics::MeshHandler.
Referenced by C3DPhy::createPhysicsDebugView(), Physics::NearCallback::operator()(), and PhysicsDebugUpdateCB::operator()().
friend class Geom [friend] |
Definition at line 118 of file GeometryHandlers.h.
dGeomID Physics::GeometryHandler::id [mutable, protected] |
Definition at line 120 of file GeometryHandlers.h.
Referenced by Physics::HeightFieldHandler::create().
| osg::ref_ptr<GHChangeCallback> Physics::GeometryHandler::pChangeCallback |
Definition at line 112 of file GeometryHandlers.h.
Referenced by PhysicsDebugUpdateCB::operator()().
1.5.9