|
Computational Embodied Neuroscience Simulator
1.1
3D simulation library
|
An interface to the bullet physics library. More...
#include <cens_physics.h>


Public Member Functions | |
| CENSPhysics () | |
| virtual | ~CENSPhysics () |
| virtual void | initCENSPhysics () |
| virtual void | cens_physics_step () |
| virtual void | initObjects () |
| virtual btDynamicsWorld * | getDynamicsWorld () |
| virtual btCollisionDispatcher * | getDispatcher () |
| virtual btRigidBody * | localCreateRigidBody (float mass, const btTransform &startTransform, btCollisionShape *shape) |
| virtual btSoftBody * | localCreateSoftBody (float mass, btCollisionShape *shape) |
| virtual void | setCollisionFilter (CENSNonCollidingTable _non_colliding_table) |
| virtual CENSTouchSensor * | addTouchSensor (btRigidBody *body) |
| btScalar | getStep () |
| btScalar | getSubstep () |
| Vector3f | getGravity () |
Protected Member Functions | |
| btTransform & | getTransformFromBody (btRigidBody *body) |
| btTransform & | getTransformFromBody (btSoftBody *body) |
Protected Attributes | |
| btSoftRigidDynamicsWorld * | m_phDynamicsWorld |
| btAlignedObjectArray < btCollisionShape * > | m_phCollisionShapes |
| btAlignedObjectArray < CENSTouchSensor * > | m_phTouchSensors |
| btAlignedObjectArray < btSoftSoftCollisionAlgorithm * > | m_phSoftSoftCollisionAlgorithms |
| btAlignedObjectArray < btSoftRididCollisionAlgorithm * > | m_phSoftRigidCollisionAlgorithms |
| btSoftBodyWorldInfo | m_phSoftBodyWorldInfo |
| btBroadphaseInterface * | m_phBroadphase |
| btCollisionDispatcher * | m_phDispatcher |
| btConstraintSolver * | m_phSolver |
| btDefaultCollisionConfiguration * | m_phCollisionConfiguration |
| btScalar | m_phDefaultContactProcessingThreshold |
| Vector3f | m_phGravity |
| double | m_phStep |
| double | m_phSubstep |
| CENSParameterManager | m_phParameterManager |
Static Protected Attributes | |
| static CENSNonCollidingTable | m_phNonCollidingTable |
Friends | |
| void | collisionFilteringCallback (btBroadphasePair &collisionPair, btCollisionDispatcher &dispatcher, const btDispatcherInfo &dispatchInfo) |
| void | internalTickCallback (btDynamicsWorld *world, btScalar timestep) |
An interface to the bullet physics library.
The 'localCreateRigidBody' and 'localCreateSoftBody' facilitations allow to easily build bodies starting from a mass value, a collision shape and a transform
Definition at line 203 of file cens_physics.h.
| cens::CENSPhysics::CENSPhysics | ( | ) |
Definition at line 38 of file cens_physics.cpp.
References initCENSPhysics().
|
virtual |
Definition at line 48 of file cens_physics.cpp.
References m_phBroadphase, m_phCollisionConfiguration, m_phCollisionShapes, m_phDispatcher, m_phDynamicsWorld, m_phSolver, and m_phTouchSensors.
|
virtual |
Create a touchSensor and add to the list
| body | the btRigidBody to become a sensor |
Definition at line 281 of file cens_physics.cpp.
References m_phNonCollidingTable, and m_phTouchSensors.
Referenced by cens::CENSSerializedEngine::addTouchSensor().
|
virtual |
A single tep of the simulation. Forces are applied to bodies here
Definition at line 163 of file cens_physics.cpp.
References cens::CENSTouchSensor::body, m_phDynamicsWorld, m_phStep, m_phSubstep, and m_phTouchSensors.
Referenced by cens::CENSEngine::step().
|
inlinevirtual |
Definition at line 238 of file cens_physics.h.
|
inlinevirtual |
Definition at line 232 of file cens_physics.h.
Referenced by cens::CENSSerializedRobot::update().
|
inline |
Definition at line 291 of file cens_physics.h.
Referenced by cens::CENSSerializedRobot::enableBodies().
|
inline |
Definition at line 289 of file cens_physics.h.
|
inline |
Definition at line 290 of file cens_physics.h.
|
protected |
Definition at line 250 of file cens_physics.cpp.
Referenced by cens::CENSEngine::display(), and cens::CENSEngine::syncAttachedCamera().
|
protected |
Definition at line 259 of file cens_physics.cpp.
|
virtual |
Initialize the dynamic world
register some softbody collision algorithms on top of
use the default collision dispatcher.
the default constraint solver.
Definition at line 89 of file cens_physics.cpp.
References CENSParameterManager::addParameter(), initObjects(), CENSParameterManager::loadParameters(), m_phBroadphase, m_phCollisionConfiguration, m_phDispatcher, m_phDynamicsWorld, m_phGravity, m_phParameterManager, m_phSoftBodyWorldInfo, m_phSolver, m_phStep, m_phSubstep, and CENSParameterManager::saveParameters().
Referenced by CENSPhysics().
|
inlinevirtual |
All bodies and joints are created here. Connections of bodies to joints are stated also here
Reimplemented in cens::CENSEngine.
Definition at line 226 of file cens_physics.h.
Referenced by initCENSPhysics().
|
virtual |
Create a btRigidBody from a mass, a btTransform and a btCollisionShape
| mass | the mass of the rigid body |
| startTransform | a transform indicating initial translation and rotation from origin |
| shape | the btCollisionShape indicating the shape and dimansions of the body |
Definition at line 178 of file cens_physics.cpp.
References m_phDefaultContactProcessingThreshold, and m_phDynamicsWorld.
Referenced by cens::CENSEngine::localCreateRigidBody().
|
virtual |
Create a btSoftBody from a mass, a btTransform and a btCollisionShape
| mass | the mass of the rigid body |
| shape | the btCollisionShape indicating the shape and dimansions of the body |
Definition at line 220 of file cens_physics.cpp.
References m_phDynamicsWorld, and m_phSoftBodyWorldInfo.
Referenced by cens::CENSEngine::localCreateSoftBody().
|
virtual |
set collision filter
| _non_colliding_table | a CENSNonCollidingTable defining some collision pairs |
Definition at line 265 of file cens_physics.cpp.
References collisionFilteringCallback, m_phDispatcher, and m_phNonCollidingTable.
Referenced by cens::CENSSerializedRobot::init().
|
friend |
Decides if collisions are dispatched based on m_phNonCollidingTable
Decides if collisions are dispatched based on CENSPhysycs::m_phNonCollidingTable
Definition at line 293 of file cens_physics.cpp.
Referenced by setCollisionFilter().
|
friend |
To be called on every substep for collision manifold reading
Definition at line 326 of file cens_physics.cpp.
|
protected |
Definition at line 337 of file cens_physics.h.
Referenced by initCENSPhysics(), and ~CENSPhysics().
|
protected |
Definition at line 340 of file cens_physics.h.
Referenced by initCENSPhysics(), and ~CENSPhysics().
|
protected |
Store of all collision shapes
Definition at line 325 of file cens_physics.h.
Referenced by ~CENSPhysics().
|
protected |
Definition at line 341 of file cens_physics.h.
Referenced by localCreateRigidBody().
|
protected |
Definition at line 338 of file cens_physics.h.
Referenced by initCENSPhysics(), setCollisionFilter(), and ~CENSPhysics().
|
protected |
Pointer to the dynamic world class
Definition at line 322 of file cens_physics.h.
Referenced by cens_physics_step(), cens::CENSEngine::display(), initCENSPhysics(), cens::CENSSerializedEngine::loadBulletFile(), localCreateRigidBody(), localCreateSoftBody(), and ~CENSPhysics().
|
protected |
Definition at line 342 of file cens_physics.h.
Referenced by initCENSPhysics(), and cens::CENSSerializedEngine::loadBulletFile().
|
staticprotected |
Definition at line 331 of file cens_physics.h.
Referenced by addTouchSensor(), cens::collisionFilteringCallback(), and setCollisionFilter().
|
protected |
|
protected |
Definition at line 336 of file cens_physics.h.
Referenced by initCENSPhysics(), cens::CENSSerializedEngine::loadBulletFile(), and localCreateSoftBody().
|
protected |
Definition at line 335 of file cens_physics.h.
|
protected |
Definition at line 334 of file cens_physics.h.
|
protected |
Definition at line 339 of file cens_physics.h.
Referenced by initCENSPhysics(), and ~CENSPhysics().
|
protected |
Definition at line 343 of file cens_physics.h.
Referenced by cens_physics_step(), and initCENSPhysics().
|
protected |
Definition at line 344 of file cens_physics.h.
Referenced by cens_physics_step(), and initCENSPhysics().
|
protected |
Store of all collision sensors
Definition at line 328 of file cens_physics.h.
Referenced by addTouchSensor(), cens_physics_step(), and ~CENSPhysics().
1.8.8