com.jme.intersection
Class CollisionData

java.lang.Object
  extended by com.jme.intersection.CollisionData

public class CollisionData
extends java.lang.Object

CollisionData contains information about a collision between two TriMesh objects. The mesh that was hit by the relevant TriMesh (the one making the collision check) is referenced as well as an ArrayList for the triangles that collided.

Author:
Mark Powell

Constructor Summary
CollisionData(Geometry sourceMesh, Geometry targetMesh)
          instantiates a new CollisionData object.
CollisionData(Geometry sourceMesh, Geometry targetMesh, java.util.ArrayList<java.lang.Integer> sourceTris, java.util.ArrayList<java.lang.Integer> targetTris)
          instantiates a new CollisionData object.
 
Method Summary
 Geometry getSourceMesh()
           
 java.util.ArrayList<java.lang.Integer> getSourceTris()
           
 Geometry getTargetMesh()
           
 java.util.ArrayList<java.lang.Integer> getTargetTris()
           
 void setSourceMesh(Geometry mesh)
           
 void setSourceTris(java.util.ArrayList<java.lang.Integer> source)
           
 void setTargetMesh(Geometry mesh)
          setTargetMesh sets the mesh that is hit by the source mesh.
 void setTargetTris(java.util.ArrayList<java.lang.Integer> target)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollisionData

public CollisionData(Geometry sourceMesh,
                     Geometry targetMesh)
instantiates a new CollisionData object.

Parameters:
sourceMesh - the relevant Geometry
targetMesh - the mesh the relevant Geometry collided with.

CollisionData

public CollisionData(Geometry sourceMesh,
                     Geometry targetMesh,
                     java.util.ArrayList<java.lang.Integer> sourceTris,
                     java.util.ArrayList<java.lang.Integer> targetTris)
instantiates a new CollisionData object.

Parameters:
sourceMesh - the relevant Geometry
targetMesh - the mesh the relevant Geometry collided with.
sourceTris - the triangles of the relevant TriMesh that made contact.
targetTris - the triangles of the second mesh that made contact.
Method Detail

getSourceMesh

public Geometry getSourceMesh()
Returns:
Returns the source mesh.

getTargetMesh

public Geometry getTargetMesh()

setSourceMesh

public void setSourceMesh(Geometry mesh)
Parameters:
mesh - The mesh to set.

setTargetMesh

public void setTargetMesh(Geometry mesh)
setTargetMesh sets the mesh that is hit by the source mesh.

Parameters:
mesh - the mesh that was hit by the source mesh.

getSourceTris

public java.util.ArrayList<java.lang.Integer> getSourceTris()
Returns:
Returns the source.

setSourceTris

public void setSourceTris(java.util.ArrayList<java.lang.Integer> source)
Parameters:
source - The source to set.

getTargetTris

public java.util.ArrayList<java.lang.Integer> getTargetTris()
Returns:
Returns the target.

setTargetTris

public void setTargetTris(java.util.ArrayList<java.lang.Integer> target)
Parameters:
target - The target to set.