Logo Search packages:      
Sourcecode: blender version File versions

btConvexInternalShape.h

#ifndef BT_CONVEX_INTERNAL_SHAPE_H
#define BT_CONVEX_INTERNAL_SHAPE_H

#include "btConvexShape.h"

///The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
00008 class btConvexInternalShape : public btConvexShape
{

      protected:

      //local scaling. collisionMargin is not scaled !
      btVector3   m_localScaling;

      btVector3   m_implicitShapeDimensions;
      
      btScalar    m_collisionMargin;

      btScalar    m_padding;

      btConvexInternalShape();

public:

      

      virtual ~btConvexInternalShape()
      {

      }

      virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;

      const btVector3& getImplicitShapeDimensions() const
      {
            return m_implicitShapeDimensions;
      }

      ///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
00041       void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
      {
            getAabbSlow(t,aabbMin,aabbMax);
      }


      
      virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;


      virtual void      setLocalScaling(const btVector3& scaling);
      virtual const btVector3& getLocalScaling() const 
      {
            return m_localScaling;
      }

      const btVector3& getLocalScalingNV() const 
      {
            return m_localScaling;
      }

      virtual void      setMargin(btScalar margin)
      {
            m_collisionMargin = margin;
      }
      virtual btScalar  getMargin() const
      {
            return m_collisionMargin;
      }

      btScalar    getMarginNV() const
      {
            return m_collisionMargin;
      }

      virtual int       getNumPreferredPenetrationDirections() const
      {
            return 0;
      }
      
      virtual void      getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
      {
            (void)penetrationVector;
            (void)index;
            btAssert(0);
      }


      
};


#endif //BT_CONVEX_INTERNAL_SHAPE_H

Generated by  Doxygen 1.6.0   Back to index