com.jme.intersection
Class Intersection
java.lang.Object
com.jme.intersection.Intersection
public class Intersection
- extends java.lang.Object
Intersection
provides functional methods for calculating the
intersection of some objects. All the methods are static to allow for quick
and easy calls. Intersection
relays requests to specific
classes to handle the actual work. By providing checks to just
BoundingVolume
the client application need not worry about
what type of bounding volume is being used.
- Version:
- $Id: Intersection.java 4131 2009-03-19 20:15:28Z blaine.dev $
- Author:
- Mark Powell
Field Summary |
static double |
EPSILON
EPSILON represents the error buffer used to denote a hit. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
EPSILON
public static final double EPSILON
- EPSILON represents the error buffer used to denote a hit.
- See Also:
- Constant Field Values
Intersection
public Intersection()
meshIntersection
public static boolean meshIntersection(TriMesh mesh1,
TriMesh mesh2)
- This is a VERY brute force method of detecting if two TriMesh
objects intersect.
- Parameters:
mesh1
- The first TriMesh.mesh2
- The second TriMesh.
- Returns:
- True if they intersect, false otherwise.
intersection
public static boolean intersection(Vector3f v0,
Vector3f v1,
Vector3f v2,
Vector3f u0,
Vector3f u1,
Vector3f u2)
- This method tests for the intersection between two triangles defined by
their vertexes. Converted to java from C code found at
http://www.acm.org/jgt/papers/Moller97/tritri.html
- Parameters:
v0
- First triangle's first vertex.v1
- First triangle's second vertex.v2
- First triangle's third vertex.u0
- Second triangle's first vertex.u1
- Second triangle's second vertex.u2
- Second triangle's third vertex.
- Returns:
- True if the two triangles intersect, false otherwise.