public class Plane extends java.lang.Object implements Shape
Modifier and Type | Field and Description |
---|---|
protected Vector |
normal
Normal vector of the plane.
|
protected Point |
point
Point in the plane.
|
Constructor and Description |
---|
Plane(Point p,
Point q)
Constructs a plane bisecting two points
|
Plane(Point p,
Point q,
Point r)
Constructs a plane through three points using the first point as defining point.
|
Plane(Point p,
Vector n)
Constructs a plane with the normal vector n containing point p.
|
Plane(Vector n)
Constructs a plane with the normal vector n containing the point (0,0,0).
|
Plane(Vector n,
double d)
Constructs a plane with the normal vector n at distance d from the origin.
|
Modifier and Type | Method and Description |
---|---|
int |
above(Point p)
Returns 1/0/-1 if point p is above/on/below this plane.
|
int |
below(Point p)
Returns 1/0/-1 if point p is below/on/above this plane
|
Point |
getCenter()
Returns the defining point for this plane.
|
double |
getDistance(Point p)
Get the distance of point p to this plane
|
Point[] |
getIntersection(Circle circle)
Get intersection of a circle with the plane.
|
Point[] |
getIntersection(Circle circle,
Vector u) |
Point |
getIntersection(Line line)
Get the intersection of a line with the plane.
|
Point |
getIntersection(LineSegment sgm)
Get the intersection of a segment with the plane.
|
Line |
getIntersection(Plane pl)
returns the intersection line with another plane
|
Circle |
getIntersection(Sphere sphere)
Get intersection of a sphere with the plane.
|
java.lang.Double |
getIntersectionAngle(Circle circle,
Point p,
Vector dir) |
double |
getIntersectionParameter(Line line)
Get the line-parameter of the intersection between a plane and a line.
|
Vector |
getNormal()
Return the normal defining this plane.
|
Point |
getPoint()
Get the point defining this plane.
|
double |
getUnsignedDihedralAngle(Plane p)
Get the unsigned angle between this plane and p.
|
Point |
projectPoint(Point p)
Get the projection of p onto this plane.
|
void |
setNormal(Vector n)
Set the normal to n.
|
protected Vector normal
protected Point point
public Plane(Point p, Vector n)
public Plane(Vector n)
public Plane(Vector n, double d)
public Plane(Point p, Point q, Point r)
public Point getPoint()
public Vector getNormal()
public void setNormal(Vector n)
public int above(Point p)
public int below(Point p)
public double getDistance(Point p)
public double getUnsignedDihedralAngle(Plane p)
public Point getIntersection(Line line)
public double getIntersectionParameter(Line line)
public Point getIntersection(LineSegment sgm)
public java.lang.Double getIntersectionAngle(Circle circle, Point p, Vector dir)
public Point[] getIntersection(Circle circle)
public Line getIntersection(Plane pl)
public Circle getIntersection(Sphere sphere)