27 btScalar margin,
const btVector3* points,
int point_count)
36 for (_k = 0; _k < point_count; _k++)
45 point_indices[0] = _k;
58 m_points[_k] = points[point_indices[_k]];
73 if (dis0 > 0.0f && dis1 > 0.0f && dis2 > 0.0f)
return false;
82 if (dis0 > 0.0f && dis1 > 0.0f && dis2 > 0.0f)
return false;
98 edgeplane, other.m_vertices[0], other.m_vertices[1], other.m_vertices[2], temp_points);
100 if (clipped_count == 0)
return 0;
109 if (clipped_count == 0)
return 0;
115 edgeplane, temp_points1, clipped_count, clipped_points);
117 return clipped_count;
135 if (clipped_count == 0)
150 clipped_count = other.clip_triangle(*
this, clipped_points);
152 if (clipped_count == 0)
182 other.buildTriPlane(plane1);
191 if (dis0 > 0.0f && dis1 > 0.0f && dis2 > 0.0f)
return false;
200 if (dis0 > 0.0f && dis1 > 0.0f && dis2 > 0.0f)
return false;
SIMD_FORCE_INLINE btScalar bt_distance_point_plane(const btVector4 &plane, const btVector3 &point)
SIMD_FORCE_INLINE int bt_plane_clip_triangle(const btVector4 &plane, const btVector3 &point0, const btVector3 &point1, const btVector3 &point2, btVector3 *clipped)
Clips a polygon by a plane.
SIMD_FORCE_INLINE int bt_plane_clip_polygon(const btVector4 &plane, const btVector3 *polygon_points, int polygon_point_count, btVector3 *clipped)
Clips a polygon by a plane.
virtual btScalar getMargin() const =0
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...
bool find_triangle_collision_clip_method(btPrimitiveTriangle &other, GIM_TRIANGLE_CONTACT &contacts)
Find collision using the clipping method.
SIMD_FORCE_INLINE void get_edge_plane(int edge_index, btVector4 &plane) const
Calcs the plane which is paralele to the edge and perpendicular to the triangle plane.
int clip_triangle(btPrimitiveTriangle &other, btVector3 *clipped_points)
Clips the triangle against this.
bool overlap_test_conservative(const btPrimitiveTriangle &other)
Test if triangles could collide.
Helper class for colliding Bullet Triangle Shapes.
SIMD_FORCE_INLINE void buildTriPlane(btVector4 &plane) const
bool overlap_test_conservative(const btTriangleShapeEx &other)
class btTriangleShapeEx: public btTriangleShape