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_SIMPLEX_1TO4_SHAPE
00017 #define BT_SIMPLEX_1TO4_SHAPE
00018
00019
00020 #include "btPolyhedralConvexShape.h"
00021 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h"
00022
00023
00025 class btBU_Simplex1to4 : public btPolyhedralConvexAabbCachingShape
00026 {
00027 protected:
00028
00029 int m_numVertices;
00030 btVector3 m_vertices[4];
00031
00032 public:
00033 btBU_Simplex1to4();
00034
00035 btBU_Simplex1to4(const btVector3& pt0);
00036 btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1);
00037 btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2);
00038 btBU_Simplex1to4(const btVector3& pt0,const btVector3& pt1,const btVector3& pt2,const btVector3& pt3);
00039
00040
00041 void reset()
00042 {
00043 m_numVertices = 0;
00044 }
00045
00046 virtual void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
00047
00048 void addVertex(const btVector3& pt);
00049
00050
00051
00052 virtual int getNumVertices() const;
00053
00054 virtual int getNumEdges() const;
00055
00056 virtual void getEdge(int i,btVector3& pa,btVector3& pb) const;
00057
00058 virtual void getVertex(int i,btVector3& vtx) const;
00059
00060 virtual int getNumPlanes() const;
00061
00062 virtual void getPlane(btVector3& planeNormal,btVector3& planeSupport,int i) const;
00063
00064 virtual int getIndex(int i) const;
00065
00066 virtual bool isInside(const btVector3& pt,btScalar tolerance) const;
00067
00068
00070 virtual const char* getName()const { return "btBU_Simplex1to4";}
00071
00072 };
00073
00074 #endif //BT_SIMPLEX_1TO4_SHAPE