public class ContactInfo
extends java.lang.Object
getContacts
method of
AbstractCollider
. This information includes the interpenetrating
vertices of mesh, and the contact regions formed from matching
interpenetration zones. Contact information produced by
SurfaceMeshCollider
also includes the intersection
contours and interpenetration regions on each mesh.
Contact information can be used to produce dynamic constraints for handling the contact.
Constructor and Description |
---|
ContactInfo(PolygonalMesh m0,
PolygonalMesh m1) |
Modifier and Type | Method and Description |
---|---|
java.util.HashMap<PenetrationRegion,PenetrationRegion> |
findMatchingRegions()
Finds the penetration regions on each mesh that correspond to each other,
in terms of sharing the same intersection contours.
|
java.util.ArrayList<ContactPlane> |
getContactPlanes()
Returns a set of contact planes for this contact.
|
java.util.ArrayList<IntersectionContour> |
getContours()
Returns the intersection contours associated with this contact.
|
java.util.ArrayList<EdgeEdgeContact> |
getEdgeEdgeContacts()
Returns the edge-edge contacts for this contact.
|
java.util.ArrayList<TriTriIntersection> |
getIntersections()
Returns the triangle intersections for this contact.
|
PolygonalMesh |
getMesh0()
Returns the first mesh associated with this contact information.
|
PolygonalMesh |
getMesh1()
Returns the second mesh associated with this contact information.
|
java.util.ArrayList<PenetratingPoint> |
getPenetratingPoints0()
Returns the penetrating points of the first mesh.
|
java.util.ArrayList<PenetratingPoint> |
getPenetratingPoints1()
Returns the penetrating points of the second mesh.
|
java.util.ArrayList<PenetrationRegion> |
getPenetrationRegions0()
Returns the contact penetration regions associated with the first
mesh.
|
java.util.ArrayList<PenetrationRegion> |
getPenetrationRegions1()
Returns the contact penetration regions associated with the second
mesh.
|
public ContactInfo(PolygonalMesh m0, PolygonalMesh m1)
public PolygonalMesh getMesh0()
public PolygonalMesh getMesh1()
public java.util.ArrayList<PenetrationRegion> getPenetrationRegions0()
null
is returned. At present, only SurfaceMeshCollider
can compute penetration regions.null
if this information is not available.
Should not
be modified.public java.util.ArrayList<PenetrationRegion> getPenetrationRegions1()
null
is returned. At present, only SurfaceMeshCollider
can compute penetration regions.null
if this information is not available. Should not
be modified.public java.util.ArrayList<IntersectionContour> getContours()
null
is returned. At
present, only SurfaceMeshCollider
can compute contours.null
if
they are not available. Should not be modified.public java.util.ArrayList<PenetratingPoint> getPenetratingPoints0()
This method computes the penetration points on demand and then caches the result.
public java.util.ArrayList<PenetratingPoint> getPenetratingPoints1()
This method computes the penetration points on demand and then caches the result.
public java.util.ArrayList<ContactPlane> getContactPlanes()
Contact planes are typically used for handling rigid body contact, and their computation depends on the collider used for determining the contact information. If no suitable penetration zones are found between the meshes, no contact planes will be produced.
The method computes contact planes on demand and then caches the result.
public java.util.HashMap<PenetrationRegion,PenetrationRegion> findMatchingRegions()
null
is returned. At present, only SurfaceMeshCollider
can compute penetration regions.null
if penetration
regions are not available.public java.util.ArrayList<EdgeEdgeContact> getEdgeEdgeContacts()
null
is returned. At present, only SurfaceMeshCollider
can compute edge-edge contacts.
The method computes the contacts on demand and then caches the result.
null
if this
information is not available. Should not be modified.public java.util.ArrayList<TriTriIntersection> getIntersections()
null
is returned. At present, only
MeshCollider
produces triangle intersections.null
if
unavailable.