16#ifndef BT_OBB_TRIANGLE_MINKOWSKI_H
17#define BT_OBB_TRIANGLE_MINKOWSKI_H
37 return m_vertices1[index];
42 return m_vertices1[index];
46 vert = m_vertices1[index];
57 getVertex((i + 1) % 3, pb);
63 getAabbSlow(t, aabbMin, aabbMax);
68 btVector3 dots = dir.
dot3(m_vertices1[0], m_vertices1[1], m_vertices1[2]);
69 return m_vertices1[dots.
maxAxis()];
74 for (
int i = 0; i < numVectors; i++)
77 btVector3 dots = dir.
dot3(m_vertices1[0], m_vertices1[1], m_vertices1[2]);
78 supportVerticesOut[i] = m_vertices1[dots.
maxAxis()];
97 getPlaneEquation(i, planeNormal, planeSupport);
107 normal = (m_vertices1[1] - m_vertices1[0]).cross(m_vertices1[2] - m_vertices1[0]);
114 calcNormal(planeNormal);
115 planeSupport = m_vertices1[0];
133 if (dist >= -tolerance && dist <= tolerance)
137 for (i = 0; i < 3; i++)
147 if (dist < -tolerance)
169 calcNormal(penetrationVector);
@ TRIANGLE_SHAPE_PROXYTYPE
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
#define ATTRIBUTE_ALIGNED16(a)
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual int getNumPlanes() const
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
const btVector3 & getVertexPtr(int index) const
virtual int getNumEdges() const
virtual void getVertex(int index, btVector3 &vert) const
btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &dir) const
btTriangleShape(const btVector3 &p0, const btVector3 &p1, const btVector3 &p2)
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual const char * getName() 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 int getNumVertices() const
void calcNormal(btVector3 &normal) const
BT_DECLARE_ALIGNED_ALLOCATOR()
virtual void getPlaneEquation(int i, btVector3 &planeNormal, btVector3 &planeSupport) const
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
btVector3 & getVertexPtr(int index)
virtual int getNumPreferredPenetrationDirections() const
btVector3 can be used to represent 3D points and vectors.
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
btScalar dot(const btVector3 &v) const
Return the dot product.
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.