|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmathematik.Intersection
public final class Intersection
beware this is not really in good shape. i ll read my linear algebra book and fix this class. someday. hopefully.
| Nested Class Summary | |
|---|---|
static class |
Intersection.Result
|
| Field Summary | |
|---|---|
static int |
COINCIDENT
from paul bourke ( http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline2d/ ) |
static int |
INTERESECTING
|
static int |
NOT_INTERESECTING
|
static int |
PARALLEL
|
| Fields inherited from interface mathematik.Mathematik |
|---|
EPSILON |
| Constructor Summary | |
|---|---|
Intersection()
|
|
| Method Summary | |
|---|---|
static float |
intersectLinePlane(Ray3f theRay,
Plane3f thePlane,
Vector3f theIntersectionPoint)
grabbed from Xith |
static float |
intersectRayPlane(Ray3f theRay,
Plane3f thePlane)
Deprecated. this method might contain errors. |
static boolean |
intersectRayPlane(Ray3f theRay,
Plane3f thePlane,
Vector3f theResult)
Deprecated. this method might contain errors. |
static boolean |
intersectRayPlane(Ray3f theRay,
Plane3f thePlane,
Vector3f store,
boolean doPlanar,
boolean quad)
|
static boolean |
intersectRayPlane(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f thePlanePointA,
Vector3f thePlanePointB,
Vector3f thePlanePointC,
Vector3f theResult)
Deprecated. this method might contain errors. |
static boolean |
intersectRayTriangle(Vector3f orig,
Vector3f dir,
Vector3f vert0,
Vector3f vert1,
Vector3f vert2,
float[] result)
|
static boolean |
intersectRayTriangle(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f theVertex0,
Vector3f theVertex1,
Vector3f theVertex2,
Intersection.Result theResult,
boolean theCullingFlag)
Fast, Minimum Storage Ray-Triangle Intersection by Tomas Moeller & Ben Trumbore http://jgt.akpeters.com/papers/MollerTrumbore97/code.html |
static float |
intersectRayTriangle(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f thePlanePointA,
Vector3f thePlanePointB,
Vector3f thePlanePointC,
Vector3f theResult,
boolean theCullingFlag)
|
static int |
lineLineIntersect(Vector2f aBegin,
Vector2f aEnd,
Vector2f bBegin,
Vector2f bEnd,
Vector2f theIntersection)
|
static boolean |
lineLineIntersect(Vector3f p1,
Vector3f p2,
Vector3f p3,
Vector3f p4,
Vector3f pa,
Vector3f pb,
float[] theResult)
from paul bourke ( http://local.wasp.uwa.edu.au/~pbourke/geometry/lineline3d/ ) Calculate the line segment PaPb that is the shortest route between two lines P1P2 and P3P4. |
static void |
main(java.lang.String[] args)
|
static boolean |
RaySphere(Vector3f p1,
Vector3f p2,
Vector3f sc,
float r)
http://local.wasp.uwa.edu.au/~pbourke/geometry/sphereline/raysphere.c Calculate the intersection of a ray and a sphere The line segment is defined from p1 to p2 The sphere is of radius r and centered at sc There are potentially two points of intersection given by p = p1 + mu1 (p2 - p1) p = p1 + mu2 (p2 - p1) Return FALSE if the ray doesn't intersect the sphere. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int COINCIDENT
public static final int PARALLEL
public static final int INTERESECTING
public static final int NOT_INTERESECTING
| Constructor Detail |
|---|
public Intersection()
| Method Detail |
|---|
public static boolean intersectRayPlane(Ray3f theRay,
Plane3f thePlane,
Vector3f store,
boolean doPlanar,
boolean quad)
public static boolean intersectRayTriangle(Vector3f orig,
Vector3f dir,
Vector3f vert0,
Vector3f vert1,
Vector3f vert2,
float[] result)
public static float intersectLinePlane(Ray3f theRay,
Plane3f thePlane,
Vector3f theIntersectionPoint)
thePlane - Plane3ftheRay - Ray3ftheIntersectionPoint - Vector3f
public static boolean intersectRayPlane(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f thePlanePointA,
Vector3f thePlanePointB,
Vector3f thePlanePointC,
Vector3f theResult)
theRayOrigin - Vector3ftheRayDirection - Vector3fthePlanePointA - Vector3fthePlanePointB - Vector3fthePlanePointC - Vector3ftheResult - Vector3f
public static boolean intersectRayPlane(Ray3f theRay,
Plane3f thePlane,
Vector3f theResult)
theRay - Ray3fthePlane - Plane3ftheResult - Vector3f
public static float intersectRayPlane(Ray3f theRay,
Plane3f thePlane)
theRay - Ray3fthePlane - Plane3f
public static boolean intersectRayTriangle(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f theVertex0,
Vector3f theVertex1,
Vector3f theVertex2,
Intersection.Result theResult,
boolean theCullingFlag)
theRayOrigin - Vector3ftheRayDirection - Vector3ftheVertex0 - Vector3ftheVertex1 - Vector3ftheVertex2 - Vector3ftheResult - ResulttheCullingFlag - boolean
public static float intersectRayTriangle(Vector3f theRayOrigin,
Vector3f theRayDirection,
Vector3f thePlanePointA,
Vector3f thePlanePointB,
Vector3f thePlanePointC,
Vector3f theResult,
boolean theCullingFlag)
public static boolean RaySphere(Vector3f p1,
Vector3f p2,
Vector3f sc,
float r)
public static int lineLineIntersect(Vector2f aBegin,
Vector2f aEnd,
Vector2f bBegin,
Vector2f bEnd,
Vector2f theIntersection)
public static boolean lineLineIntersect(Vector3f p1,
Vector3f p2,
Vector3f p3,
Vector3f p4,
Vector3f pa,
Vector3f pb,
float[] theResult)
public static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||