|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--jumbo.euclid.Status
|
+--jumbo.euclid.Plane3
Plane3 - 3-dimensional plane class
Plane3 represents a 3-dimensional plane. It is one of a set of primitives which can be combined to create and manipulate complex 3-dimensional objects. Planes can be transformed with rotation matrices or rotation-translation matrices (Transform3), can be calculated from other primitives or can be used to generate other primitives.
A plane is described by a unit vector (vector) and the perpendicular distance (dist) of the plane from the origin. The absolute direction of the plane (vector) IS important, giving the plane a direction (back and front faces).
The default plane is a Vector of (0.0, 0.0, 0.0) and a distance of 0.0. Operations on this default may lead to Exceptions such as ZeroLengthvector.
| Field Summary | |
protected double |
dist
distance of plane from origin |
protected Vector3 |
vect
vector of plane (normalised) |
| Constructor Summary | |
Plane3()
|
|
Plane3(double l,
double m,
double n,
double d)
formed from plane components; vector is normalised |
|
Plane3(Line3 l,
Point3 p)
make a plane from a line and a point not on the line |
|
Plane3(Plane3 pl)
copy constructor: |
|
Plane3(Point3 p1,
Point3 p2,
Point3 p3)
make a plane from three points |
|
Plane3(Vector3 v,
double d)
formed from plane components |
|
| Method Summary | |
Plane3 |
clone(Plane3 pl)
|
boolean |
containsPoint(Point3 p)
is a point on a plane? |
boolean |
equals(Plane3 pl2)
are two planes coincident and parllel |
Angle |
getAngleMadeWith(Plane3 pl2)
the angle between 2 planes (as an Angle) |
Point3 |
getClosestPointTo(Point3 p2)
point on plane closest to another point |
double |
getDistance()
distance from origin |
double |
getDistanceFromPoint(Point3 p)
distance of point from plane (will be a signed quantity) |
Point3 |
getIntersectionWith(Line3 l)
point of intersection of plane and line |
Line3 |
getIntersectionWith(Plane3 pl2)
line as intersection of two planes |
Point3 |
getIntersectionWith(Plane3 pl2,
Plane3 pl3)
point where three planes intersect |
Vector3 |
getVector()
get vector from plane |
boolean |
isAntiparallelTo(Plane3 pl2)
are two planes antiparallel |
boolean |
isParallelTo(Plane3 pl2)
are two planes parallel (not antiparallel) |
static void |
main(java.lang.String[] args)
tests Plane3 routines |
void |
negative()
reverse direction of plane |
Plane3 |
subtract()
form coincident antiparallel plane |
java.lang.String |
toString()
|
| Methods inherited from class jumbo.euclid.Status |
NYI |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
| Field Detail |
protected Vector3 vect
protected double dist
| Constructor Detail |
public Plane3()
public Plane3(double l,
double m,
double n,
double d)
public Plane3(Vector3 v,
double d)
public Plane3(Plane3 pl)
public Plane3(Point3 p1,
Point3 p2,
Point3 p3)
public Plane3(Line3 l,
Point3 p)
| Method Detail |
public Plane3 clone(Plane3 pl)
public Vector3 getVector()
public double getDistance()
public void negative()
public boolean equals(Plane3 pl2)
public Plane3 subtract()
public double getDistanceFromPoint(Point3 p)
public boolean isParallelTo(Plane3 pl2)
public boolean isAntiparallelTo(Plane3 pl2)
public boolean containsPoint(Point3 p)
public Point3 getClosestPointTo(Point3 p2)
public Point3 getIntersectionWith(Line3 l)
public Line3 getIntersectionWith(Plane3 pl2)
public Point3 getIntersectionWith(Plane3 pl2,
Plane3 pl3)
public Angle getAngleMadeWith(Plane3 pl2)
public java.lang.String toString()
public static void main(java.lang.String[] args)
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||