Class CollisionResult

java.lang.Object
com.jme3.collision.CollisionResult
All Implemented Interfaces:
Comparable<CollisionResult>

public class CollisionResult extends Object implements Comparable<CollisionResult>
A CollisionResult represents a single collision instance between two Collidable. A collision check can result in many collision instances (places where collision has occurred).
  • Constructor Details

    • CollisionResult

      public CollisionResult(Geometry geometry, Vector3f contactPoint, float distance, int triangleIndex)
    • CollisionResult

      public CollisionResult(Vector3f contactPoint, float distance)
    • CollisionResult

      public CollisionResult()
  • Method Details

    • setGeometry

      public void setGeometry(Geometry geom)
    • setContactNormal

      public void setContactNormal(Vector3f norm)
    • setContactPoint

      public void setContactPoint(Vector3f point)
    • setDistance

      public void setDistance(float dist)
    • setTriangleIndex

      public void setTriangleIndex(int index)
    • getTriangle

      public Triangle getTriangle(Triangle store)
    • compareTo

      public int compareTo(CollisionResult other)
      Specified by:
      compareTo in interface Comparable<CollisionResult>
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getContactPoint

      public Vector3f getContactPoint()
    • getContactNormal

      public Vector3f getContactNormal()
    • getDistance

      public float getDistance()
    • getGeometry

      public Geometry getGeometry()
    • getTriangleIndex

      public int getTriangleIndex()
    • toString

      public String toString()
      Overrides:
      toString in class Object