- Timestamp:
- Dec 13, 2008, 11:45:51 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/physics/src/bullet/BulletDynamics/Dynamics/btRigidBody.h
r2192 r2430 18 18 19 19 #include "LinearMath/btAlignedObjectArray.h" 20 #include "LinearMath/btPoint3.h"21 20 #include "LinearMath/btTransform.h" 22 21 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" … … 32 31 33 32 34 /// btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape.33 ///The btRigidBody is the main class for rigid body objects. It is derived from btCollisionObject, so it keeps a pointer to a btCollisionShape. 35 34 ///It is recommended for performance and memory use to share btCollisionShape objects whenever possible. 36 35 ///There are 3 types of rigid bodies: … … 76 75 77 76 78 /// btRigidBodyConstructionInfoprovides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body.77 ///The btRigidBodyConstructionInfo structure provides information to create a rigid body. Setting mass to zero creates a fixed (non-dynamic) rigid body. 79 78 ///For dynamic objects, you can use the collision shape to approximate the local inertia tensor, otherwise use the zero vector (default argument) 80 79 ///You can use the motion state to synchronize the world transform between physics and graphics objects. … … 304 303 void updateInertiaTensor(); 305 304 306 const bt Point3& getCenterOfMassPosition() const {305 const btVector3& getCenterOfMassPosition() const { 307 306 return m_worldTransform.getOrigin(); 308 307 } … … 322 321 inline void setLinearVelocity(const btVector3& lin_vel) 323 322 { 324 assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT);325 323 m_linearVelocity = lin_vel; 326 324 } 327 325 328 inline void setAngularVelocity(const btVector3& ang_vel) { 329 assert (m_collisionFlags != btCollisionObject::CF_STATIC_OBJECT); 330 { 331 m_angularVelocity = ang_vel; 332 } 326 inline void setAngularVelocity(const btVector3& ang_vel) 327 { 328 m_angularVelocity = ang_vel; 333 329 } 334 330 … … 354 350 355 351 356 SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const bt Point3& pos, const btVector3& normal) const352 SIMD_FORCE_INLINE btScalar computeImpulseDenominator(const btVector3& pos, const btVector3& normal) const 357 353 { 358 354 btVector3 r0 = pos - getCenterOfMassPosition();
Note: See TracChangeset
for help on using the changeset viewer.