|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.geometry.collision.CollisionFinder
public class CollisionFinder
This class can be used to find different kinds of collisions
Constructor Summary | |
---|---|
CollisionFinder()
|
Method Summary | |
---|---|
static boolean |
collide(BoundingBox box1,
BoundingBox box2)
Returns whethter or not a collision between the two specified bounding boxes has occured. |
static boolean |
collide(BoundingCylinder cyl1,
BoundingCylinder cyl2)
|
static boolean |
collide(BoundingSphere sphere1,
BoundingSphere sphere2)
Returns whethter or not a collision between the two specified bounding spheres has occured. |
static Point3D |
getPointOfIntersection(AbstractMesh mesh,
int screenX,
int screenY)
Returns the point of intersection between the specified mesh and a line that is shot from the screen coordinates into to scene. |
static Point3D |
getPointOfIntersection(AbstractMesh mesh,
Line3D line)
Returns the point of intersection between the specified mesh and the specified line, if the mesh is set to pickable. |
static Point3D |
getPointOfIntersection(BoundingBox box,
int screenX,
int screenY)
Returns the point of intersection of a line that is shot into the world from the specified screen coordinates and the specified bounding box. |
static Point3D |
getPointOfIntersection(BoundingBox box,
Line3D line)
Returns the point of intersection between the specified line and the specified bounding box. |
static Point3D |
getPointOfIntersection(BoundingSphere sphere,
int screenX,
int screenY)
Returns the point of intersection of a line that is shot into the world from the specified screen coordinates and the specified bounding sphere. |
static Point3D |
getPointOfIntersection(BoundingSphere sphere,
Line3D line)
Returns the point of intersection between the specified line and the specified bounding sphere. |
static Point3D |
getPointOfIntersection(BoundingVolumeIface vol,
int screenX,
int screenY)
Returns the point of intersection of a line that is shot into the world from the specified screen coordinates and the specified bounding volume. |
static Point3D |
getPointOfIntersection(BoundingVolumeIface vol,
Line3D line)
Returns the point of intersection between the specified line and the specified bounding volume. |
static Point3D |
getPointOfIntersection(Triangle triangle,
int screenX,
int screenY)
Returns the point of intersection of a line that is shot into the world from the specified screen coordinates and the specified triangle. |
static Point3D |
getPointOfIntersection(Triangle triangle,
Line3D line)
Returns the point of intersection on the specified triangle with the specified line. |
static boolean |
isPointInTriangle(Point3D p,
Triangle trig)
This method checks, if the specified point lies within the specified triangle: It does not take the triangle winding into consideration, because it doesn't make a difference between front and back faces. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CollisionFinder()
Method Detail |
---|
public static boolean collide(BoundingSphere sphere1, BoundingSphere sphere2)
sphere1
- first sphere to check for collision with second spheresphere2
- second sphere to check for collision with first sphere
public static boolean collide(BoundingBox box1, BoundingBox box2)
box1
- first box to check for collision with second boxbox2
- second box to check for collision with first box
public static boolean collide(BoundingCylinder cyl1, BoundingCylinder cyl2)
public static boolean isPointInTriangle(Point3D p, Triangle trig)
p
- point to checktrig
- triangle to check
public static Point3D getPointOfIntersection(BoundingVolumeIface vol, int screenX, int screenY)
vol
- bounding volume to check for intersectionscreenX
- x-coordinates on screenscreenY
- y-coordinates on screen
public static Point3D getPointOfIntersection(BoundingVolumeIface vol, Line3D line)
vol
- bounding volume to check for intersection with the lineline
- line to check for intersection with the bounding volume
null
public static Point3D getPointOfIntersection(BoundingBox box, int screenX, int screenY)
box
- bounding box to check for intersectionscreenX
- x-coordinates on screenscreenY
- y-coordinates on screen
public static Point3D getPointOfIntersection(BoundingBox box, Line3D line)
box
- bounding box to check for intersection with the lineline
- line to check for intersection with the box
null
public static Point3D getPointOfIntersection(BoundingSphere sphere, int screenX, int screenY)
sphere
- bounding sphere to check for intersectionscreenX
- x-coordinates on screenscreenY
- y-coordinates on screen
public static Point3D getPointOfIntersection(BoundingSphere sphere, Line3D line)
sphere
- sphere to check for intersection with the lineline
- line to check for intersection with the sphere
null
public static Point3D getPointOfIntersection(Triangle triangle, Line3D line)
triangle
- triangle to check for ray intersectionline
- line to check for intersection with triangle
null
.public static Point3D getPointOfIntersection(Triangle triangle, int screenX, int screenY)
triangle
- triangle to check for intersectionscreenX
- x-coordinates on screenscreenY
- y-coordinates on screen
public static Point3D getPointOfIntersection(AbstractMesh mesh, Line3D line)
null
.
mesh
- mesh to check for intersection with the lineline
- line to check for intersection with the mesh
public static Point3D getPointOfIntersection(AbstractMesh mesh, int screenX, int screenY)
null
.
mesh
- mesh to check for intersection with the line that gets shot
from the screen coordinates into the scenescreenX
- x-coordinates on screenscreenY
- y-coordinates on screen
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |