38 for ( _k=0;_k<point_count;_k++)
47 point_indices[0] = _k;
60 m_points[_k] = points[point_indices[_k]];
75 if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f)
return false;
84 if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f)
return false;
104 if (clipped_count == 0)
return 0;
115 if (clipped_count == 0)
return 0;
121 edgeplane,temp_points1,clipped_count,clipped_points);
123 return clipped_count;
142 if (clipped_count == 0 )
160 if (clipped_count == 0 )
204 if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f)
return false;
213 if (dis0>0.0f&&dis1>0.0f&&dis2>0.0f)
return false;
bool overlap_test_conservative(const btTriangleShapeEx &other)
class btTriangleShapeEx: public btTriangleShape
bool overlap_test_conservative(const btPrimitiveTriangle &other)
Test if triangles could collide.
Helper class for colliding Bullet Triangle Shapes.
void buildTriPlane(btVector4 &plane) const
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.
virtual btScalar getMargin() const
btScalar bt_distance_point_plane(const btVector4 &plane, const btVector3 &point)
int bt_plane_clip_polygon(const btVector4 &plane, const btVector3 *polygon_points, int polygon_point_count, btVector3 *clipped)
Clips a polygon by a plane.
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.
btVector3 can be used to represent 3D points and vectors.
bool find_triangle_collision_clip_method(btPrimitiveTriangle &other, GIM_TRIANGLE_CONTACT &contacts)
Find collision using the clipping method.
float btScalar
The btScalar type abstracts floating point numbers, to easily switch between double and single floati...