AnimatLab
2
Test
|
A common class for all rigid body data specific to vortex. More...
#include <BlRigidBody.h>
Public Member Functions | |
btCollisionShape * | CollisionShape () |
btCompoundShape * | CompoundShape () |
virtual BlSimulator * | GetBlSimulator () |
virtual osg::Matrix | GetPhysicsWorldMatrix () |
BlMaterialType * | Material () |
virtual void | MaterialTypeModified () |
osgbDynamics::MotionState * | MotionState () |
virtual bool | NeedCollision (BlRigidBody *lpTest) |
btRigidBody * | Part () |
virtual void | Physics_AddBodyForceAtLocalPos (float fltPx, float fltPy, float fltPz, float fltFx, float fltFy, float fltFz, bool bScaleUnits) |
virtual void | Physics_AddBodyForceAtWorldPos (float fltPx, float fltPy, float fltPz, float fltFx, float fltFy, float fltFz, bool bScaleUnits) |
virtual void | Physics_AddBodyTorque (float fltTx, float fltTy, float fltTz, bool bScaleUnits) |
virtual void | Physics_ChildBodyAdded (RigidBody *lpChild) |
virtual void | Physics_ChildBodyRemoved (bool bHasStaticJoint) |
virtual void | Physics_CollectData () |
virtual void | Physics_CollectExtraData () |
virtual void | Physics_ContactSensorAdded (ContactSensor *lpSensor) |
virtual void | Physics_ContactSensorRemoved () |
virtual void | Physics_DeleteStickyLock () |
virtual void | Physics_DisableCollision (RigidBody *lpBody) |
virtual void | Physics_EnableCollision (RigidBody *lpBody) |
virtual void | Physics_FluidDataChanged () |
virtual float * | Physics_GetDataPointer (const std::string &strDataType) |
virtual float | Physics_GetDensity () |
virtual float | Physics_GetMass () |
virtual CStdFPoint | Physics_GetVelocityAtPoint (float x, float y, float z) |
virtual bool | Physics_HasCollisionGeometry () |
virtual bool | Physics_IsDefined () |
virtual bool | Physics_IsGeometryDefined () |
virtual void | Physics_ResetSimulation () |
virtual void | Physics_SetCenterOfMass (float fltTx, float fltTy, float fltTz) |
virtual void | Physics_SetFreeze (bool bVal) |
virtual void | Physics_SetMass (float fltVal) |
virtual void | Physics_SetMaterialID (std::string strID) |
virtual void | Physics_SetVelocityDamping (float fltLinear, float fltAngular) |
virtual void | Physics_StepHydrodynamicSimulation () |
virtual void | Physics_UpdateNode () |
virtual void | Physics_WakeDynamics () |
virtual void | SetSurfaceContactCount () |
Public Attributes | |
CStdPtrArray< BlContactPoint > | m_aryContactPoints |
Protected Member Functions | |
virtual btAnimatGeneric6DofConstraint * | AddDynamicJoint (BlRigidBody *lpParent, BlRigidBody *lpChild) |
virtual void | AddStaticGeometry (BlRigidBody *lpChild, btCompoundShape *btCompound, const CStdFPoint &vCom) |
virtual void | CalculateRotatedAreas () |
Rotates the axis area values by the amount that this part is rotated by. This is used by the hydrodynamics to calculate the drag. To do that we need to know what the surface area is in the direction of movement. We calculate the area for each axis in world coordinates, but the part can be rotated at will, so we need to do the same rotation to find the actual area in world axis coordinates to use. More... | |
virtual void | CalculateVolumeAndAreas () |
virtual void | CreateDynamicPart () |
virtual void | CreateSensorPart () |
virtual void | CreateStaticChildren (const CStdFPoint &vCom) |
virtual void | CreateStickyLock () |
virtual void | DeleteAttachedJointPhysics () |
virtual void | DeleteChildPhysics () |
virtual void | DeleteCollisionGeometry () |
virtual void | DeleteDynamicPart () |
virtual void | DeletePhysics (bool bIncludeChildren) |
virtual void | DeleteSensorPart () |
virtual void | GetBaseValues () |
CStdFPoint | Physics_GetCurrentPosition () |
virtual void | ProcessContacts () |
virtual void | RecreateAttachedJointPhysics () |
virtual void | RemoveStaticGeometry (BlRigidBody *lpChild, btCompoundShape *btCompound) |
virtual void | ResetDynamicCollisionGeom () |
virtual void | ResetSensorCollisionGeom () |
virtual void | ResetStaticCollisionGeom () |
virtual void | ResizePhysicsGeometry () |
virtual void | SetupOffsetCOM (const CStdFPoint &vCom) |
Changes this body to use a btCompoundShape and adds the btCollision shape offset from -COM. More... | |
Protected Attributes | |
CStdPtrArray< btCollisionShape > | m_aryCompoundChildShapes |
btCollisionObject * | m_btCollisionObject |
btCollisionShape * | m_btCollisionShape |
btCompoundShape * | m_btCompoundShape |
btRigidBody * | m_btPart |
btAnimatGeneric6DofConstraint * | m_btStickyLock |
btAnimatGeneric6DofConstraint * | m_btStickyLock2 |
BroadphaseNativeTypes | m_eBodyType |
float | m_fltBuoyancy |
The buoyancy force applied to this part. | |
float | m_fltReportBuoyancy |
The buoyancy force reported to the GUI. | |
float | m_fltStaticMasses |
BlBulletData * | m_lpBulletData |
BlMaterialType * | m_lpMaterial |
The pointer to the material for this body. | |
BlSimulator * | m_lpVsSim |
osgbDynamics::MotionState * | m_osgbMotion |
float | m_vAngularDragTorque [3] |
This is the drag forces applied to this body. | |
CStdFPoint | m_vArea |
float | m_vLinearDragForce [3] |
This is the drag forces applied to this body. | |
CStdFPoint | m_vRotatedArea |
Friends | |
class | BlJoint |
A common class for all rigid body data specific to vortex.
Definition at line 87 of file BlRigidBody.h.
|
protectedvirtual |
Rotates the axis area values by the amount that this part is rotated by. This is used by the hydrodynamics to calculate the drag. To do that we need to know what the surface area is in the direction of movement. We calculate the area for each axis in world coordinates, but the part can be rotated at will, so we need to do the same rotation to find the actual area in world axis coordinates to use.
Definition at line 630 of file BlRigidBody.cpp.
References m_vArea, and m_vRotatedArea.
|
protectedvirtual |
Changes this body to use a btCompoundShape and adds the btCollision shape offset from -COM.
The reason it does this is because by default bullet always has the center of mass at the center of the object. However, if the user has specified a different COM then we need to move it away from that. The way to do ths is create a new compound shape and add our actual collision shape offset in the negative com direction. Then the motion state will match up this new collision part with the graphics correctly.
vCom | The com vector that will be used for the offset. Do not add a negative to it. This will be done in the method. |
Definition at line 359 of file BlRigidBody.cpp.
|
protected |
The area of this rigid body in the each axis direction. This is used to calculate the drag force in this direction.
Definition at line 106 of file BlRigidBody.h.
Referenced by CalculateRotatedAreas().
|
protected |
The area for this part after being rotated like the part is. This basically tells the area that is in the direction that the part is moving.
Definition at line 110 of file BlRigidBody.h.
Referenced by CalculateRotatedAreas().