public class Plane extends Vector
Modifier and Type | Field and Description |
---|---|
double |
D
Ax + By + Cz + D = 0
|
protected static Membership[] |
NO_BOUNDS
An array with no bounds in it
|
protected static GeoPoint[] |
NO_POINTS
An array with no points in it
|
protected static Plane |
normalXPlane
A vertical plane normal to the X axis
|
protected static Plane |
normalYPlane
A vertical plane normal to the Y axis
|
protected static Plane |
normalZPlane
A vertical plane normal to the Z axis
|
MINIMUM_RESOLUTION, MINIMUM_RESOLUTION_CUBED, MINIMUM_RESOLUTION_SQUARED, x, y, z
Constructor and Description |
---|
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(PlanetModel planetModel,
double sinLat)
Construct a horizontal plane at a specified Z.
|
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,
GeoPoint point)
Add a point to boundsInfo if within a specifically bounded area.
|
double |
arcDistance(PlanetModel planetModel,
double x,
double y,
double z,
Membership... bounds)
Compute arc distance from plane to a vector.
|
double |
arcDistance(PlanetModel planetModel,
GeoPoint v,
Membership... bounds)
Compute arc distance from plane to a vector expressed with a
GeoPoint . |
static Plane |
constructNormalizedXPlane(double y,
double z,
double DValue)
Construct a normalized plane through a y-z point and parallel to the X axis.
|
static Plane |
constructNormalizedXPlane(Vector... planePoints)
Construct the most accurate normalized plane through an y-z point and including the X axis.
|
static Plane |
constructNormalizedYPlane(double x,
double z,
double DValue)
Construct a normalized plane through an x-z point and parallel to the Y axis.
|
static Plane |
constructNormalizedYPlane(Vector... planePoints)
Construct the most accurate normalized plane through an x-z point and including the Y axis.
|
static Plane |
constructNormalizedZPlane(double x,
double y)
Construct a normalized plane through an x-y point and including the Z axis.
|
static Plane |
constructNormalizedZPlane(Vector... planePoints)
Construct the most accurate normalized plane through an x-y point and including the Z axis.
|
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.
|
GeoPoint[] |
findIntersections(PlanetModel planetModel,
Plane q,
Membership... bounds)
Public version of findIntersections.
|
protected GeoPoint[] |
findIntersections(PlanetModel planetModel,
Plane q,
Membership[] bounds,
Membership[] moreBounds)
Find the intersection points between two planes, given a set of bounds.
|
GeoPoint |
getSampleIntersectionPoint(PlanetModel planetModel,
Plane q)
Find a sample point on the intersection between two planes and the world.
|
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(PlanetModel planetModel,
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.
|
double |
linearDistance(PlanetModel planetModel,
double x,
double y,
double z,
Membership... bounds)
Compute linear distance from plane to a vector.
|
double |
linearDistance(PlanetModel planetModel,
GeoPoint v,
Membership... bounds)
Compute linear distance from plane to a vector.
|
double |
linearDistanceSquared(PlanetModel planetModel,
double x,
double y,
double z,
Membership... bounds)
Compute linear distance squared from plane to a vector.
|
double |
linearDistanceSquared(PlanetModel planetModel,
GeoPoint v,
Membership... bounds)
Compute linear distance squared from plane to a vector.
|
protected static boolean |
meetsAllBounds(double x,
double y,
double z,
Membership[] bounds)
Check if a vector meets the provided bounds.
|
protected static boolean |
meetsAllBounds(double x,
double y,
double z,
Membership[] bounds,
Membership[] moreBounds)
Check if a vector meets the provided bounds.
|
protected static boolean |
meetsAllBounds(Vector p,
Membership[] bounds)
Check if a vector meets the provided bounds.
|
protected static boolean |
meetsAllBounds(Vector p,
Membership[] bounds,
Membership[] moreBounds)
Check if a vector meets the provided bounds.
|
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.
|
double |
normalDistance(double x,
double y,
double z,
Membership... bounds)
Compute normal distance from plane to a vector.
|
double |
normalDistance(Vector v,
Membership... bounds)
Compute normal distance from plane to a vector.
|
double |
normalDistanceSquared(double x,
double y,
double z,
Membership... bounds)
Compute normal distance squared from plane to a vector.
|
double |
normalDistanceSquared(Vector v,
Membership... bounds)
Compute normal distance squared from plane to a vector.
|
Plane |
normalize()
Build a normalized plane, so that the vector is normalized.
|
void |
recordBounds(PlanetModel planetModel,
LatLonBounds boundsInfo,
Membership... bounds)
Accumulate bounds information for this plane, intersected with the unit sphere.
|
void |
recordBounds(PlanetModel planetModel,
XYZBounds boundsInfo,
Membership... bounds)
Accumulate (x,y,z) bounds information for this plane, intersected 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() |
computeDesiredEllipsoidMagnitude, computeDesiredEllipsoidMagnitude, dotProduct, dotProduct, isWithin, linearDistance, linearDistance, linearDistanceSquared, linearDistanceSquared, magnitude, magnitude, normalDistance, normalDistance, normalDistanceSquared, normalDistanceSquared, rotateXY, rotateXY, rotateXZ, rotateXZ, rotateZY, rotateZY, translate
protected static final GeoPoint[] NO_POINTS
protected static final Membership[] NO_BOUNDS
protected static final Plane normalYPlane
protected static final Plane normalXPlane
protected static final Plane normalZPlane
public final double D
public Plane(double A, double B, double C, double D)
A
- is AB
- is BC
- is CD
- is Dpublic Plane(Vector A, Vector B)
A
- is the first point (origin based).B
- is the second point (origin based).public Plane(PlanetModel planetModel, double sinLat)
planetModel
- is the planet model.sinLat
- is the sin(latitude).public Plane(double x, double y)
x
- is the specified x value.y
- is the specified y value.public Plane(Vector v, double D)
v
- is the normal vector.D
- is the D offset from the origin.public static Plane constructNormalizedZPlane(Vector... planePoints)
planePoints
- is a set of points to choose from. The best one for constructing the most precise plane is picked.public static Plane constructNormalizedYPlane(Vector... planePoints)
planePoints
- is a set of points to choose from. The best one for constructing the most precise plane is picked.public static Plane constructNormalizedXPlane(Vector... planePoints)
planePoints
- is a set of points to choose from. The best one for constructing the most precise plane is picked.public static Plane constructNormalizedZPlane(double x, double y)
x
- is the x value.y
- is the y value.public static Plane constructNormalizedYPlane(double x, double z, double DValue)
x
- is the x value.z
- is the z value.DValue
- is the offset from the origin for the plane.public static Plane constructNormalizedXPlane(double y, double z, double DValue)
y
- is the y value.z
- is the z value.DValue
- is the offset from the origin for the plane.public double evaluate(Vector v)
v
- is the vector.public double evaluate(double x, double y, double z)
x
- is the x value.y
- is the y value.z
- is the z value.public boolean evaluateIsZero(Vector v)
v
- is the vector.public boolean evaluateIsZero(double x, double y, double z)
x
- is the x value.y
- is the y value.z
- is the z value.public Plane normalize()
public double arcDistance(PlanetModel planetModel, GeoPoint v, Membership... bounds)
GeoPoint
.public double arcDistance(PlanetModel planetModel, double x, double y, double z, Membership... bounds)
planetModel
- is the planet model.x
- is the x vector value.y
- is the y vector value.z
- is the z vector value.bounds
- are the bounds which constrain the intersection point.public double normalDistance(Vector v, Membership... bounds)
v
- is the vector.bounds
- are the bounds which constrain the intersection point.public double normalDistance(double x, double y, double z, Membership... bounds)
x
- is the vector x.y
- is the vector y.z
- is the vector z.bounds
- are the bounds which constrain the intersection point.public double normalDistanceSquared(Vector v, Membership... bounds)
v
- is the vector.bounds
- are the bounds which constrain the intersection point.public double normalDistanceSquared(double x, double y, double z, Membership... bounds)
x
- is the vector x.y
- is the vector y.z
- is the vector z.bounds
- are the bounds which constrain the intersection point.public double linearDistance(PlanetModel planetModel, GeoPoint v, Membership... bounds)
planetModel
- is the planet model.v
- is the point.bounds
- are the bounds which constrain the intersection point.public double linearDistance(PlanetModel planetModel, double x, double y, double z, Membership... bounds)
planetModel
- is the planet model.x
- is the vector x.y
- is the vector y.z
- is the vector z.bounds
- are the bounds which constrain the intersection point.public double linearDistanceSquared(PlanetModel planetModel, GeoPoint v, Membership... bounds)
planetModel
- is the planet model.v
- is the point.bounds
- are the bounds which constrain the intersection point.public double linearDistanceSquared(PlanetModel planetModel, double x, double y, double z, Membership... bounds)
planetModel
- is the planet model.x
- is the vector x.y
- is the vector y.z
- is the vector z.bounds
- are the bounds which constrain the intersection point.public GeoPoint[] interpolate(GeoPoint start, GeoPoint end, double[] proportions)
start
- is the start point.end
- is the end point.proportions
- is an array of fractional proportions measured between start and end.protected static Vector modify(GeoPoint start, double transX, double transY, double transZ, double sinRA, double cosRA, double sinHA, double cosHA)
start
- is the start point.transX
- is the translation x value.transY
- is the translation y value.transZ
- is the translation z value.sinRA
- is the sine of the ascension angle.cosRA
- is the cosine of the ascension angle.sinHA
- is the sine of the height angle.cosHA
- is the cosine of the height angle.protected static GeoPoint reverseModify(Vector point, double transX, double transY, double transZ, double sinRA, double cosRA, double sinHA, double cosHA)
point
- is the translated point.transX
- is the translation x value.transY
- is the translation y value.transZ
- is the translation z value.sinRA
- is the sine of the ascension angle.cosRA
- is the cosine of the ascension angle.sinHA
- is the sine of the height angle.cosHA
- is the cosine of the height angle.public GeoPoint[] findIntersections(PlanetModel planetModel, Plane q, Membership... bounds)
planetModel
- is the planet model.q
- is the plane to intersect with.bounds
- are the bounds to consider to determine legal intersection points.protected GeoPoint[] findIntersections(PlanetModel planetModel, Plane q, Membership[] bounds, Membership[] moreBounds)
planetModel
- is the planet model to use in finding points.q
- is the plane to intersect with.bounds
- is the set of bounds.moreBounds
- is another set of bounds.public void recordBounds(PlanetModel planetModel, XYZBounds boundsInfo, Membership... bounds)
planetModel
- is the planet model to use in determining bounds.boundsInfo
- is the xyz info to update with additional bounding information.bounds
- are the surfaces delineating what's inside the shape.public void recordBounds(PlanetModel planetModel, LatLonBounds boundsInfo, Membership... bounds)
planetModel
- is the planet model to use in determining bounds.boundsInfo
- is the lat/lon 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, GeoPoint point)
boundsInfo
- is the object to be modified.bounds
- is the area that the point must be within.point
- is the point.public boolean intersects(PlanetModel planetModel, Plane q, GeoPoint[] notablePoints, GeoPoint[] moreNotablePoints, Membership[] bounds, Membership... moreBounds)
planetModel
- is the planet model to use in determining intersection.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)
p
- is the plane to compare against.protected static boolean meetsAllBounds(Vector p, Membership[] bounds)
p
- is the vector.bounds
- are the bounds.protected static boolean meetsAllBounds(double x, double y, double z, Membership[] bounds)
x
- is the x value.y
- is the y value.z
- is the z value.bounds
- are the bounds.protected static boolean meetsAllBounds(Vector p, Membership[] bounds, Membership[] moreBounds)
p
- is the vector.bounds
- are the bounds.moreBounds
- are an additional set of bounds.protected static boolean meetsAllBounds(double x, double y, double z, Membership[] bounds, Membership[] moreBounds)
x
- is the x value.y
- is the y value.z
- is the z value.bounds
- are the bounds.moreBounds
- are an additional set of bounds.public GeoPoint getSampleIntersectionPoint(PlanetModel planetModel, Plane q)
planetModel
- is the planet model.q
- is the second plane to consider.Copyright © 2000-2016 Apache Software Foundation. All Rights Reserved.