|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.threerings.math.Plane
public class Plane
A plane consisting of a unit normal and a constant. All points on the plane satisfy the
equation Ax + By + Cz + D = 0, where (A, B, C) is the plane normal and D is the
constant.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.threerings.io.Streamable |
|---|
com.threerings.io.Streamable.Closure |
| Field Summary | |
|---|---|
float |
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 Summary | |
|---|---|
Plane()
Creates an empty (invalid) plane. |
|
Plane(float[] values)
Creates a plane with the specified parameters. |
|
Plane(float a,
float b,
float c,
float d)
Creates a plane with the specified parameters. |
|
Plane(Plane other)
Copy constructor. |
|
Plane(Vector3f normal,
float constant)
Creates a plane from the specified normal and constant. |
|
| Method Summary | |
|---|---|
void |
decodeFromStream(DataInputStream in)
Initializes this object with data read from the specified stream. |
void |
decodeFromString(String string)
Initializes this object with the contents of the specified string. |
void |
encodeToStream(DataOutputStream out)
Encodes this object to the specified stream. |
String |
encodeToString()
Returns a string representation of this object. |
boolean |
equals(Object other)
|
Plane |
fromPointNormal(Vector3f pt,
Vector3f normal)
Sets this plane based on a point on the plane and the plane normal. |
Plane |
fromPoints(Vector3f p1,
Vector3f p2,
Vector3f p3)
Sets this plane based on the three points provided. |
DoubleBuffer |
get(DoubleBuffer buf)
Stores the contents of this plane into the specified buffer. |
float |
getDistance(Ray3D ray)
Computes the signed distance to this plane along the specified ray. |
float |
getDistance(Vector3f pt)
Computes and returns the signed distance from the plane to the specified point. |
boolean |
getIntersection(Ray3D ray,
Vector3f result)
Computes the intersection of the supplied ray with this plane, placing the result in the given vector (if the ray intersects). |
Vector3f |
getNormal()
Returns a reference to the plane normal. |
int |
hashCode()
|
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. |
Plane |
set(float[] values)
Sets the parameters of the plane. |
Plane |
set(float a,
float b,
float c,
float d)
Sets the parameters of the plane. |
Plane |
set(Plane other)
Copies the parameters of another plane. |
Plane |
set(Vector3f normal,
float constant)
Sets the parameters of the plane. |
Plane |
transform(Transform3D transform)
Transforms this plane by the specified transformation. |
Plane |
transform(Transform3D transform,
Plane result)
Transforms this plane by the specified transformation, placing the result in the object provided. |
Plane |
transformLocal(Transform3D transform)
Transforms this plane in-place by the specified transformation. |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Plane XY_PLANE
public static final Plane XZ_PLANE
public static final Plane YZ_PLANE
public float constant
| Constructor Detail |
|---|
public Plane(Vector3f normal,
float constant)
public Plane(float[] values)
public Plane(float a,
float b,
float c,
float d)
public Plane(Plane other)
public Plane()
| Method Detail |
|---|
public Vector3f getNormal()
public Plane fromPoints(Vector3f p1,
Vector3f p2,
Vector3f p3)
public Plane fromPointNormal(Vector3f pt,
Vector3f normal)
public Plane set(Plane other)
public Plane set(Vector3f normal,
float constant)
public Plane set(float[] values)
public Plane set(float a,
float b,
float c,
float d)
public Plane transformLocal(Transform3D transform)
public Plane transform(Transform3D transform)
public Plane transform(Transform3D transform,
Plane result)
public Plane negateLocal()
public Plane negate()
public Plane negate(Plane result)
public boolean getIntersection(Ray3D ray,
Vector3f result)
public float getDistance(Ray3D ray)
public float getDistance(Vector3f pt)
public DoubleBuffer get(DoubleBuffer buf)
public String encodeToString()
Encodable
encodeToString in interface Encodable
public void decodeFromString(String string)
throws Exception
Encodable
decodeFromString in interface EncodableException
public void encodeToStream(DataOutputStream out)
throws IOException
Encodable
encodeToStream in interface EncodableIOException
public void decodeFromStream(DataInputStream in)
throws IOException
Encodable
decodeFromStream in interface EncodableIOExceptionpublic int hashCode()
hashCode in class Objectpublic boolean equals(Object other)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||