Namespaces | |
namespace | Materials |
Contains constants defining physical materials. | |
Classes | |
class | AbstractGeom |
Abstract geom is a base class for two geom types : standard geoms (Geom) and spaces (Space). More... | |
class | Mass |
Wrapper for mass parameters. More... | |
class | Body |
Wrapper representnig physical bodies (roughly a mass with coordinates and velocity). More... | |
class | Contact |
Represents data of a contact between two geoms (special joint data). More... | |
class | Geom |
Enhanced wrapper for physical geometries. More... | |
class | GHChangeCallback |
Callback for GeometryHandler, used on property change. More... | |
class | GeometryHandler |
Abstract class for creation and manipulation of physical geometries (Spheres, boxes, etc. More... | |
class | UserGeomsInitializer |
Inizializes all user classes (Singleton). More... | |
class | SphereHandler |
GeometryHandler for spheres. More... | |
class | BoxHandler |
GeometryHandler for boxes. More... | |
class | PlaneHandler |
GeometryHandler for infinite planes. More... | |
class | CylinderHandler |
GeometryHandler for flat-ended cylinders aligned along Z-axis. More... | |
class | CapsuleHandler |
GeometryHandler for capsules (Capped cylinders) aligned along Z-axis. More... | |
class | RayHandler |
GeometryHandler for finite rays (Defines a ray aligned with the Z axis (up), starting at (0,0,0)). More... | |
class | HeightFieldHandler |
GeometryHandler for height fields. More... | |
class | MeshHandler |
GeometryHandler for meshes - Somewhat tested, quite stable, but still experimental. More... | |
class | JointFeedback |
Wrapper for force applied on joints. More... | |
class | Joint |
Wrapper for joints between bodies. More... | |
class | JointGroup |
Manages a set of joints. More... | |
class | SpaceTypeInfo |
Describes the type of a space (Simple, hash-map based, or quad-tree based), with specific parameters. More... | |
class | Space |
Space is a group of owned geoms, and a level of collision. More... | |
class | SurfaceParams |
Surface parameters can define a surface or the way two surfaces interact when in contact. More... | |
class | Visitor |
Visitor for physics that traverses hierarchies. More... | |
class | VisitorSmart |
Version of Visitor that includes methods to ensures that traversed bodies & joints will be visited only once. More... | |
class | NearCallback |
Callback for collisions, used by World, wrapping ODE functionalities. More... | |
class | World |
Wrapper representnig the physical world. More... | |
Typedefs | |
typedef std::map< const Body *, Body * > | TDuplicatedBodiesMap |
typedef std::pair< const Body *, Body * > | TDuplicatedBody |
Functions | |
void | dBodySetFiniteRotationAxis (dBodyID id, const osg::Vec3f &axis) |
osg::Vec3 | dBodyGetFiniteRotationAxisV (dBodyID id) |
void | dBodySetPosition (dBodyID id, const osg::Vec3 &pos) |
osg::Vec3 | dBodyGetPositionV (dBodyID id) |
void | dBodySetQuaternion (dBodyID id, const osg::Quat &quat) |
osg::Quat | dBodyGetQuaternionV (dBodyID id) |
void | dBodySetRotation (dBodyID id, const osg::Matrix &matrix) |
osg::Matrix | dBodyGetRotationV (dBodyID id, const osg::Matrix &matrix) |
void | dBodySetLinearVel (dBodyID id, const osg::Vec3 &vel) |
osg::Vec3 | dBodyGetLinearVelV (dBodyID id) |
void | dBodySetAngularVel (dBodyID id, const osg::Vec3 &angularVel) |
osg::Vec3 | dBodyGetAngularVelV (dBodyID id) |
void | dBodySetForce (dBodyID id, const osg::Vec3 &f) |
void | dBodySetTorque (dBodyID id, const osg::Vec3 &f) |
osg::Vec3 | dBodyGetForceV (dBodyID id) |
osg::Vec3 | dBodyGetTorqueV (dBodyID id) |
void | dBodyAddForce (dBodyID id, const osg::Vec3 &f) |
void | dBodyAddTorque (dBodyID id, const osg::Vec3 &f) |
void | dBodyAddRelForce (dBodyID id, const osg::Vec3 &f) |
void | dBodyAddRelTorque (dBodyID id, const osg::Vec3 &f) |
void | dBodyAddForceAtPos (dBodyID id, const osg::Vec3 &f, const osg::Vec3 &pos) |
void | dBodyAddForceAtRelPos (dBodyID id, const osg::Vec3 &f, const osg::Vec3 &pos) |
void | dBodyAddRelForceAtPos (dBodyID id, const osg::Vec3 &f, const osg::Vec3 &pos) |
void | dBodyAddRelForceAtRelPos (dBodyID id, const osg::Vec3 &f, const osg::Vec3 &pos) |
osg::Vec3 | dBodyGetRelPointPosV (dBodyID id, const osg::Vec3 &p) |
osg::Vec3 | dBodyGetPosRelPointV (dBodyID id, const osg::Vec3 &p) |
osg::Vec3 | dBodyVectorToWorldV (dBodyID id, const osg::Vec3 &p) |
osg::Vec3 | dBodyVectorFromWorldV (dBodyID id, const osg::Vec3 &p) |
osg::Vec3 | dBodyGetRelPointVelV (dBodyID id, const osg::Vec3 &p) |
osg::Vec3 | dBodyGetPointVelV (dBodyID id, const osg::Vec3 &p) |
template<typename _Pred > | |
void | combinedTraversal (AbstractGeom &a, AbstractGeom &b, _Pred &pred) |
Traverse all children of two AbstractGeom's simultaneously (Abstract geoms must have the same structure - ie. | |
template<typename _Pred > | |
void | combinedTraversal (const AbstractGeom &a, const AbstractGeom &b, _Pred &pred) |
graphVec3 | toGraphVec3 (const dReal *v) |
graphVec4 | toGraphVec4 (const dVector4 &v) |
void | toPhyVec3 (const graphVec3 &v, dVector3 out_ret) |
void | toPhyVec3 (const dReal &x, const dReal &y, const dReal &z, dVector3 out_ret) |
void | toPhyVec4 (const graphVec4 &v, dVector4 out_ret) |
void | toPhyVec4 (const dReal &x, const dReal &y, const dReal &z, const dReal &w, dVector3 out_ret) |
graphQuat | toGraphQuat (const dReal *v) |
void | toPhyQuat (const graphQuat &quat, dQuaternion &out_q) |
PVLE_EXPORT graphMat | toGraphMatInertia (const dReal *m) |
PVLE_EXPORT graphMat | toGraphMatRotation (const dReal *m) |
PVLE_EXPORT graphMat | toGraphMatRotationPosition (const dReal *m, const dReal *p) |
PVLE_EXPORT void | toPhyMatRotation (const graphMat &matrix, dMatrix3 &out_matrix) |
graphBB | toGraphBB (dReal *bb) |
void | toPhyBB (const graphBB &bb, dReal *out_bb) |
dReal | kmhToms (dReal v) |
Converts km/h to m/s. | |
dReal | msTokmh (dReal v) |
Converts m/s to km/h. | |
PVLE_EXPORT Geom * | createCanonicalBox (World *pPhyWorld, const osg::Vec3 &size=osg::Vec3(1, 1, 1), const float mass=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" box geom with a body. | |
PVLE_EXPORT Geom * | createCanonicalSphere (World *pPhyWorld, const float radius=1, const float mass=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" sphere geom with a body. | |
PVLE_EXPORT Geom * | createCanonicalCapsule (World *pPhyWorld, const float radius=1, const float length=1, const float mass=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" capsule geom with a body. | |
PVLE_EXPORT Geom * | createCanonicalCylinder (World *pPhyWorld, const float radius=1, const float length=1, const float mass=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" cylinder geom with a body. | |
PVLE_EXPORT Geom * | createCanonicalBoxGeom (const osg::Vec3 &size=osg::Vec3(1, 1, 1), const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" box geom. | |
PVLE_EXPORT Geom * | createCanonicalSphereGeom (const float radius=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" sphere geom. | |
PVLE_EXPORT Geom * | createCanonicalCapsuleGeom (const float radius=1, const float length=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" capsule geom. | |
PVLE_EXPORT Geom * | createCanonicalCylinderGeom (const float radius=1, const float length=1, const SurfaceParams &surfaceParam=Materials::DEFAULT) |
Creates a "standard" cylinder geom. | |
void | dWorldSetGravity (dWorldID id, const osg::Vec3 &force) |
osg::Vec3 | dWorldGetGravityV (dWorldID id) |
Variables | |
static const dReal | PHY_INFINITY = dInfinity |
typedef std::map<const Body *, Body *> Physics::TDuplicatedBodiesMap |
Definition at line 60 of file AbstractGeom.h.
typedef std::pair<const Body *, Body *> Physics::TDuplicatedBody |
Definition at line 63 of file AbstractGeom.h.
void Physics::combinedTraversal | ( | const AbstractGeom & | a, | |
const AbstractGeom & | b, | |||
_Pred & | pred | |||
) | [inline] |
Definition at line 57 of file CombinedTraversal.h.
References Physics::AbstractGeom::asGeom(), ASSERT, Physics::AbstractGeom::asSpace(), combinedTraversal(), Physics::Space::getGeomsBegin(), Physics::Space::getGeomsEnd(), and Physics::AbstractGeom::isSpace().
void Physics::combinedTraversal | ( | AbstractGeom & | a, | |
AbstractGeom & | b, | |||
_Pred & | pred | |||
) | [inline] |
Traverse all children of two AbstractGeom's simultaneously (Abstract geoms must have the same structure - ie.
number of children recursively), and calls a predicate for all Geom's encountered. Predicate must have two "Geom *" as arguments, and must return a bool (indicating if the loop must continue).
Definition at line 38 of file CombinedTraversal.h.
References Physics::AbstractGeom::asGeom(), ASSERT, Physics::AbstractGeom::asSpace(), Physics::Space::getGeomsBegin(), Physics::Space::getGeomsEnd(), and Physics::AbstractGeom::isSpace().
Referenced by C3DPhy::attachBodies(), combinedTraversal(), and C3DPhy::findGeomCopy().
Geom * Physics::createCanonicalBox | ( | World * | pPhyWorld, | |
const osg::Vec3 & | size = osg::Vec3(1,1,1) , |
|||
const float | mass = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" box geom with a body.
Definition at line 40 of file Physics/Utility.cpp.
References Physics::Body::getMassData(), Physics::Geom::setBody(), and Physics::Mass::setBoxTotal().
Referenced by createBox3DPhy().
Geom * Physics::createCanonicalBoxGeom | ( | const osg::Vec3 & | size = osg::Vec3(1,1,1) , |
|
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" box geom.
Definition at line 36 of file Physics/Utility.cpp.
Referenced by createFixedBox3DPhy().
Geom * Physics::createCanonicalCapsule | ( | World * | pPhyWorld, | |
const float | radius = 1 , |
|||
const float | length = 1 , |
|||
const float | mass = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" capsule geom with a body.
Definition at line 66 of file Physics/Utility.cpp.
References Physics::Body::getMassData(), Physics::Geom::setBody(), Physics::Mass::setCapsuleTotal(), and Physics::Mass::Z_AXIS.
Referenced by createCapsule3DPhy().
Geom * Physics::createCanonicalCapsuleGeom | ( | const float | radius = 1 , |
|
const float | length = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" capsule geom.
Definition at line 62 of file Physics/Utility.cpp.
Referenced by createFixedCapsule3DPhy().
Geom * Physics::createCanonicalCylinder | ( | World * | pPhyWorld, | |
const float | radius = 1 , |
|||
const float | length = 1 , |
|||
const float | mass = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" cylinder geom with a body.
Definition at line 79 of file Physics/Utility.cpp.
References Physics::Body::getMassData(), Physics::Geom::setBody(), Physics::Mass::setCylinderTotal(), and Physics::Mass::Z_AXIS.
Referenced by createCylinder3DPhy().
Geom * Physics::createCanonicalCylinderGeom | ( | const float | radius = 1 , |
|
const float | length = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" cylinder geom.
Definition at line 75 of file Physics/Utility.cpp.
Referenced by createFixedCylinder3DPhy().
Geom * Physics::createCanonicalSphere | ( | World * | pPhyWorld, | |
const float | radius = 1 , |
|||
const float | mass = 1 , |
|||
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" sphere geom with a body.
Definition at line 53 of file Physics/Utility.cpp.
References Physics::Body::getMassData(), Physics::Geom::setBody(), and Physics::Mass::setSphereTotal().
Referenced by createSphere3DPhy().
Geom * Physics::createCanonicalSphereGeom | ( | const float | radius = 1 , |
|
const SurfaceParams & | surfaceParam = Materials::DEFAULT | |||
) |
Creates a "standard" sphere geom.
Definition at line 49 of file Physics/Utility.cpp.
Referenced by createFixedSphere3DPhy(), and Explosion::init().
void Physics::dBodyAddForce | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
void Physics::dBodyAddForceAtPos | ( | dBodyID | id, | |
const osg::Vec3 & | f, | |||
const osg::Vec3 & | pos | |||
) | [inline] |
void Physics::dBodyAddForceAtRelPos | ( | dBodyID | id, | |
const osg::Vec3 & | f, | |||
const osg::Vec3 & | pos | |||
) | [inline] |
void Physics::dBodyAddRelForce | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
void Physics::dBodyAddRelForceAtPos | ( | dBodyID | id, | |
const osg::Vec3 & | f, | |||
const osg::Vec3 & | pos | |||
) | [inline] |
void Physics::dBodyAddRelForceAtRelPos | ( | dBodyID | id, | |
const osg::Vec3 & | f, | |||
const osg::Vec3 & | pos | |||
) | [inline] |
void Physics::dBodyAddRelTorque | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
void Physics::dBodyAddTorque | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
osg::Vec3 Physics::dBodyGetAngularVelV | ( | dBodyID | id | ) | [inline] |
osg::Vec3 Physics::dBodyGetFiniteRotationAxisV | ( | dBodyID | id | ) | [inline] |
osg::Vec3 Physics::dBodyGetForceV | ( | dBodyID | id | ) | [inline] |
osg::Vec3 Physics::dBodyGetLinearVelV | ( | dBodyID | id | ) | [inline] |
Definition at line 145 of file Body.h.
References toGraphVec3().
Referenced by Ammo::hitBefore(), and Ammo::step().
osg::Vec3 Physics::dBodyGetPointVelV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
Definition at line 167 of file Body.h.
References toGraphVec3().
Referenced by Physics::NearCallback::operator()().
osg::Vec3 Physics::dBodyGetPositionV | ( | dBodyID | id | ) | [inline] |
Definition at line 138 of file Body.h.
References toGraphVec3().
Referenced by C3DPhy::getPos(), and C3DPhy::getReferenceFrame().
osg::Vec3 Physics::dBodyGetPosRelPointV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
osg::Quat Physics::dBodyGetQuaternionV | ( | dBodyID | id | ) | [inline] |
Definition at line 140 of file Body.h.
References toGraphQuat().
Referenced by C3DPhy::getQuaternion(), C3DPhy::getReferenceFrame(), and Physics::Body::rotate().
osg::Vec3 Physics::dBodyGetRelPointPosV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
osg::Vec3 Physics::dBodyGetRelPointVelV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
osg::Matrix Physics::dBodyGetRotationV | ( | dBodyID | id, | |
const osg::Matrix & | matrix | |||
) | [inline] |
osg::Vec3 Physics::dBodyGetTorqueV | ( | dBodyID | id | ) | [inline] |
void Physics::dBodySetAngularVel | ( | dBodyID | id, | |
const osg::Vec3 & | angularVel | |||
) | [inline] |
void Physics::dBodySetFiniteRotationAxis | ( | dBodyID | id, | |
const osg::Vec3f & | axis | |||
) | [inline] |
void Physics::dBodySetForce | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
void Physics::dBodySetLinearVel | ( | dBodyID | id, | |
const osg::Vec3 & | vel | |||
) | [inline] |
void Physics::dBodySetPosition | ( | dBodyID | id, | |
const osg::Vec3 & | pos | |||
) | [inline] |
Definition at line 137 of file Body.h.
Referenced by Physics::Body::Body(), Physics::Body::setMatrix(), and Physics::Body::translate().
void Physics::dBodySetQuaternion | ( | dBodyID | id, | |
const osg::Quat & | quat | |||
) | [inline] |
Definition at line 139 of file Body.h.
References toPhyQuat().
Referenced by Physics::Body::Body(), and Physics::Body::rotate().
void Physics::dBodySetRotation | ( | dBodyID | id, | |
const osg::Matrix & | matrix | |||
) | [inline] |
Definition at line 141 of file Body.h.
References toPhyMatRotation().
Referenced by Physics::Body::setMatrix().
void Physics::dBodySetTorque | ( | dBodyID | id, | |
const osg::Vec3 & | f | |||
) | [inline] |
osg::Vec3 Physics::dBodyVectorFromWorldV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
osg::Vec3 Physics::dBodyVectorToWorldV | ( | dBodyID | id, | |
const osg::Vec3 & | p | |||
) | [inline] |
osg::Vec3 Physics::dWorldGetGravityV | ( | dWorldID | id | ) | [inline] |
void Physics::dWorldSetGravity | ( | dWorldID | id, | |
const osg::Vec3 & | force | |||
) | [inline] |
dReal Physics::kmhToms | ( | dReal | v | ) | [inline] |
dReal Physics::msTokmh | ( | dReal | v | ) | [inline] |
graphBB Physics::toGraphBB | ( | dReal * | bb | ) | [inline] |
Definition at line 98 of file Converters.h.
References graphBB, and graphVec3.
Referenced by Physics::AbstractGeom::getAABB().
graphMat Physics::toGraphMatInertia | ( | const dReal * | m | ) |
Definition at line 31 of file Converters.cpp.
References graphMat.
Referenced by Physics::Mass::getInertiaTensor().
graphMat Physics::toGraphMatRotation | ( | const dReal * | m | ) |
Definition at line 40 of file Converters.cpp.
References graphMat, and graphQuat.
Referenced by dBodyGetRotationV(), dGeomGetOffsetRotationV(), and dGeomGetRotationV().
graphMat Physics::toGraphMatRotationPosition | ( | const dReal * | m, | |
const dReal * | p | |||
) |
Definition at line 52 of file Converters.cpp.
References graphMat, and graphQuat.
Referenced by Physics::Geom::getMatrix(), Physics::Body::getMatrix(), and Physics::Geom::getOffsetMatrix().
graphQuat Physics::toGraphQuat | ( | const dReal * | v | ) | [inline] |
Definition at line 88 of file Converters.h.
Referenced by Physics::HeightFieldHandler::create(), dBodyGetQuaternionV(), dGeomGetOffsetQuaternionV(), and dGeomGetQuaternionV().
graphVec3 Physics::toGraphVec3 | ( | const dReal * | v | ) | [inline] |
Definition at line 79 of file Converters.h.
References graphVec3.
Referenced by dBodyGetAngularVelV(), dBodyGetFiniteRotationAxisV(), dBodyGetForceV(), dBodyGetLinearVelV(), dBodyGetPointVelV(), dBodyGetPositionV(), dBodyGetPosRelPointV(), dBodyGetRelPointPosV(), dBodyGetRelPointVelV(), dBodyGetTorqueV(), dBodyVectorFromWorldV(), dBodyVectorToWorldV(), dGeomGetOffsetPositionV(), dGeomGetPositionV(), dWorldGetGravityV(), Physics::Joint::getAxis1(), Physics::Joint::getAxis2(), Physics::RayHandler::getDir(), Physics::JointFeedback::getF1(), Physics::JointFeedback::getF2(), Physics::Contact::getFrictionDir(), Physics::Joint::getMotorAxis(), Physics::Contact::getNormal(), Physics::Contact::getPos(), Physics::Joint::getPosBody1(), Physics::Joint::getPosBody2(), Physics::BoxHandler::getSize(), Physics::RayHandler::getStartPoint(), Physics::JointFeedback::getT1(), and Physics::JointFeedback::getT2().
graphVec4 Physics::toGraphVec4 | ( | const dVector4 & | v | ) | [inline] |
Definition at line 80 of file Converters.h.
References graphVec4.
Referenced by Physics::PlaneHandler::getParams().
void Physics::toPhyBB | ( | const graphBB & | bb, | |
dReal * | out_bb | |||
) | [inline] |
Definition at line 99 of file Converters.h.
void Physics::toPhyMatRotation | ( | const graphMat & | matrix, | |
dMatrix3 & | out_matrix | |||
) |
Definition at line 68 of file Converters.cpp.
References graphMat, and graphQuat.
Referenced by Physics::HeightFieldHandler::create(), dBodySetRotation(), dGeomSetOffsetRotation(), dGeomSetOffsetWorldRotation(), dGeomSetRotation(), and Physics::Mass::rotateMass().
void Physics::toPhyQuat | ( | const graphQuat & | quat, | |
dQuaternion & | out_q | |||
) | [inline] |
Definition at line 90 of file Converters.h.
Referenced by dBodySetQuaternion(), dGeomSetOffsetQuaternion(), dGeomSetOffsetWorldQuaternion(), dGeomSetQuaternion(), and Physics::HeightFieldHandler::HeightFieldHandler().
void Physics::toPhyVec3 | ( | const dReal & | x, | |
const dReal & | y, | |||
const dReal & | z, | |||
dVector3 | out_ret | |||
) | [inline] |
Definition at line 83 of file Converters.h.
void Physics::toPhyVec3 | ( | const graphVec3 & | v, | |
dVector3 | out_ret | |||
) | [inline] |
Definition at line 82 of file Converters.h.
Referenced by Physics::HeightFieldHandler::HeightFieldHandler(), and Physics::Space::initQuad().
void Physics::toPhyVec4 | ( | const dReal & | x, | |
const dReal & | y, | |||
const dReal & | z, | |||
const dReal & | w, | |||
dVector3 | out_ret | |||
) | [inline] |
Definition at line 85 of file Converters.h.
void Physics::toPhyVec4 | ( | const graphVec4 & | v, | |
dVector4 | out_ret | |||
) | [inline] |
Definition at line 84 of file Converters.h.
const dReal Physics::PHY_INFINITY = dInfinity [static] |
Definition at line 36 of file SurfaceParams.h.
Referenced by Physics::SurfaceParams::mergeInto(), and Physics::SurfaceParams::SurfaceParams().