Changeset View
Changeset View
Standalone View
Standalone View
extern/bullet2/src/BulletCollision/CollisionShapes/btEmptyShape.h
| Show All 17 Lines | |||||
| #include "btConcaveShape.h" | #include "btConcaveShape.h" | ||||
| #include "LinearMath/btVector3.h" | #include "LinearMath/btVector3.h" | ||||
| #include "LinearMath/btTransform.h" | #include "LinearMath/btTransform.h" | ||||
| #include "LinearMath/btMatrix3x3.h" | #include "LinearMath/btMatrix3x3.h" | ||||
| #include "btCollisionMargin.h" | #include "btCollisionMargin.h" | ||||
| /// The btEmptyShape is a collision shape without actual collision detection shape, so most users should ignore this class. | /// The btEmptyShape is a collision shape without actual collision detection shape, so most users should ignore this class. | ||||
| /// It can be replaced by another shape during runtime, but the inertia tensor should be recomputed. | /// It can be replaced by another shape during runtime, but the inertia tensor should be recomputed. | ||||
| ATTRIBUTE_ALIGNED16(class) btEmptyShape : public btConcaveShape | ATTRIBUTE_ALIGNED16(class) | ||||
| btEmptyShape : public btConcaveShape | |||||
| { | { | ||||
| public: | public: | ||||
| BT_DECLARE_ALIGNED_ALLOCATOR(); | BT_DECLARE_ALIGNED_ALLOCATOR(); | ||||
| btEmptyShape(); | btEmptyShape(); | ||||
| virtual ~btEmptyShape(); | virtual ~btEmptyShape(); | ||||
| ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version | ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version | ||||
| void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const; | void getAabb(const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const; | ||||
| virtual void setLocalScaling(const btVector3& scaling) | virtual void setLocalScaling(const btVector3& scaling) | ||||
| { | { | ||||
| m_localScaling = scaling; | m_localScaling = scaling; | ||||
| } | } | ||||
| virtual const btVector3& getLocalScaling() const | virtual const btVector3& getLocalScaling() const | ||||
| { | { | ||||
| return m_localScaling; | return m_localScaling; | ||||
| } | } | ||||
| virtual void calculateLocalInertia(btScalar mass,btVector3& inertia) const; | virtual void calculateLocalInertia(btScalar mass, btVector3 & inertia) const; | ||||
| virtual const char* getName()const | virtual const char* getName() const | ||||
| { | { | ||||
| return "Empty"; | return "Empty"; | ||||
| } | } | ||||
| virtual void processAllTriangles(btTriangleCallback* ,const btVector3& ,const btVector3& ) const | virtual void processAllTriangles(btTriangleCallback*, const btVector3&, const btVector3&) const | ||||
| { | { | ||||
| } | } | ||||
| protected: | protected: | ||||
| btVector3 m_localScaling; | btVector3 m_localScaling; | ||||
| }; | }; | ||||
| #endif //BT_EMPTY_SHAPE_H | #endif //BT_EMPTY_SHAPE_H | ||||