public class Plane
extends java.lang.Object
(a * x) + (b * y) + (c * z) + d = 0(a, b, c, d) are the plane parameters. The normal of the plane is (a, b, c), .
| Constructor and Description |
|---|
Plane() |
Plane(float a,
float b,
float c,
float d) |
| Modifier and Type | Method and Description |
|---|---|
Plane |
clone() |
float |
distance(Vec3 pt)
Calculate the distance (oriented) between a point and this plane.
|
float |
getA() |
float |
getB() |
float |
getC() |
float |
getD() |
Vec3 |
getNormal() |
Vec3 |
getRandomPointOnPlane(Vec3 dst) |
Vec3 |
getRandomVectorOnPlane(Vec3 dst) |
boolean |
intersect(Percent dst,
Line line)
http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline
|
boolean |
intersect(Vec3 dst,
Line line)
http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline
|
Quat |
mirrorOrientation(Quat dst,
Quat q) |
Vec3 |
mirrorPoint(Vec3 dst,
Vec3 point)
point' = point - 2 * distance(point) * n
|
Vec3 |
mirrorVector(Vec3 dst,
Vec3 vector)
vector' = vector - 2 * dot(n,vector) * n
|
Vec3 |
projectAlongDirection(Vec3 dst,
Vec3 pt,
Vec3 dir) |
Vec3 |
projectAlongDirection(Vec3 dst,
Vec3 pt,
Vec3 dir,
boolean adjustDir) |
Vec3 |
projectPoint(Vec3 dst,
Vec3 point) |
Vec3 |
projectVector(Vec3 dst,
Vec3 vec) |
Plane |
set(float a,
float b,
float c,
float d)
Set a, b, c values of the Plane.
|
Plane |
set(Plane plane) |
Plane |
setD(float d) |
Plane |
setFromDirections(Vec3 dir1OnPlane,
Vec3 dir2OnPlane) |
Plane |
setFromDirections(Vec3 dir1OnPlane,
Vec3 dir2OnPlane,
Vec3 pointOnPlane) |
Plane |
setFromNormal(Vec3 normal,
Vec3 point) |
Plane |
setNormal(Vec3 normal)
Set the plane normal @param normal must be normalized
|
public final Plane clone()
clone in class java.lang.Objectpublic final Plane setFromDirections(Vec3 dir1OnPlane, Vec3 dir2OnPlane, Vec3 pointOnPlane)
public Plane set(float a, float b, float c, float d)
a - b - c - public final float distance(Vec3 pt)
pt - a pointpublic final boolean intersect(Vec3 dst, Line line)
line - dst - public final boolean intersect(Percent dst, Line line)
line - dst - public final Vec3 projectAlongDirection(Vec3 dst, Vec3 pt, Vec3 dir, boolean adjustDir)
public final Vec3 mirrorPoint(Vec3 dst, Vec3 point)
public final Vec3 mirrorVector(Vec3 dst, Vec3 vector)
public final Vec3 getRandomVectorOnPlane(Vec3 dst)
public final Vec3 getRandomPointOnPlane(Vec3 dst)
public final Vec3 getNormal()
public final Plane setNormal(Vec3 normal)
public final float getA()
public final float getB()
public final float getC()
public final float getD()
public Plane setD(float d)
Bonzai Engine 1.3.4 11/12/2015 - A Java OpenGL engine and tools for Windows/Mac/Linux/Android
Copyright © 2007-2015 Jérôme Jouvie bonzaiengine.com contact@bonzaiengine.com