Bullet Collision Detection & Physics Library
|
Go to the documentation of this file.
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++)
145 btScalar edgeConst = pa.dot(edgeNormal);
147 if (dist < -tolerance)
169 calcNormal(penetrationVector);
175 #endif //BT_OBB_TRIANGLE_MINKOWSKI_H
virtual void getPlane(btVector3 &planeNormal, btVector3 &planeSupport, int i) const
The btPolyhedralConvexShape is an internal interface class for polyhedral convex shapes.
void calcNormal(btVector3 &normal) const
virtual const char * getName() const
const btVector3 & getVertexPtr(int index) const
btVector3 dot3(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2) const
void setValue(const btScalar &_x, const btScalar &_y, const btScalar &_z)
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...
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
btVector3 cross(const btVector3 &v) const
Return the cross product between this and another vector.
int maxAxis() const
Return the axis with the largest value Note return values are 0,1,2 for x, y, or z.
btScalar dot(const btVector3 &v) const
Return the dot product.
virtual bool isInside(const btVector3 &pt, btScalar tolerance) const
virtual void getEdge(int i, btVector3 &pa, btVector3 &pb) const
virtual int getNumPreferredPenetrationDirections() const
virtual void getPreferredPenetrationDirection(int index, btVector3 &penetrationVector) const
virtual void getPlaneEquation(int i, btVector3 &planeNormal, btVector3 &planeSupport) const
virtual void batchedUnitVectorGetSupportingVertexWithoutMargin(const btVector3 *vectors, btVector3 *supportVerticesOut, int numVectors) const
virtual void calculateLocalInertia(btScalar mass, btVector3 &inertia) const
btVector3 localGetSupportingVertexWithoutMargin(const btVector3 &dir) const
#define BT_DECLARE_ALIGNED_ALLOCATOR()
btVector3 can be used to represent 3D points and vectors.
virtual void getVertex(int index, btVector3 &vert) const
#define ATTRIBUTE_ALIGNED16(a)
virtual int getNumPlanes() const
virtual int getNumEdges() const
btTriangleShape(const btVector3 &p0, const btVector3 &p1, const btVector3 &p2)
virtual int getNumVertices() const
btVector3 & normalize()
Normalize this vector x^2 + y^2 + z^2 = 1.
btVector3 & getVertexPtr(int index)