math.geom3d.plane
Class Plane3D

Package class diagram package Plane3D
java.lang.Object
  extended by math.geom3d.plane.Plane3D
All Implemented Interfaces:
Serializable, Shape3D

public class Plane3D
extends Object
implements Shape3D

Author:
dlegland
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface math.geom3d.Shape3D
Shape3D.EmptySet3D
 
Field Summary
protected  double dx1
           
protected  double dx2
           
protected  double dy1
           
protected  double dy2
           
protected  double dz1
           
protected  double dz2
           
protected  double x0
           
protected  double y0
           
protected  double z0
           
 
Fields inherited from interface math.geom3d.Shape3D
ACCURACY, EMPTY_SET
 
Constructor Summary
Plane3D()
           
Plane3D(Point3D point, Vector3D vector1, Vector3D vector2)
           
 
Method Summary
 Shape3D clip(Box3D box)
           
 boolean contains(Point3D point)
           
static Plane3D createXYPlane()
           
static Plane3D createXZPlane()
           
static Plane3D createYZPlane()
           
 boolean equals(Object obj)
           
 Box3D getBoundingBox()
           
 double getDistance(Point3D point)
          Gets the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape.
 Point3D getLineIntersection(StraightLine3D line)
          Compute intersection of a line with this plane.
 Vector3D getNormalVector()
          Points towars the outside part of the plane.
 Point3D getOrigin()
           
 Point3D getPoint(double u, double v)
           
 Point2D getPointPosition(Point3D point)
           
 Vector3D getVector1()
           
 Vector3D getVector2()
           
 boolean isBounded()
          Returns true if the shape is bounded, that is if we can draw a finite rectangle enclosing the shape.
 boolean isEmpty()
           
 Point3D projectPoint(Point3D point)
           
 Vector3D projectVector(Vector3D vect)
           
 Shape3D transform(AffineTransform3D trans)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x0

protected double x0

y0

protected double y0

z0

protected double z0

dx1

protected double dx1

dy1

protected double dy1

dz1

protected double dz1

dx2

protected double dx2

dy2

protected double dy2

dz2

protected double dz2
Constructor Detail

Plane3D

public Plane3D()

Plane3D

public Plane3D(Point3D point,
               Vector3D vector1,
               Vector3D vector2)
Method Detail

createXYPlane

public static final Plane3D createXYPlane()

createXZPlane

public static final Plane3D createXZPlane()

createYZPlane

public static final Plane3D createYZPlane()

getOrigin

public Point3D getOrigin()

getVector1

public Vector3D getVector1()

getVector2

public Vector3D getVector2()

getNormalVector

public Vector3D getNormalVector()
Points towars the outside part of the plane.

Returns:
the outer normal vector.

getLineIntersection

public Point3D getLineIntersection(StraightLine3D line)
Compute intersection of a line with this plane. Uses algorithm 1 given in: http://local.wasp.uwa.edu.au/~pbourke/geometry/planeline/.

Parameters:
line - the line which intersects the plane
Returns:
the intersection point

projectPoint

public Point3D projectPoint(Point3D point)

projectVector

public Vector3D projectVector(Vector3D vect)

getPoint

public Point3D getPoint(double u,
                        double v)

getPointPosition

public Point2D getPointPosition(Point3D point)

clip

public Shape3D clip(Box3D box)
Specified by:
clip in interface Shape3D

contains

public boolean contains(Point3D point)
Specified by:
contains in interface Shape3D

getBoundingBox

public Box3D getBoundingBox()
Specified by:
getBoundingBox in interface Shape3D

getDistance

public double getDistance(Point3D point)
Description copied from interface: Shape3D
Gets the distance of the shape to the given point, or the distance of point to the frontier of the shape in the case of a plain shape.

Specified by:
getDistance in interface Shape3D

isBounded

public boolean isBounded()
Description copied from interface: Shape3D
Returns true if the shape is bounded, that is if we can draw a finite rectangle enclosing the shape. For example, a straight line or a parabola are not bounded.

Specified by:
isBounded in interface Shape3D

isEmpty

public boolean isEmpty()
Specified by:
isEmpty in interface Shape3D

transform

public Shape3D transform(AffineTransform3D trans)
Specified by:
transform in interface Shape3D

equals

public boolean equals(Object obj)
Overrides:
equals in class Object


Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.