public class Plane extends Vector
Modifier and Type | Field and Description |
---|---|
double |
D |
protected static Membership[] |
NO_BOUNDS |
protected static GeoPoint[] |
NO_POINTS |
MINIMUM_RESOLUTION, MINIMUM_RESOLUTION_CUBED, MINIMUM_RESOLUTION_SQUARED, x, y, z
Constructor and Description |
---|
Plane(double height)
Construct a horizontal plane at a specified Z.
|
Plane(double x,
double y)
Construct a vertical plane through a specified
x, y and origin.
|
Plane(double A,
double B,
double C,
double D)
Construct a plane with all four coefficients defined.
|
Plane(Vector v,
double D)
Construct a plane with a specific vector, and D offset
from origin.
|
Plane(Vector A,
Vector B)
Construct a plane through two points and origin.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
addPoint(Bounds boundsInfo,
Membership[] bounds,
double x,
double y,
double z) |
boolean |
equals(Object o) |
double |
evaluate(double x,
double y,
double z)
Evaluate the plane equation for a given point, as represented
by a vector.
|
double |
evaluate(Vector v)
Evaluate the plane equation for a given point, as represented
by a vector.
|
boolean |
evaluateIsZero(double x,
double y,
double z)
Evaluate the plane equation for a given point, as represented
by a vector.
|
boolean |
evaluateIsZero(Vector v)
Evaluate the plane equation for a given point, as represented
by a vector.
|
protected GeoPoint[] |
findIntersections(Plane q,
Membership[] bounds,
Membership[] moreBounds)
Find the intersection points between two planes, given a set of bounds.
|
GeoPoint |
getSampleIntersectionPoint(Plane q)
Find a sample point on the intersection between two planes and the unit sphere.
|
int |
hashCode() |
GeoPoint[] |
interpolate(GeoPoint start,
GeoPoint end,
double[] proportions)
Find points on the boundary of the intersection of a plane and the unit sphere,
given a starting point, and ending point, and a list of proportions of the arc (e.g.
|
boolean |
intersects(Plane q,
GeoPoint[] notablePoints,
GeoPoint[] moreNotablePoints,
Membership[] bounds,
Membership... moreBounds)
Determine whether the plane intersects another plane within the
bounds provided.
|
protected boolean |
isNumericallyIdentical(Plane p)
Returns true if this plane and the other plane are identical within the margin of error.
|
protected static boolean |
meetsAllBounds(GeoPoint p,
Membership[] bounds,
Membership[] moreBounds) |
protected static Vector |
modify(GeoPoint start,
double transX,
double transY,
double transZ,
double sinRA,
double cosRA,
double sinHA,
double cosHA)
Modify a point to produce a vector in translated/rotated space.
|
Plane |
normalize()
Build a normalized plane, so that the vector is normalized.
|
void |
recordBounds(Bounds boundsInfo,
Membership... bounds)
Accumulate bounds information for this plane, intersected with the unit sphere.
|
void |
recordBounds(Plane q,
Bounds boundsInfo,
Membership... bounds)
Accumulate bounds information for this plane, intersected with another plane
and with the unit sphere.
|
protected static GeoPoint |
reverseModify(Vector point,
double transX,
double transY,
double transZ,
double sinRA,
double cosRA,
double sinHA,
double cosHA)
Reverse modify a point to produce a GeoPoint in normal space.
|
String |
toString() |
dotProduct, dotProduct, isWithin, linearDistance, linearDistance, linearDistanceSquared, linearDistanceSquared, magnitude, normalDistance, normalDistance, normalDistanceSquared, normalDistanceSquared, rotateXY, rotateXY, rotateXZ, rotateXZ, rotateZY, rotateZY, translate
protected static final GeoPoint[] NO_POINTS
protected static final Membership[] NO_BOUNDS
public final double D
public Plane(double A, double B, double C, double D)
public Plane(Vector A, Vector B)
A
- is the first point (origin based).B
- is the second point (origin based).public Plane(double height)
height
- is the specified Z coordinate.public Plane(double x, double y)
x
- is the specified x value.y
- is the specified y value.public Plane(Vector v, double D)
D
- is the D offset from the origin.public double evaluate(Vector v)
v
- is the vector.public double evaluate(double x, double y, double z)
public boolean evaluateIsZero(Vector v)
v
- is the vector.public boolean evaluateIsZero(double x, double y, double z)
public Plane normalize()
public GeoPoint[] interpolate(GeoPoint start, GeoPoint end, double[] proportions)
protected static Vector modify(GeoPoint start, double transX, double transY, double transZ, double sinRA, double cosRA, double sinHA, double cosHA)
protected static GeoPoint reverseModify(Vector point, double transX, double transY, double transZ, double sinRA, double cosRA, double sinHA, double cosHA)
protected GeoPoint[] findIntersections(Plane q, Membership[] bounds, Membership[] moreBounds)
q
- is the plane to intersect with.bounds
- is the set of bounds.moreBounds
- is another set of bounds.public void recordBounds(Plane q, Bounds boundsInfo, Membership... bounds)
q
- is the plane to intersect with.boundsInfo
- is the info to update with additional bounding information.bounds
- are the surfaces delineating what's inside the shape.public void recordBounds(Bounds boundsInfo, Membership... bounds)
boundsInfo
- is the info to update with additional bounding information.bounds
- are the surfaces delineating what's inside the shape.protected static void addPoint(Bounds boundsInfo, Membership[] bounds, double x, double y, double z)
public boolean intersects(Plane q, GeoPoint[] notablePoints, GeoPoint[] moreNotablePoints, Membership[] bounds, Membership... moreBounds)
q
- is the other plane.notablePoints
- are points to look at to disambiguate cases when the two planes are identical.moreNotablePoints
- are additional points to look at to disambiguate cases when the two planes are identical.bounds
- is one part of the bounds.moreBounds
- are more bounds.protected boolean isNumericallyIdentical(Plane p)
protected static boolean meetsAllBounds(GeoPoint p, Membership[] bounds, Membership[] moreBounds)
public GeoPoint getSampleIntersectionPoint(Plane q)
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.