7 #include "BlMaterialType.h"
18 btManifoldPoint *m_lpCP;
25 m_lpContacted = lpContacted;
26 m_bIsBodyA = bIsBodyA;
37 bool m_bExclusionProcessing;
42 m_bExclusionProcessing = bExclusionProcessing;
90 btCollisionShape *m_btCollisionShape;
91 btCollisionObject *m_btCollisionObject;
92 btCompoundShape *m_btCompoundShape;
93 CStdPtrArray<btCollisionShape> m_aryCompoundChildShapes;
95 btAnimatGeneric6DofConstraint *m_btStickyLock;
96 btAnimatGeneric6DofConstraint *m_btStickyLock2;
98 btRigidBody *m_btPart;
99 osgbDynamics::MotionState *m_osgbMotion;
100 BroadphaseNativeTypes m_eBodyType;
102 float m_fltStaticMasses;
119 float m_vLinearDragForce[3];
122 float m_vAngularDragTorque[3];
133 virtual void ProcessContacts();
135 virtual void DeleteDynamicPart();
136 virtual void DeleteSensorPart();
137 virtual void DeleteCollisionGeometry();
138 virtual void DeletePhysics(
bool bIncludeChildren);
140 virtual void CreateSensorPart();
141 virtual void CreateStaticChildren(
const CStdFPoint &vCom);
142 virtual void CreateDynamicPart();
143 virtual void CreateStickyLock();
144 virtual void SetupOffsetCOM(
const CStdFPoint &vCom);
147 virtual void AddStaticGeometry(
BlRigidBody *lpChild, btCompoundShape *btCompound,
const CStdFPoint &vCom);
148 virtual void RemoveStaticGeometry(
BlRigidBody *lpChild, btCompoundShape *btCompound);
150 CStdFPoint Physics_GetCurrentPosition();
151 virtual void GetBaseValues();
153 virtual void ResetStaticCollisionGeom();
154 virtual void ResetSensorCollisionGeom();
155 virtual void ResetDynamicCollisionGeom();
157 virtual void DeleteChildPhysics();
158 virtual void DeleteAttachedJointPhysics();
159 virtual void RecreateAttachedJointPhysics();
160 virtual void ResizePhysicsGeometry();
162 virtual void CalculateVolumeAndAreas() {};
163 virtual void CalculateRotatedAreas();
169 CStdPtrArray<BlContactPoint> m_aryContactPoints;
171 btCompoundShape *CompoundShape() {
return m_btCompoundShape;};
172 btCollisionShape *CollisionShape() {
return m_btCollisionShape;};
173 btRigidBody *Part() {
return m_btPart;};
174 osgbDynamics::MotionState *MotionState() {
return m_osgbMotion;};
175 BlMaterialType *Material() {
return m_lpMaterial;};
177 virtual BlSimulator *GetBlSimulator();
179 virtual bool NeedCollision(BlRigidBody *lpTest);
180 virtual void SetSurfaceContactCount();
182 virtual bool Physics_IsDefined();
183 virtual bool Physics_IsGeometryDefined();
184 virtual void Physics_ResetSimulation();
185 virtual void Physics_EnableCollision(RigidBody *lpBody);
186 virtual void Physics_DisableCollision(RigidBody *lpBody);
187 virtual void Physics_CollectData();
188 virtual void Physics_CollectExtraData();
189 virtual void Physics_SetFreeze(
bool bVal);
190 virtual void Physics_SetMass(
float fltVal);
191 virtual void Physics_SetMaterialID(std::string strID);
192 virtual void Physics_SetVelocityDamping(
float fltLinear,
float fltAngular);
193 virtual void Physics_SetCenterOfMass(
float fltTx,
float fltTy,
float fltTz);
194 virtual void Physics_UpdateNode();
195 virtual void Physics_FluidDataChanged();
196 virtual void Physics_WakeDynamics();
197 virtual void Physics_ContactSensorAdded(ContactSensor *lpSensor);
198 virtual void Physics_ContactSensorRemoved();
199 virtual void Physics_ChildBodyAdded(RigidBody *lpChild);
200 virtual void Physics_ChildBodyRemoved(
bool bHasStaticJoint);
201 virtual void Physics_DeleteStickyLock();
203 virtual void Physics_AddBodyForceAtLocalPos(
float fltPx,
float fltPy,
float fltPz,
float fltFx,
float fltFy,
float fltFz,
bool bScaleUnits);
204 virtual void Physics_AddBodyForceAtWorldPos(
float fltPx,
float fltPy,
float fltPz,
float fltFx,
float fltFy,
float fltFz,
bool bScaleUnits);
205 virtual void Physics_AddBodyTorque(
float fltTx,
float fltTy,
float fltTz,
bool bScaleUnits);
206 virtual CStdFPoint Physics_GetVelocityAtPoint(
float x,
float y,
float z);
207 virtual float Physics_GetMass();
208 virtual float Physics_GetDensity();
209 virtual bool Physics_HasCollisionGeometry();
210 virtual void Physics_StepHydrodynamicSimulation();
211 virtual float *Physics_GetDataPointer(
const std::string &strDataType);
213 virtual osg::Matrix GetPhysicsWorldMatrix();
215 virtual void MaterialTypeModified();
217 friend class BlJoint;
A common class for all rigid body data specific to vortex.
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
CStdFPoint m_vRotatedArea
BlMaterialType * m_lpMaterial
The pointer to the material for this body.
float m_fltReportBuoyancy
The buoyancy force reported to the GUI.
float m_fltBuoyancy
The buoyancy force applied to this part.