- Object
-
- IndexedManifoldPointId
-
- All Implemented Interfaces:
ManifoldPointId
public class IndexedManifoldPointId extends Object implements ManifoldPointId
Represents aManifoldPointId
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.- Since:
- 1.0.0
- Version:
- 3.2.0
- Author:
- William Bittle
- See Also:
ManifoldPointId.DISTANCE
-
-
Field Summary
-
Fields inherited from interface ManifoldPointId
DISTANCE
-
-
Constructor Summary
Constructors Constructor Description IndexedManifoldPointId(int referenceEdgeIndex, int incidentEdgeIndex, int incidentVertexIndex)
Optional constructor.IndexedManifoldPointId(int referenceEdgeIndex, int incidentEdgeIndex, int incidentVertexIndex, boolean flipped)
Full constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object other)
int
getIncidentEdgeIndex()
Returns the incident edge index of this manifold on the otherShape
.int
getIncidentVertexIndex()
Returns the index of the deepest collision point of the incident edge of this manifold on the otherShape
.int
getReferenceEdgeIndex()
Returns the reference edge index of this manifold on theShape
.int
hashCode()
boolean
isFlipped()
Returns true if the reference edge and incident edges were swapped.String
toString()
-
-
-
Constructor Detail
-
IndexedManifoldPointId
public IndexedManifoldPointId(int referenceEdgeIndex, int incidentEdgeIndex, int incidentVertexIndex)
Optional constructor.- Parameters:
referenceEdgeIndex
- the reference edge indexincidentEdgeIndex
- the incident edge indexincidentVertexIndex
- the incident vertex index- Since:
- 3.1.5
-
IndexedManifoldPointId
public IndexedManifoldPointId(int referenceEdgeIndex, int incidentEdgeIndex, int incidentVertexIndex, boolean flipped)
Full constructor.- Parameters:
referenceEdgeIndex
- the reference edge indexincidentEdgeIndex
- the incident edge indexincidentVertexIndex
- the incident vertex indexflipped
- whether the reference and incident features flipped
-
-
Method Detail
-
getReferenceEdgeIndex
public int getReferenceEdgeIndex()
Returns the reference edge index of this manifold on theShape
.The reference edge is the edge that is most perpendicular to the collision normal.
- Returns:
- int
-
getIncidentEdgeIndex
public int getIncidentEdgeIndex()
Returns the incident edge index of this manifold on the otherShape
.- Returns:
- int
-
getIncidentVertexIndex
public int getIncidentVertexIndex()
Returns the index of the deepest collision point of the incident edge of this manifold on the otherShape
.- Returns:
- int
-
isFlipped
public boolean isFlipped()
Returns true if the reference edge and incident edges were swapped.- Returns:
- boolean
-
-