com.bulletphysics.extras.gimpact
Class PrimitiveTriangle
java.lang.Object
com.bulletphysics.extras.gimpact.PrimitiveTriangle
public class PrimitiveTriangle
- extends Object
vertices
public final Vector3f[] vertices
plane
public final Vector4f plane
margin
public float margin
PrimitiveTriangle
public PrimitiveTriangle()
set
public void set(PrimitiveTriangle tri)
buildTriPlane
public void buildTriPlane()
overlap_test_conservative
public boolean overlap_test_conservative(PrimitiveTriangle other)
- Test if triangles could collide.
get_edge_plane
public void get_edge_plane(int edge_index,
Vector4f plane)
- Calcs the plane which is paralele to the edge and perpendicular to the triangle plane.
This triangle must have its plane calculated.
applyTransform
public void applyTransform(Transform t)
clip_triangle
public int clip_triangle(PrimitiveTriangle other,
ObjectArrayList<Vector3f> clipped_points)
- Clips the triangle against this.
- Parameters:
clipped_points
- must have MAX_TRI_CLIPPING size, and this triangle must have its plane calculated.
- Returns:
- the number of clipped points
find_triangle_collision_clip_method
public boolean find_triangle_collision_clip_method(PrimitiveTriangle other,
TriangleContact contacts)
- Find collision using the clipping method.
This triangle and other must have their triangles calculated.