2
#ifndef BT_CONVEX_INTERNAL_SHAPE_H
3
#define BT_CONVEX_INTERNAL_SHAPE_H
5
#include "btConvexShape.h"
7
///The btConvexInternalShape is an internal base class, shared by most convex shape implementations.
8
class btConvexInternalShape : public btConvexShape
13
//local scaling. collisionMargin is not scaled !
14
btVector3 m_localScaling;
16
btVector3 m_implicitShapeDimensions;
18
btScalar m_collisionMargin;
24
btConvexInternalShape();
26
virtual ~btConvexInternalShape()
32
virtual btVector3 localGetSupportingVertex(const btVector3& vec)const;
34
virtual btVector3 localGetSupportingVertexWithoutMargin(const btVector3& vec) const= 0;
36
//notice that the vectors should be unit length
37
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3* vectors,btVector3* supportVerticesOut,int numVectors) const= 0;
38
#endif //#ifndef __SPU__
40
const btVector3& getImplicitShapeDimensions() const
42
return m_implicitShapeDimensions;
45
///getAabb's default implementation is brute force, expected derived classes to implement a fast dedicated version
46
void getAabb(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const
48
getAabbSlow(t,aabbMin,aabbMax);
53
virtual void getAabbSlow(const btTransform& t,btVector3& aabbMin,btVector3& aabbMax) const;
56
virtual void setLocalScaling(const btVector3& scaling);
57
virtual const btVector3& getLocalScaling() const
59
return m_localScaling;
62
const btVector3& getLocalScalingNV() const
64
return m_localScaling;
67
virtual void setMargin(btScalar margin)
69
m_collisionMargin = margin;
71
virtual btScalar getMargin() const
73
return m_collisionMargin;
76
btScalar getMarginNV() const
78
return m_collisionMargin;
81
virtual int getNumPreferredPenetrationDirections() const
86
virtual void getPreferredPenetrationDirection(int index, btVector3& penetrationVector) const
88
(void)penetrationVector;
98
#endif //BT_CONVEX_INTERNAL_SHAPE_H