Differential D8762 Diff 28333 extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionShapes/btTriangleMeshShape.h
| Show All 13 Lines | |||||
| */ | */ | ||||
| #ifndef BT_TRIANGLE_MESH_SHAPE_H | #ifndef BT_TRIANGLE_MESH_SHAPE_H | ||||
| #define BT_TRIANGLE_MESH_SHAPE_H | #define BT_TRIANGLE_MESH_SHAPE_H | ||||
| #include "btConcaveShape.h" | #include "btConcaveShape.h" | ||||
| #include "btStridingMeshInterface.h" | #include "btStridingMeshInterface.h" | ||||
| ///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. | ///The btTriangleMeshShape is an internal concave triangle mesh interface. Don't use this class directly, use btBvhTriangleMeshShape instead. | ||||
| ATTRIBUTE_ALIGNED16(class) btTriangleMeshShape : public btConcaveShape | ATTRIBUTE_ALIGNED16(class) | ||||
| btTriangleMeshShape : public btConcaveShape | |||||
| { | { | ||||
| protected: | protected: | ||||
| btVector3 m_localAabbMin; | btVector3 m_localAabbMin; | ||||
| btVector3 m_localAabbMax; | btVector3 m_localAabbMax; | ||||
| btStridingMeshInterface* m_meshInterface; | btStridingMeshInterface* m_meshInterface; | ||||
| ///btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. | ///btTriangleMeshShape constructor has been disabled/protected, so that users will not mistakenly use this class. | ||||
| ///Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead! | ///Don't use btTriangleMeshShape but use btBvhTriangleMeshShape instead! | ||||
| btTriangleMeshShape(btStridingMeshInterface* meshInterface); | btTriangleMeshShape(btStridingMeshInterface * meshInterface); | ||||
| public: | public: | ||||
| BT_DECLARE_ALIGNED_ALLOCATOR(); | BT_DECLARE_ALIGNED_ALLOCATOR(); | ||||
| virtual ~btTriangleMeshShape(); | virtual ~btTriangleMeshShape(); | ||||
| virtual btVector3 localGetSupportingVertex(const btVector3& vec) const; | virtual btVector3 localGetSupportingVertex(const btVector3& vec) const; | ||||
| virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec)const | virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const | ||||
| { | { | ||||
| btAssert(0); | btAssert(0); | ||||
| return localGetSupportingVertex(vec); | return localGetSupportingVertex(vec); | ||||
| } | } | ||||
| void recalcLocalAabb(); | void recalcLocalAabb(); | ||||
| virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; | virtual void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; | ||||
| virtual void processAllTriangles(btTriangleCallback* callback,const btVector3& aabbMin,const btVector3& aabbMax) const; | virtual void processAllTriangles(btTriangleCallback * callback, const btVector3& aabbMin, const btVector3& aabbMax) const; | ||||
| virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; | virtual void calculateLocalInertia(btScalar mass, btVector3 & inertia) const; | ||||
| virtual void setLocalScaling(const btVector3& scaling); | virtual void setLocalScaling(const btVector3& scaling); | ||||
| virtual const btVector3& getLocalScaling() const; | virtual const btVector3& getLocalScaling() const; | ||||
| btStridingMeshInterface* getMeshInterface() | btStridingMeshInterface* getMeshInterface() | ||||
| { | { | ||||
| return m_meshInterface; | return m_meshInterface; | ||||
| } | } | ||||
| const btStridingMeshInterface* getMeshInterface() const | const btStridingMeshInterface* getMeshInterface() const | ||||
| { | { | ||||
| return m_meshInterface; | return m_meshInterface; | ||||
| } | } | ||||
| const btVector3& getLocalAabbMin() const | const btVector3& getLocalAabbMin() const | ||||
| { | { | ||||
| return m_localAabbMin; | return m_localAabbMin; | ||||
| } | } | ||||
| const btVector3& getLocalAabbMax() const | const btVector3& getLocalAabbMax() const | ||||
| { | { | ||||
| return m_localAabbMax; | return m_localAabbMax; | ||||
| } | } | ||||
| //debugging | //debugging | ||||
| virtual const char* getName()const {return "TRIANGLEMESH";} | virtual const char* getName() const { return "TRIANGLEMESH"; } | ||||
| }; | }; | ||||
| #endif //BT_TRIANGLE_MESH_SHAPE_H | #endif //BT_TRIANGLE_MESH_SHAPE_H | ||||