math.geom3d.plane
Class Plane3D
java.lang.Object
math.geom3d.plane.Plane3D
- All Implemented Interfaces:
- Shape3D
public class Plane3D
- extends java.lang.Object
- implements Shape3D
- Author:
- dlegland
Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Plane3D
public Plane3D()
Plane3D
public Plane3D(Point3D point,
Vector3D vector1,
Vector3D vector2)
createXYPlane
public static final Plane3D createXYPlane()
createXZPlane
public static final Plane3D createXZPlane()
createYZPlane
public static final Plane3D createYZPlane()
origin
public Point3D origin()
vector1
public Vector3D vector1()
vector2
public Vector3D vector2()
normal
public Vector3D normal()
- Returns a normal vector that points towards the outside part of the plane.
- Returns:
- the outer normal vector.
lineIntersection
public Point3D lineIntersection(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)
point
public Point3D point(double u,
double v)
pointPosition
public Point2D pointPosition(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
boundingBox
public Box3D boundingBox()
- Specified by:
boundingBox
in interface Shape3D
distance
public double distance(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:
distance
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(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object