|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttoxi.geom.Vec3D
toxi.geom.Plane
public class Plane
Class to describe and work with infinite generic 3D planes. Useful for intersection problems and classifying points.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class toxi.geom.Vec3D |
---|
Vec3D.Axis |
Field Summary | |
---|---|
Vec3D |
normal
|
static int |
ON_PLANE
Classifier constant for classifyPoint(Vec3D) |
static int |
PLANE_BACK
Classifier constant for classifyPoint(Vec3D) |
static int |
PLANE_FRONT
Classifier constant for classifyPoint(Vec3D) |
static Plane |
XY
|
static Plane |
XZ
|
static Plane |
YZ
|
Fields inherited from class toxi.geom.Vec3D |
---|
MAX_VALUE, MIN_VALUE, x, X_AXIS, y, Y_AXIS, z, Z_AXIS, ZERO |
Constructor Summary | |
---|---|
Plane()
|
|
Plane(Triangle t)
|
|
Plane(Vec3D origin,
Vec3D norm)
|
Method Summary | |
---|---|
int |
classifyPoint(Vec3D p)
Classifies the relative position of the given point to the plane. |
float |
getDistanceToPoint(Vec3D p)
Calculates distance from the plane to point P. |
Vec3D |
getIntersectionWithRay(Ray3D r)
Calculates the intersection point between plane and ray (line). |
float |
intersectRayDistance(Ray3D ray)
Calculates the distance of the vector to the given plane in the specified direction. |
TriangleMesh |
toMesh(float size)
Creates a TriangleMesh representation of the plane as a finite, squared quad of the requested size, centred around the current plane point. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Plane XY
public static final Plane XZ
public static final Plane YZ
public static final int PLANE_FRONT
classifyPoint(Vec3D)
public static final int PLANE_BACK
classifyPoint(Vec3D)
public static final int ON_PLANE
classifyPoint(Vec3D)
public Vec3D normal
Constructor Detail |
---|
public Plane()
public Plane(Triangle t)
public Plane(Vec3D origin, Vec3D norm)
Method Detail |
---|
public int classifyPoint(Vec3D p)
public float getDistanceToPoint(Vec3D p)
p
-
public Vec3D getIntersectionWithRay(Ray3D r)
r
-
public float intersectRayDistance(Ray3D ray)
ray
- intersection ray
public TriangleMesh toMesh(float size)
size
- desired edge length
public java.lang.String toString()
toString
in class Vec3D
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |