com.jme.intersection
Class IntersectionSphere
java.lang.Object
com.jme.intersection.IntersectionSphere
public class IntersectionSphere
- extends java.lang.Object
Intersection
provides functional methods for calculating the
intersection of sphere objects. All the methods are static to allow for quick
and easy calls.
- Version:
- $Id: IntersectionSphere.java,v 1.4 2004/09/02 18:02:01 mojomonkey
Exp $
- Author:
- Mark Powell
Method Summary |
static boolean |
intersection(BoundingSphere sphere1,
BoundingSphere sphere2,
Vector3f velocity1,
Vector3f velocity2,
float time)
intersection compares two dynamic spheres. |
static boolean |
intersection(Line line,
BoundingSphere sphere,
Vector3f velocity,
float time)
intersection compares a dynamic sphere to a stationary
line. |
static boolean |
intersection(Plane plane,
BoundingSphere sphere,
Vector3f velocity,
float time)
intersection compares a dynamix sphere to a stationary
plane. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
intersection
public static boolean intersection(Line line,
BoundingSphere sphere,
Vector3f velocity,
float time)
intersection
compares a dynamic sphere to a stationary
line. The velocity of the sphere is given as well as the period of time
for movement. If a collision occurs somewhere along this time period,
true is returned. False is returned otherwise.
- Parameters:
line
- the stationary line to test against.sphere
- the dynamic sphere to test.velocity
- the velocity of the sphere.time
- the time range to test.
- Returns:
- true if intersection occurs, false otherwise.
intersection
public static boolean intersection(Plane plane,
BoundingSphere sphere,
Vector3f velocity,
float time)
intersection
compares a dynamix sphere to a stationary
plane. The velocity of the sphere is given as well as the period of time
for movement. If a collision occurs somewhere along this time period,
true is returned. False is returned otherwise.
- Parameters:
plane
- the stationary plane to test against.sphere
- the dynamic sphere to test.velocity
- the velocity of the sphere.time
- the time range to test.
- Returns:
- true if intersection occurs, false otherwise.
intersection
public static boolean intersection(BoundingSphere sphere1,
BoundingSphere sphere2,
Vector3f velocity1,
Vector3f velocity2,
float time)
intersection
compares two dynamic spheres. Both sphers
have a velocity and a time is givin to check for. If these spheres will
collide within the time alloted, true is returned, otherwise false is
returned.
- Parameters:
sphere1
- the first sphere to test.sphere2
- the second sphere to test.velocity1
- the velocity of the first sphere.velocity2
- the velocity of the second sphere.time
- the time frame to check.
- Returns:
- true if a collision occurs, false otherwise.