ManifoldPointId
public class IndexedManifoldPointId extends java.lang.Object implements ManifoldPointId
ManifoldPointId
that uses edge indexing.
The the edge and vertex indicies are the indicies of the edges
and verticies in the reference and incident Convex
Shape
s in
the collision.
The flipped flag is set when the default reference edge is swapped to be the incident edge.
For a given Convex
Shape
the indicies should not change, although
there is no mechanism preventing this. In the case they change, this should only
affect any caching of this information.
ManifoldPointId.DISTANCE
DISTANCE
Constructor | Description |
---|---|
IndexedManifoldPointId(int referenceEdge,
int incidentEdge,
int incidentVertex) |
Optional constructor.
|
IndexedManifoldPointId(int referenceEdge,
int incidentEdge,
int incidentVertex,
boolean flipped) |
Full constructor.
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
equals(java.lang.Object other) |
|
int |
getIncidentEdge() |
Returns the incident edge index of this manifold
on the other
Shape . |
int |
getIncidentVertex() |
Returns the index of the deepest collision point of the incident edge of this manifold on
the other
Shape . |
int |
getReferenceEdge() |
Returns the reference edge index of this manifold
on the
Shape . |
int |
hashCode() |
|
boolean |
isFlipped() |
Returns true if the reference edge and incident edges were swapped.
|
java.lang.String |
toString() |
public IndexedManifoldPointId(int referenceEdge, int incidentEdge, int incidentVertex)
referenceEdge
- the reference edge indexincidentEdge
- the incident edge indexincidentVertex
- the incident vertex indexpublic IndexedManifoldPointId(int referenceEdge, int incidentEdge, int incidentVertex, boolean flipped)
referenceEdge
- the reference edge indexincidentEdge
- the incident edge indexincidentVertex
- the incident vertex indexflipped
- whether the reference and incident features flippedpublic boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object
public int getReferenceEdge()
Shape
.
The reference edge is the edge that is most perpendicular to the collision normal.
public int getIncidentEdge()
Shape
.public int getIncidentVertex()
Shape
.public boolean isFlipped()