Back to index

supertuxkart  0.5+dfsg1
btConvexTriangleMeshShape.h
Go to the documentation of this file.
00001 #ifndef CONVEX_TRIANGLEMESH_SHAPE_H
00002 #define CONVEX_TRIANGLEMESH_SHAPE_H
00003 
00004 
00005 #include "btPolyhedralConvexShape.h"
00006 #include "BulletCollision/BroadphaseCollision/btBroadphaseProxy.h" // for the types
00007 
00008 
00011 class btConvexTriangleMeshShape : public btPolyhedralConvexShape
00012 {
00013 
00014        class btStridingMeshInterface*     m_stridingMesh;
00015 
00016 public:
00017        btConvexTriangleMeshShape(btStridingMeshInterface* meshInterface);
00018 
00019        class btStridingMeshInterface*     getMeshInterface()
00020        {
00021               return m_stridingMesh;
00022        }
00023        const class btStridingMeshInterface* getMeshInterface() const
00024        {
00025               return m_stridingMesh;
00026        }
00027        
00028        virtual btVector3    localGetSupportingVertex(const btVector3& vec)const;
00029        virtual btVector3    localGetSupportingVertexWithoutMargin(const btVector3& vec)const;
00030        virtual void  batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const;
00031        
00032        virtual int   getShapeType()const { return CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE; }
00033 
00034        //debugging
00035        virtual const char*  getName()const {return "ConvexTrimesh";}
00036        
00037        virtual int   getNumVertices() const;
00038        virtual int getNumEdges() const;
00039        virtual void getEdge(int i,btPoint3& pa,btPoint3& pb) const;
00040        virtual void getVertex(int i,btPoint3& vtx) const;
00041        virtual int   getNumPlanes() const;
00042        virtual void getPlane(btVector3& planeNormal,btPoint3& planeSupport,int i ) const;
00043        virtual       bool isInside(const btPoint3& pt,btScalar tolerance) const;
00044 
00045        
00046        virtual void  setLocalScaling(const btVector3& scaling);
00047        virtual const btVector3& getLocalScaling() const;
00048 
00049 };
00050 
00051 
00052 
00053 #endif //CONVEX_TRIANGLEMESH_SHAPE_H
00054 
00055