public class Plane extends Object implements IPlane, Serializable
Ax + By + Cz + D = 0
, where (A, B, C) is the plane normal and D is the constant.Modifier and Type | Field and Description |
---|---|
double |
constant
The plane constant.
|
static Plane |
XY_PLANE
The X/Y plane.
|
static Plane |
XZ_PLANE
The X/Z plane.
|
static Plane |
YZ_PLANE
The Y/Z plane.
|
Constructor and Description |
---|
Plane()
Creates an empty (invalid) plane.
|
Plane(double[] values)
Creates a plane with the specified parameters.
|
Plane(double a,
double b,
double c,
double d)
Creates a plane with the specified parameters.
|
Plane(IVector3 normal,
double constant)
Creates a plane from the specified normal and constant.
|
Plane(Plane other)
Copy constructor.
|
Modifier and Type | Method and Description |
---|---|
double |
constant()
Returns the plane constant.
|
double |
distance(IRay3 ray)
Computes the signed distance to this plane along the specified ray.
|
double |
distance(IVector3 pt)
Computes and returns the signed distance from the plane to the specified point.
|
boolean |
equals(Object other) |
Plane |
fromPointNormal(IVector3 pt,
IVector3 normal)
Sets this plane based on a point on the plane and the plane normal.
|
Plane |
fromPoints(IVector3 p1,
IVector3 p2,
IVector3 p3)
Sets this plane based on the three points provided.
|
DoubleBuffer |
get(DoubleBuffer buf)
Stores the contents of this plane into the specified buffer.
|
int |
hashCode() |
boolean |
intersection(IRay3 ray,
Vector3 result)
Computes the intersection of the supplied ray with this plane, placing the result
in the given vector (if the ray intersects).
|
Plane |
negate()
Negates this plane.
|
Plane |
negate(Plane result)
Negates this plane, placing the result in the object provided.
|
Plane |
negateLocal()
Negates this plane in-place.
|
IVector3 |
normal()
Returns the plane normal.
|
Plane |
set(double[] values)
Sets the parameters of the plane.
|
Plane |
set(double a,
double b,
double c,
double d)
Sets the parameters of the plane.
|
Plane |
set(IVector3 normal,
double constant)
Sets the parameters of the plane.
|
Plane |
set(Plane other)
Copies the parameters of another plane.
|
public static final Plane XY_PLANE
public static final Plane XZ_PLANE
public static final Plane YZ_PLANE
public double constant
public Plane(IVector3 normal, double constant)
public Plane(double[] values)
public Plane(double a, double b, double c, double d)
public Plane(Plane other)
public Plane()
public Plane set(Plane other)
public Plane set(IVector3 normal, double constant)
public Plane set(double[] values)
public Plane set(double a, double b, double c, double d)
public Plane fromPoints(IVector3 p1, IVector3 p2, IVector3 p3)
public Plane fromPointNormal(IVector3 pt, IVector3 normal)
public Plane negateLocal()
public double constant()
IPlane
public DoubleBuffer get(DoubleBuffer buf)
IPlane
public double distance(IVector3 pt)
IPlane
public Plane negate(Plane result)
IPlane
public boolean intersection(IRay3 ray, Vector3 result)
IPlane
intersection
in interface IPlane
public double distance(IRay3 ray)
IPlane
Copyright © 2017. All rights reserved.