public class Plane3D extends Object implements Shape3D
Shape3D.EmptySet3D| Modifier and Type | Field and Description |
|---|---|
protected Plane3DCoordinateSubsystem |
coordinateSubsystem |
protected Vector3D |
normal |
protected Point3D |
origin |
protected Vector3D |
vector1 |
protected Vector3D |
vector2 |
static Plane3D |
xyPlane |
static Plane3D |
xzPlane |
static Plane3D |
yzPlane |
ACCURACY, ACCURACY_INVERSE, EMPTY_SET| Constructor and Description |
|---|
Plane3D(Point3D origin,
Vector3D vector1,
Vector3D vector2)
Construct from origin and vectors
|
| Modifier and Type | Method and Description |
|---|---|
Shape3D |
clip(Box3D box) |
boolean |
contains(Point3D point) |
static Plane3D |
createPlaneDefinedByPoints(Collection<Point3D> pointsInPlane)
Construct from points in plane
Picks 3 anchors from provided list of points, see
pickAnchors(Collection) |
boolean |
equals(Object obj) |
Box3D |
getBoundingBox() |
Plane3DCoordinateSubsystem |
getCoordinateSubsystem()
Get coordinate subsystem.
|
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.
|
Vector3D |
getNormalVector()
Get the normal vector
Normal is normalized.
|
Point3D |
getOrigin()
Get origin
|
double |
getSignedDistance(Point3D point)
Get signed distance determined by normal vector
|
Vector3D |
getVector1()
Get vector1
|
Vector3D |
getVector2()
Get vector2
|
boolean |
isBounded()
Returns true if the shape is bounded, that is if we can draw a finite
rectangle enclosing the shape.
|
boolean |
isEmpty() |
static Point3D[] |
pickAnchors(Collection<Point3D> pointsInPlane)
Pick anchors of a plane
Picks 3 anchors that define the plane well (see
rateAnchors(Point3D, Point3D, Point3D)).. |
Point3D |
project(Point3D point)
Project a point onto plane
|
Vector3D |
project(Vector3D vector)
Project a vector onto plane
See
project(Point3D). |
protected static double |
rateAnchors(Point3D a,
Point3D b,
Point3D c)
Rate the ability of points to define a plane
Anchors need to be distant from each other (to avoid floating point math inaccuracies) and must be linearly independent.
|
String |
toString() |
Shape3D |
transform(AffineTransform3D trans) |
protected Point3D origin
protected Vector3D vector1
protected Vector3D vector2
protected transient Plane3DCoordinateSubsystem coordinateSubsystem
protected transient Vector3D normal
public static final Plane3D xyPlane
public static final Plane3D xzPlane
public static final Plane3D yzPlane
public static Plane3D createPlaneDefinedByPoints(Collection<Point3D> pointsInPlane)
pickAnchors(Collection)pointsInPlane - points that lie in the constructed plane, must contain at least 3 linearly independent pointspublic Point3D getOrigin()
public Vector3D getVector1()
public Vector3D getVector2()
public Vector3D getNormalVector()
Normal is normalized.
public Point3D project(Point3D point)
point - point to projectpublic Vector3D project(Vector3D vector)
project(Point3D).public Plane3DCoordinateSubsystem getCoordinateSubsystem()
Plane3DCoordinateSubsystem}public Box3D getBoundingBox()
getBoundingBox in interface Shape3Dpublic double getSignedDistance(Point3D point)
point - point to get signed distance ofpublic double getDistance(Point3D point)
Shape3DgetDistance in interface Shape3Dpublic boolean isBounded()
Shape3Dpublic Shape3D transform(AffineTransform3D trans)
public static Point3D[] pickAnchors(Collection<Point3D> pointsInPlane)
rateAnchors(Point3D, Point3D, Point3D))..pointsInPlane - points in a planeCopyright © 2018 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All rights reserved.