|
||||||||||
| 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 | |
|---|---|
static class |
Plane.Classifier
Classifier constant for classifyPoint(ReadonlyVec3D, float) |
| Nested classes/interfaces inherited from class toxi.geom.Vec3D |
|---|
Vec3D.Axis |
| Field Summary | |
|---|---|
Vec3D |
normal
|
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(Triangle3D t)
|
|
Plane(Vec3D origin,
ReadonlyVec3D norm)
|
|
| Method Summary | |
|---|---|
Plane.Classifier |
classifyPoint(ReadonlyVec3D p,
float tolerance)
Classifies the relative position of the given point to the plane using the given tolerance. |
boolean |
containsPoint(ReadonlyVec3D p)
Checks if the point is within the given shape/volume. |
float |
getDistanceToPoint(Vec3D p)
Calculates distance from the plane to point P. |
ReadonlyVec3D |
getIntersectionWithRay(Ray3D r)
Calculates the intersection point between plane and ray (line). |
Vec3D |
getProjectedPoint(Vec3D p)
|
float |
intersectRayDistance(Ray3D ray)
Calculates the distance of the vector to the given plane in the specified direction. |
Mesh3D |
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. |
Mesh3D |
toMesh(Mesh3D mesh,
float size)
|
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 Vec3D normal
| Constructor Detail |
|---|
public Plane()
public Plane(Triangle3D t)
public Plane(Vec3D origin,
ReadonlyVec3D norm)
| Method Detail |
|---|
public Plane.Classifier classifyPoint(ReadonlyVec3D p,
float tolerance)
public boolean containsPoint(ReadonlyVec3D p)
Shape3D
containsPoint in interface Shape3Dpublic float getDistanceToPoint(Vec3D p)
p -
public ReadonlyVec3D getIntersectionWithRay(Ray3D r)
r -
public Vec3D getProjectedPoint(Vec3D p)
public float intersectRayDistance(Ray3D ray)
ray - intersection ray
public Mesh3D toMesh(float size)
size - desired edge length
public Mesh3D toMesh(Mesh3D mesh,
float size)
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 | |||||||||