public class CollisionResult extends java.lang.Object implements java.lang.Comparable<CollisionResult>
CollisionResult
represents a single collision instance
between two Collidable
. A collision check can result in many
collision instances (places where collision has occurred).Constructor and Description |
---|
CollisionResult() |
CollisionResult(Geometry geometry,
Vector3f contactPoint,
float distance,
int triangleIndex) |
CollisionResult(Vector3f contactPoint,
float distance) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(CollisionResult other) |
boolean |
equals(java.lang.Object obj) |
Vector3f |
getContactNormal() |
Vector3f |
getContactPoint() |
float |
getDistance() |
Geometry |
getGeometry() |
Triangle |
getTriangle(Triangle store) |
int |
getTriangleIndex() |
int |
hashCode() |
void |
setContactNormal(Vector3f norm) |
void |
setContactPoint(Vector3f point) |
void |
setDistance(float dist) |
void |
setGeometry(Geometry geom) |
void |
setTriangleIndex(int index) |
java.lang.String |
toString() |
public CollisionResult(Geometry geometry, Vector3f contactPoint, float distance, int triangleIndex)
public CollisionResult(Vector3f contactPoint, float distance)
public CollisionResult()
public void setGeometry(Geometry geom)
public void setContactNormal(Vector3f norm)
public void setContactPoint(Vector3f point)
public void setDistance(float dist)
public void setTriangleIndex(int index)
public int compareTo(CollisionResult other)
compareTo
in interface java.lang.Comparable<CollisionResult>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public Vector3f getContactPoint()
public Vector3f getContactNormal()
public float getDistance()
public Geometry getGeometry()
public int getTriangleIndex()
public java.lang.String toString()
toString
in class java.lang.Object