com.jme.intersection
Class CollisionData

java.lang.Object
  extended bycom.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)
           
CollisionData(Geometry sourceMesh, Geometry targetMesh, java.util.ArrayList sourceTris, java.util.ArrayList targetTris)
          instantiates a new CollisionData object.
 
Method Summary
 Geometry getSourceMesh()
           
 java.util.ArrayList getSourceTris()
           
 Geometry getTargetMesh()
           
 java.util.ArrayList getTargetTris()
           
 void setSourceMesh(Geometry mesh)
           
 void setSourceTris(java.util.ArrayList source)
           
 void setTargetMesh(Geometry mesh)
          setTargetMesh sets the mesh that is hit by the source mesh.
 void setTargetTris(java.util.ArrayList 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)

CollisionData

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

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 getSourceTris()
Returns:
Returns the source.

setSourceTris

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

getTargetTris

public java.util.ArrayList getTargetTris()
Returns:
Returns the target.

setTargetTris

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