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 - 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.

Author:
(C) P. Murray-Rust, 1996

Variable Index

 o dist
distance of plane from origin
 o vect
vector of plane (normalised)

Constructor Index

 o Plane3()
 o Plane3(double, double, double, double)
formed from plane components; vector is normalised
 o Plane3(Line3, Point3)
make a plane from a line and a point not on the line
 o Plane3(Plane3)
copy constructor:
 o Plane3(Point3, Point3, Point3)
make a plane from three points
 o Plane3(Vector3, double)
formed from plane components

Method Index

 o clone(Plane3)
 o containsPoint(Point3)
is a point on a plane?
 o equals(Plane3)
are two planes coincident and parllel
 o getAngleMadeWith(Plane3)
the angle between 2 planes (as an Angle)
 o getClosestPointTo(Point3)
point on plane closest to another point
 o getDistance()
distance from origin
 o getDistanceFromPoint(Point3)
distance of point from plane (will be a signed quantity)
 o getIntersectionWith(Line3)
point of intersection of plane and line
 o getIntersectionWith(Plane3)
line as intersection of two planes
 o getIntersectionWith(Plane3, Plane3)
point where three planes intersect
 o getVector()
get vector from plane
 o isAntiparallelTo(Plane3)
are two planes antiparallel
 o isParallelTo(Plane3)
are two planes parallel (not antiparallel)
 o main(String[])
tests Plane3 routines
 o negative()
reverse direction of plane
 o subtract()
form coincident antiparallel plane
 o toString()

Variables

 o vect
  protected Vector3 vect
vector of plane (normalised)
 o dist
  protected double dist
distance of plane from origin

Constructors

 o Plane3
  public Plane3()
 o Plane3
  public Plane3(double l,
                double m,
                double n,
                double d)
formed from plane components; vector is normalised
 o Plane3
  public Plane3(Vector3 v,
                double d)
formed from plane components
 o Plane3
  public Plane3(Plane3 pl)
copy constructor:
 o Plane3
  public Plane3(Point3 p1,
                Point3 p2,
                Point3 p3)
make a plane from three points
 o Plane3
  public Plane3(Line3 l,
                Point3 p)
make a plane from a line and a point not on the line

Methods

 o clone
  public Plane3 clone(Plane3 pl)
 o getVector
  public Vector3 getVector()
get vector from plane
 o getDistance
  public double getDistance()
distance from origin
 o negative
  public void negative()
reverse direction of plane
 o equals
  public boolean equals(Plane3 pl2)
are two planes coincident and parllel
 o subtract
  public Plane3 subtract()
form coincident antiparallel plane
 o getDistanceFromPoint
  public double getDistanceFromPoint(Point3 p)
distance of point from plane (will be a signed quantity)
 o isParallelTo
  public boolean isParallelTo(Plane3 pl2)
are two planes parallel (not antiparallel)
 o isAntiparallelTo
  public boolean isAntiparallelTo(Plane3 pl2)
are two planes antiparallel
 o containsPoint
  public boolean containsPoint(Point3 p)
is a point on a plane?
 o getClosestPointTo
  public Point3 getClosestPointTo(Point3 p2)
point on plane closest to another point
 o getIntersectionWith
  public Point3 getIntersectionWith(Line3 l)
point of intersection of plane and line
 o getIntersectionWith
  public Line3 getIntersectionWith(Plane3 pl2)
line as intersection of two planes
 o getIntersectionWith
  public Point3 getIntersectionWith(Plane3 pl2,
                                    Plane3 pl3)
point where three planes intersect
 o getAngleMadeWith
  public Angle getAngleMadeWith(Plane3 pl2)
the angle between 2 planes (as an Angle)
 o toString
  public String toString()
Overrides:
toString in class Object
 o main
  public static void main(String args[])
tests Plane3 routines

All Packages  Class Hierarchy  This Package  Previous  Next  Index