|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgov.nasa.worldwind.geom.Plane
public final class Plane
A Plane object represents a mathematical plane in an arbitrary cartesian co-ordinate system. A
Plane is defined by a normal vector and a distance along that vector from the origin, where the distance
represents the distance from the origin to the Plane rather than from the Plane to the
origin.
Plane are immutable.
| Constructor Summary | |
|---|---|
Plane(double a,
double b,
double c,
double d)
Obtains a new Plane whose normal is defined by the vector (a,b,c) and whose disance from that vector
is d. |
|
Plane(Point vec)
Obtains a new instance of a Plane whose information is contained in Vector
vec. |
|
| Method Summary | |
|---|---|
double |
dot(Point p)
Calculates the dot product of this Plane with Point p. |
boolean |
equals(Object o)
|
double |
getDistance()
Retrieves the distance from the origin to this Plane. |
Point |
getNormal()
Retrieves a Point representing the normal to this Plane. |
Point |
getVector()
Retrieves a vector representing the normal and distance to this Plane. |
int |
hashCode()
|
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Plane(double a,
double b,
double c,
double d)
Plane whose normal is defined by the vector (a,b,c) and whose disance from that vector
is d. The vector may not have zero length.
a - the x-parameter of the normal to this Planeb - the y-parameter of the normal to this Planec - the z-parameter of the normal to this Planed - the distance of this Plane from the origin along its normal.
IllegalArgumentException - if 0==a==b==cpublic Plane(Point vec)
Plane whose information is contained in Vector
vec.
vec - the Vector containing information about this Plane's normal and distance
IllegalArgumentException - if passed a null or zero-length Vector| Method Detail |
|---|
public final double dot(Point p)
Plane with Point p.
p - the Point to dot with this Plane
p and this Plane
IllegalArgumentException - if p is nullpublic final boolean equals(Object o)
equals in class Objectpublic final double getDistance()
Plane. Two options exist for defining distance - the
first represents the distance from the origin to the Plane, the second represents the distance from
the Plane to the origin. This function uses the first method. The outcome of this is that depending
on the caller's view of this method, the sign of distances may appear to be reversed.
Plane and the originpublic final Point getNormal()
Point representing the normal to this Plane.
Point representing the normal to this Planepublic final Point getVector()
Plane. The
vector has the structure (x, y, z, distance), where (x, y, z) represents the normal, and distance
represents the distance from the origin.
Vector representation of this Planepublic final int hashCode()
hashCode in class Objectpublic final String toString()
toString in class Object
|
NASA World Wind | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||