Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef BT_CONVEX_SHAPE_INTERFACE1
00017 #define BT_CONVEX_SHAPE_INTERFACE1
00018
00019 #include "btCollisionShape.h"
00020
00021 #include "LinearMath/btVector3.h"
00022 #include "LinearMath/btTransform.h"
00023 #include "LinearMath/btMatrix3x3.h"
00024 #include "btCollisionMargin.h"
00025 #include "LinearMath/btAlignedAllocator.h"
00026
00027 #define MAX_PREFERRED_PENETRATION_DIRECTIONS 10
00028
00031 ATTRIBUTE_ALIGNED16(class) btConvexShape : public btCollisionShape
00032 {
00033
00034
00035 public:
00036
00037 BT_DECLARE_ALIGNED_ALLOCATOR();
00038
00039 btConvexShape ();
00040
00041 virtual ~btConvexShape();
00042
00043 virtual btVector3 localGetSupportingVertex(const btVector3& vec)const = 0;
00044
00046 #ifndef __SPU__
00047 virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const=0;
00048 #endif //#ifndef __SPU__
00049
00050 btVector3 localGetSupportVertexWithoutMarginNonVirtual (const btVector3& vec) const;
00051 btVector3 localGetSupportVertexNonVirtual (const btVector3& vec) const;
00052 btScalar getMarginNonVirtual () const;
00053 void getAabbNonVirtual (const btTransform& t, btVector3& aabbMin, btVector3& aabbMax) const;
00054
00055 virtual void project(const btTransform& trans, const btVector3& dir, float& min, float& max) const;
00056
00057
00058
00059 virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
00060
00062 void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
00063
00064 virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const =0;
00065
00066 virtual void setLocalScaling(const btVector3& scaling) =0;
00067 virtual const btVector3& getLocalScaling() const =0;
00068
00069 virtual void setMargin(btScalar margin)=0;
00070
00071 virtual btScalar getMargin() const=0;
00072
00073 virtual int getNumPreferredPenetrationDirections() const=0;
00074
00075 virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const=0;
00076
00077
00078
00079
00080 };
00081
00082
00083
00084 #endif //BT_CONVEX_SHAPE_INTERFACE1