Class pmr.euclid.Plane3
All Packages Class Hierarchy This Package Previous Next Index
Class pmr.euclid.Plane3
java.lang.Object

+pmr.euclid.Status

+pmr.euclid.Plane3
 public class Plane3
 extends Status
Plane3  3dimensional plane class
Plane3 represents a 3dimensional plane. It is one of a set of
primitives which can be combined to create and manipulate complex
3dimensional objects. Planes can be transformed with rotation
matrices or rotationtranslation 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.
 Author:
 (C) P. MurrayRust, 1996

dist
 distance of plane from origin

vect
 vector of plane (normalised)

Plane3()


Plane3(double, double, double, double)
 formed from plane components; vector is normalised

Plane3(Line3, Point3)
 make a plane from a line and a point not on the line

Plane3(Plane3)
 copy constructor:

Plane3(Point3, Point3, Point3)
 make a plane from three points

Plane3(Vector3, double)
 formed from plane components

clone(Plane3)


containsPoint(Point3)
 is a point on a plane?

equals(Plane3)
 are two planes coincident and parllel

getAngleMadeWith(Plane3)
 the angle between 2 planes (as an Angle)

getClosestPointTo(Point3)
 point on plane closest to another point

getDistance()
 distance from origin

getDistanceFromPoint(Point3)
 distance of point from plane (will be a signed quantity)

getIntersectionWith(Line3)
 point of intersection of plane and line

getIntersectionWith(Plane3)
 line as intersection of two planes

getIntersectionWith(Plane3, Plane3)
 point where three planes intersect

getVector()
 get vector from plane

isAntiparallelTo(Plane3)
 are two planes antiparallel

isParallelTo(Plane3)
 are two planes parallel (not antiparallel)

main(String[])
 tests Plane3 routines

negative()
 reverse direction of plane

subtract()
 form coincident antiparallel plane

toString()

vect
protected Vector3 vect
 vector of plane (normalised)
dist
protected double dist
 distance of plane from origin
Plane3
public Plane3()
Plane3
public Plane3(double l,
double m,
double n,
double d)
 formed from plane components; vector is normalised
Plane3
public Plane3(Vector3 v,
double d)
 formed from plane components
Plane3
public Plane3(Plane3 pl)
 copy constructor:
Plane3
public Plane3(Point3 p1,
Point3 p2,
Point3 p3)
 make a plane from three points
Plane3
public Plane3(Line3 l,
Point3 p)
 make a plane from a line and a point not on the line
clone
public Plane3 clone(Plane3 pl)
getVector
public Vector3 getVector()
 get vector from plane
getDistance
public double getDistance()
 distance from origin
negative
public void negative()
 reverse direction of plane
equals
public boolean equals(Plane3 pl2)
 are two planes coincident and parllel
subtract
public Plane3 subtract()
 form coincident antiparallel plane
getDistanceFromPoint
public double getDistanceFromPoint(Point3 p)
 distance of point from plane (will be a signed quantity)
isParallelTo
public boolean isParallelTo(Plane3 pl2)
 are two planes parallel (not antiparallel)
isAntiparallelTo
public boolean isAntiparallelTo(Plane3 pl2)
 are two planes antiparallel
containsPoint
public boolean containsPoint(Point3 p)
 is a point on a plane?
getClosestPointTo
public Point3 getClosestPointTo(Point3 p2)
 point on plane closest to another point
getIntersectionWith
public Point3 getIntersectionWith(Line3 l)
 point of intersection of plane and line
getIntersectionWith
public Line3 getIntersectionWith(Plane3 pl2)
 line as intersection of two planes
getIntersectionWith
public Point3 getIntersectionWith(Plane3 pl2,
Plane3 pl3)
 point where three planes intersect
getAngleMadeWith
public Angle getAngleMadeWith(Plane3 pl2)
 the angle between 2 planes (as an Angle)
toString
public String toString()
 Overrides:
 toString in class Object
main
public static void main(String args[])
 tests Plane3 routines
All Packages Class Hierarchy This Package Previous Next Index