16 #ifndef BT_OBB_TRIANGLE_MINKOWSKI_H
17 #define BT_OBB_TRIANGLE_MINKOWSKI_H
39 return m_vertices1[index];
44 return m_vertices1[index];
48 vert = m_vertices1[index];
59 getVertex((i+1)%3,pb);
66 getAabbSlow(t,aabbMin,aabbMax);
71 btVector3 dots = dir.
dot3(m_vertices1[0], m_vertices1[1], m_vertices1[2]);
72 return m_vertices1[dots.
maxAxis()];
78 for (
int i=0;i<numVectors;i++)
81 btVector3 dots = dir.
dot3(m_vertices1[0], m_vertices1[1], m_vertices1[2]);
82 supportVerticesOut[i] = m_vertices1[dots.
maxAxis()];
103 getPlaneEquation(i,planeNormal,planeSupport);
113 normal = (m_vertices1[1]-m_vertices1[0]).
cross(m_vertices1[2]-m_vertices1[0]);
120 calcNormal(planeNormal);
121 planeSupport = m_vertices1[0];
139 if (dist >= -tolerance && dist <= tolerance)
151 btScalar edgeConst = pa.dot(edgeNormal);
153 if (dist < -tolerance)
175 calcNormal(penetrationVector);
183 #endif //BT_OBB_TRIANGLE_MINKOWSKI_H
virtual void getPlaneEquation(int i, btVector3 &planeNormal, btVector3 &planeSupport) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
float dist(const Point3 &pnt0, const Point3 &pnt1)
btTriangleShape(const btVector3 &p0, const btVector3 &p1, const btVector3 &p2)
virtual int getNumPreferredPenetrationDirections() const
btScalar dot(const btVector3 &v) const
Return the dot product.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
void calcNormal(btVector3 &normal) const
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual void getVertex(int index, btVector3 &vert) const
const btVector3 & getVertexPtr(int index) const
btVector3 & getVertexPtr(int index)
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
virtual int getNumEdges() const
btVector3 can be used to represent 3D points and vectors.
#define ATTRIBUTE_ALIGNED16(a)
virtual int getNumVertices() const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
static float4 cross(const float4 &a, const float4 &b)
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual void getAabb(const btTransform &t, btVector3 &aabbMin, btVector3 &aabbMax) const
getAabb's default implementation is brute force, expected derived classes to implement a fast dedicat...
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual int getNumPlanes() const
btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &dir) const
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
virtual const char * getName() const
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const