
Go to the source code of this file.
| enum SIO2_PHYSIC_BOUNDS |
| void sio2PhysicAddConstraint | ( | SIO2physic * | _SIO2physic, | |
| SIO2constraint * | _SIO2constraint | |||
| ) |
Add a new physic constraint to the SIO2physic world based on the SIO2constraint information.
_SIO2physic: A valid SIO2physic pointer.
_SIO2constraint: A valid SIO2constraint pointer.
References SIO2constraint::_btRigidBody0, SIO2constraint::_btRigidBody1, SIO2physic::_btSoftRigidDynamicsWorld, SIO2constraint::_btTypedConstraint, SIO2constraint::all, SIO2constraint::aul, SIO2constraint::flags, SIO2constraint::lll, SIO2constraint::lul, SIO2constraint::ploc, SIO2constraint::prot, SIO2_CONSTRAINT_NO_COLLISION, SIO2_CONSTRAINT_TYPE_6DOF, SIO2_CONSTRAINT_TYPE_BALL, SIO2_CONSTRAINT_TYPE_HINGE, SIO2_CONSTRAINT_USE_ANGULAR_LIMITX, SIO2_CONSTRAINT_USE_ANGULAR_LIMITY, SIO2_CONSTRAINT_USE_ANGULAR_LIMITZ, SIO2_CONSTRAINT_USE_LINEAR_LIMITX, SIO2_CONSTRAINT_USE_LINEAR_LIMITY, SIO2_CONSTRAINT_USE_LINEAR_LIMITZ, sio2IsStateEnabled(), sio2TransformBindMatrix(), sio2TransformLoadIdentity(), sio2TransformMultMat(), sio2TransformSetRot(), SIO2constraint::type, vec3::x, vec3::y, and vec3::z.
Referenced by sio2ResourceBindAllPhysicConstraints().

| void sio2PhysicAddObject | ( | SIO2physic * | _SIO2physic, | |
| SIO2object * | _SIO2object | |||
| ) |
Add a new physic body to the SIO2physic world. Depending on the type of physic object that we are planning to add to the physic world, this function will analyze the _SIO2object->flags to determine which type of physic object we are trying to add and will dispatch the SIO2object to the appropriate function.
_SIO2physic: A valid SIO2physic pointer.
_SIO2object: A valid SIO2object pointer.
References SIO2object::flags, SIO2_OBJECT_SOFTBODY, sio2IsStateEnabled(), sio2PhysicAddRigidBody(), and sio2PhysicAddSoftBody().
Referenced by sio2ResourceBindAllPhysicObjects().

| void sio2PhysicAddRigidBody | ( | SIO2physic * | _SIO2physic, | |
| SIO2object * | _SIO2object | |||
| ) |
Add a new rigid body based on the SIO2object information held in SIO2object->_SIO2objectphysic.
_SIO2physic: A valid SIO2physic pointer.
_SIO2object: A valid SIO2object pointer.
References SIO2objectphysic::_btRigidBody, SIO2physic::_btSoftRigidDynamicsWorld, SIO2objectphysic::_btTriangleMesh, SIO2object::_SIO2instance, SIO2vertexgroup::_SIO2material, SIO2object::_SIO2objectphysic, SIO2object::_SIO2transform, SIO2object::_SIO2vertexgroup, SIO2objectphysic::bounds, SIO2object::buf, SIO2objectphysic::damp, SIO2object::dim, SIO2object::flags, SIO2material::friction, SIO2vertexgroup::ind, SIO2objectphysic::margin, SIO2objectphysic::mass, SIO2transform::mat, SIO2vertexgroup::mode, SIO2vertexgroup::n_ind, SIO2object::n_vgroup, SIO2object::rad, SIO2material::restitution, SIO2objectphysic::rotdamp, SIO2_OBJECT_DYNAMIC, SIO2_OBJECT_GHOST, SIO2_OBJECT_NOSLEEPING, SIO2_OBJECT_RIGIDBODY, SIO2_PHYSIC_BOX, SIO2_PHYSIC_CAPSULE, SIO2_PHYSIC_CONE, SIO2_PHYSIC_CONVEXHULL, SIO2_PHYSIC_CYLINDER, SIO2_PHYSIC_SHAPEHULL, SIO2_PHYSIC_SPHERE, SIO2_PHYSIC_TRIANGLEMESH, sio2IsStateEnabled(), sio2ObjectGetNumVert(), vec3::x, vec3::y, and vec3::z.
Referenced by sio2PhysicAddObject().

| void sio2PhysicAddSoftBody | ( | SIO2physic * | _SIO2physic, | |
| SIO2object * | _SIO2object | |||
| ) |
Add a new soft body based on the SIO2object information helf in SIO2object->_SIO2objectphysic.
_SIO2physic: A valid SIO2physic pointer.
_SIO2object: A valid SIO2object pointer.
References SIO2objectphysic::_btSoftBody, SIO2physic::_btSoftBodyWorldInfo, SIO2physic::_btSoftRigidDynamicsWorld, SIO2object::_SIO2instance, SIO2vertexgroup::_SIO2material, SIO2object::_SIO2objectphysic, SIO2object::_SIO2transform, SIO2object::_SIO2vertexgroup, SIO2object::buf, SIO2objectphysic::citeration, SIO2material::friction, SIO2vertexgroup::ind, SIO2objectphysic::margin, SIO2objectphysic::mass, SIO2transform::mat, SIO2vertexgroup::n_ind, SIO2object::n_vgroup, SIO2objectphysic::piteration, SIO2objectphysic::shapematch, and sio2ObjectGetNumVert().
Referenced by sio2PhysicAddObject().

| SIO2physic* sio2PhysicFree | ( | SIO2physic * | _SIO2physic | ) |
Free a valid SIO2physic pointer, and remove its handle from the global sio2 SIO2resource handle. This will also free all physic objects pointers (soft and rigid) and also all the constraints possibly added to the physic world.
_SIO2physic: A valid SIO2physic pointer.
return a NULL SIO2physic structure pointer.
References SIO2physic::_btBroadphaseInterface, SIO2physic::_btCollisionDispatcher, SIO2physic::_btConstraintSolver, SIO2physic::_btSoftBodyRigidBodyCollisionConfiguration, SIO2physic::_btSoftRigidDynamicsWorld, SIO2::_SIO2resource, sio2, SIO2_PHYSIC, sio2PhysicRemoveAllConstraints(), sio2PhysicRemoveAllObjects(), and sio2ResourceDel().
Referenced by sio2ResourceUnload().

| SIO2physic* sio2PhysicInit | ( | char * | _name | ) |
Create a new SIO2physic, this new SIO2physic pointer will be added to the global sio2 SIO2resource handle.
_name: The name to use to associate the SIO2physic within the SIO2resource.
return a new SIO2physic structure pointer.
References SIO2physic::_btBroadphaseInterface, SIO2physic::_btCollisionDispatcher, SIO2physic::_btConstraintSolver, SIO2physic::_btSoftBodyRigidBodyCollisionConfiguration, SIO2physic::_btSoftBodyWorldInfo, SIO2physic::_btSoftRigidDynamicsWorld, SIO2::_SIO2resource, SIO2physic::name, sio2, SIO2_PHYSIC, sio2ResourceAdd(), and sio2StringCpy().

| static void sio2PhysicOptimize | ( | SIO2physic * | _SIO2physic | ) | [inline, static] |
Optimize an SIO2physic world by sorting the different entities.
_SIO2physic: A valid SIO2physic pointer.
References SIO2physic::_btBroadphaseInterface.
| void sio2PhysicPause | ( | SIO2physic * | _SIO2physic | ) |
Set the playback of the SIO2physic simulation loop to SIO2_PAUSE.
_SIO2physic: A valid SIO2physic pointer.
References SIO2_PAUSE, and SIO2physic::state.
| void sio2PhysicPlay | ( | SIO2physic * | _SIO2physic | ) |
Set the playback of the SIO2physic simulation loop to SIO2_PLAY.
_SIO2physic: A valid SIO2physic pointer.
References SIO2_PLAY, and SIO2physic::state.
| void sio2PhysicRemoveAllConstraints | ( | SIO2physic * | _SIO2physic | ) |
Remove ALL the physic constraints that have been added to the SIO2physic world.
_SIO2physic: A valid SIO2physic pointer.
References SIO2physic::_btSoftRigidDynamicsWorld.
Referenced by sio2PhysicFree().
| void sio2PhysicRemoveAllObjects | ( | SIO2physic * | _SIO2physic | ) |
Remove ALL objects (either rigid or soft) from the SIO2physic world.
_SIO2physic: A valid SIO2physic pointer.
References SIO2physic::_btSoftRigidDynamicsWorld.
Referenced by sio2PhysicFree().
| void sio2PhysicRemoveConstraint | ( | SIO2physic * | _SIO2physic, | |
| SIO2constraint * | _SIO2constraint | |||
| ) |
Remove an SIO2constraint from the physic world.
_SIO2physic: A valid SIO2physic pointer.
_SIO2constraint: A valid SIO2constraint pointer.
References SIO2physic::_btSoftRigidDynamicsWorld, and SIO2constraint::_btTypedConstraint.
| void sio2PhysicRemoveObject | ( | SIO2physic * | _SIO2physic, | |
| SIO2object * | _SIO2object | |||
| ) |
Remove a physic object (either rigid or soft) from the SIO2physic world.
_SIO2physic: A valid SIO2physic pointer.
_SIO2object: A valid SIO2object pointer.
References SIO2objectphysic::_btRigidBody, SIO2objectphysic::_btSoftBody, SIO2physic::_btSoftRigidDynamicsWorld, and SIO2object::_SIO2objectphysic.
| void sio2PhysicRender | ( | SIO2physic * | _SIO2physic, | |
| float | _timestep, | |||
| int | _pass | |||
| ) |
Increment the SIO2physic simulation step.
_SIO2physic: A valid SIO2physic pointer.
_timestep: The timestep uses to increment the physic simulation step.
_pass: The number of physic pass, the higher the more accurate.
References SIO2physic::_btSoftRigidDynamicsWorld, SIO2_PLAY, and SIO2physic::state.
| void sio2PhysicResetAll | ( | SIO2physic * | _SIO2physic | ) |
Reset all rigid bodies back to their original locations.
_SIO2physic: A valid SIO2physic pointer.
References SIO2physic::_btSoftRigidDynamicsWorld, and sio2PhysicResetRigidBody().

| void sio2PhysicResetObject | ( | SIO2physic * | _SIO2physic, | |
| SIO2object * | _SIO2object | |||
| ) |
Reset an SIO2object that uses collision back to its original position.
_SIO2physic: A valid SIO2physic pointer.
_SIO2object: A valid SIO2object pointer that uses physic.
References SIO2objectphysic::_btRigidBody, SIO2objectphysic::_btSoftBody, SIO2physic::_btSoftRigidDynamicsWorld, SIO2object::_SIO2objectphysic, and sio2PhysicResetRigidBody().

| void sio2PhysicResetRigidBody | ( | SIO2physic * | _SIO2physic, | |
| btRigidBody * | _btRigidBody, | |||
| btCollisionObject * | _btCollisionObject | |||
| ) |
Reset a ridig/dynamic body back to its original position. This function is basically called internally by sio2PhysicResetObject, use that function instead of calling this one directly.
_SIO2physic: A valid SIO2physic pointer.
_btRigidBody: A valid btRigidBody pointer.
_btCollisionObject: A valid btCollisionObject pointer.
References SIO2physic::_btSoftRigidDynamicsWorld.
Referenced by sio2PhysicResetAll(), and sio2PhysicResetObject().
| void sio2PhysicSetGravity | ( | SIO2physic * | _SIO2physic, | |
| vec3 * | _grav | |||
| ) |
Setup the gravity.
_SIO2physic: A valid SIO2physic pointer.
_grav: The direction & force of the gravity within the SIO2physic world.
References SIO2physic::_btSoftBodyWorldInfo, SIO2physic::_btSoftRigidDynamicsWorld, vec3::x, vec3::y, and vec3::z.
| void sio2PhysicSetWorldAttributes | ( | SIO2physic * | _SIO2physic, | |
| float | _air_density, | |||
| float | _water_density, | |||
| float | _water_offset, | |||
| vec3 * | _water_normal | |||
| ) |
Set some extra world attributes.
_SIO2physic: A valid SIO2physic pointer.
_air_density: The density of the air.
_water_density: The density of the water.
_water_offset: The offset value used underwater.
_water_normal: The direction vector of the water.
References SIO2physic::_btSoftBodyWorldInfo, vec3::x, vec3::y, and vec3::z.
| void sio2PhysicStop | ( | SIO2physic * | _SIO2physic | ) |
Set the playback of the SIO2physic simulation loop to SIO2_STOP.
_SIO2physic: A valid SIO2physic pointer.
References SIO2_STOP, and SIO2physic::state.
1.5.6