Back to index

supertuxkart  0.5+dfsg1
btConvexInternalShape.h
Go to the documentation of this file.
00001 
00002 #ifndef BT_CONVEX_INTERNAL_SHAPE_H
00003 #define BT_CONVEX_INTERNAL_SHAPE_H
00004 
00005 #include "btConvexShape.h"
00006 
00008 class btConvexInternalShape : public btConvexShape
00009 {
00010 
00011        protected:
00012 
00013        //local scaling. collisionMargin is not scaled !
00014        btVector3     m_localScaling;
00015 
00016        btVector3     m_implicitShapeDimensions;
00017        
00018        btScalar      m_collisionMargin;
00019 
00020        btScalar      m_padding;
00021 
00022 public:
00023 
00024        btConvexInternalShape();
00025 
00026        virtual ~btConvexInternalShape()
00027        {
00028 
00029        }
00030 
00031 
00032        virtual btVector3    localGetSupportingVertex(const btVector3& vec)const;
00033 #ifndef __SPU__
00034        virtual btVector3    localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0;
00035        
00036        //notice that the vectors should be unit length
00037        virtual void  batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
00038 #endif //#ifndef __SPU__
00039 
00040        const btVector3& getImplicitShapeDimensions() const
00041        {
00042               return m_implicitShapeDimensions;
00043        }
00044 
00046        void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
00047        {
00048               getAabbSlow(t,aabbMin,aabbMax);
00049        }
00050 
00051 
00052        
00053        virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
00054 
00055 
00056        virtual void  setLocalScaling(const btVector3& scaling);
00057        virtual const btVector3& getLocalScaling() const 
00058        {
00059               return m_localScaling;
00060        }
00061 
00062        const btVector3& getLocalScalingNV() const 
00063        {
00064               return m_localScaling;
00065        }
00066 
00067        virtual void  setMargin(btScalar margin)
00068        {
00069               m_collisionMargin = margin;
00070        }
00071        virtual btScalar     getMargin() const
00072        {
00073               return m_collisionMargin;
00074        }
00075 
00076        btScalar      getMarginNV() const
00077        {
00078               return m_collisionMargin;
00079        }
00080 
00081        virtual int          getNumPreferredPenetrationDirections() const
00082        {
00083               return 0;
00084        }
00085        
00086        virtual void  getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
00087        {
00088               (void)penetrationVector;
00089               (void)index;
00090               btAssert(0);
00091        }
00092 
00093 
00094        
00095 };
00096 
00097 
00098 #endif //BT_CONVEX_INTERNAL_SHAPE_H