Changeset 7983 for code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btCollisionShape.h
- Timestamp:
- Feb 27, 2011, 7:43:24 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/kicklib/src/external/bullet/BulletCollision/CollisionShapes/btCollisionShape.h
r5781 r7983 1 1 /* 2 2 Bullet Continuous Collision Detection and Physics Library 3 Copyright (c) 2003-200 6 Erwin Coumans http://continuousphysics.com/Bullet/3 Copyright (c) 2003-2009 Erwin Coumans http://bulletphysics.org 4 4 5 5 This software is provided 'as-is', without any express or implied warranty. … … 21 21 #include "LinearMath/btMatrix3x3.h" 22 22 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" //for the shape types 23 class btSerializer; 24 23 25 24 26 ///The btCollisionShape class provides an interface for collision shapes that can be shared among btCollisionObjects. … … 47 49 virtual btScalar getAngularMotionDisc() const; 48 50 49 virtual btScalar getContactBreakingThreshold( ) const;51 virtual btScalar getContactBreakingThreshold(btScalar defaultContactThresholdFactor) const; 50 52 51 53 … … 54 56 void calculateTemporalAabb(const btTransform& curTrans,const btVector3& linvel,const btVector3& angvel,btScalar timeStep, btVector3& temporalAabbMin,btVector3& temporalAabbMax) const; 55 57 56 #ifndef __SPU__ 58 57 59 58 60 SIMD_FORCE_INLINE bool isPolyhedral() const … … 61 63 } 62 64 65 SIMD_FORCE_INLINE bool isConvex2d() const 66 { 67 return btBroadphaseProxy::isConvex2d(getShapeType()); 68 } 69 63 70 SIMD_FORCE_INLINE bool isConvex() const 64 71 { 65 72 return btBroadphaseProxy::isConvex(getShapeType()); 73 } 74 SIMD_FORCE_INLINE bool isNonMoving() const 75 { 76 return btBroadphaseProxy::isNonMoving(getShapeType()); 66 77 } 67 78 SIMD_FORCE_INLINE bool isConcave() const … … 74 85 } 75 86 87 SIMD_FORCE_INLINE bool isSoftBody() const 88 { 89 return btBroadphaseProxy::isSoftBody(getShapeType()); 90 } 91 76 92 ///isInfinite is used to catch simulation error (aabb check) 77 93 SIMD_FORCE_INLINE bool isInfinite() const … … 80 96 } 81 97 82 98 #ifndef __SPU__ 83 99 virtual void setLocalScaling(const btVector3& scaling) =0; 84 100 virtual const btVector3& getLocalScaling() const =0; … … 107 123 } 108 124 125 virtual int calculateSerializeBufferSize() const; 126 127 ///fills the dataBuffer and returns the struct name (and 0 on failure) 128 virtual const char* serialize(void* dataBuffer, btSerializer* serializer) const; 129 130 virtual void serializeSingleShape(btSerializer* serializer) const; 131 109 132 }; 133 134 ///do not change those serialization structures, it requires an updated sBulletDNAstr/sBulletDNAstr64 135 struct btCollisionShapeData 136 { 137 char *m_name; 138 int m_shapeType; 139 char m_padding[4]; 140 }; 141 142 SIMD_FORCE_INLINE int btCollisionShape::calculateSerializeBufferSize() const 143 { 144 return sizeof(btCollisionShapeData); 145 } 146 147 110 148 111 149 #endif //COLLISION_SHAPE_H
Note: See TracChangeset
for help on using the changeset viewer.