|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse
public abstract class AbstractEllipse
This is an abstract describing class for an ellipse in 3D space, with some algorithm to compute intersections and distances to some other objects.
Shape.distanceTo(Line)
,
Shape.intersects(Line)
,
Serialized FormCreation with two radiuses, and two Vector3D : Vector3D center = new Vector3D(1.0, 6.0, -2.0); Vector3D normal = new Vector3D(6.0, -3.0, -1.0); double radiusA = 2.0; double radiusB = 5.0; Ellipse ellipse = new Ellipse(center, normal, radiusA, radiusB); Intersection with a line : boolean intersects = ellipse(line);
Constructor Summary | |
---|---|
AbstractEllipse(Vector3D inCenter,
Vector3D inNormal,
Vector3D inUvector,
double inRadiusA,
double inRadiusB)
Build an ellipse in the 3D space from its center, normal vector, approximative U vector of the local frame, and two radiuses. |
Method Summary | |
---|---|
Vector3D[] |
closestPointTo(Line line)
Computes the points of the shape and the line realizing the shortest distance. |
Vector3D |
closestPointTo(Vector3D point)
Computes the point on the ellipse closest to a point. |
double |
distanceTo(Line line)
Computes the distance to a line. |
double |
distanceTo(Vector3D point)
Computes the shortest distance from a point to the ellipse. |
Vector3D |
getCenter()
|
Vector3D[] |
getIntersectionPoints(Line line)
Compute the intersection points with a line. |
Vector3D |
getNormal()
|
double |
getRadiusA()
|
double |
getRadiusB()
|
Vector3D |
getU()
|
Vector3D |
getV()
|
boolean |
intersects(Line line)
Tests the intersection with a line. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractEllipse(Vector3D inCenter, Vector3D inNormal, Vector3D inUvector, double inRadiusA, double inRadiusB)
inCenter
- position of the centerinNormal
- normal to the plane containing the ellipseinUvector
- approximative U vector of the local frame : corrected to be orthogonal to the normalinRadiusA
- radius on the U axis of the local frameinRadiusB
- radius on the V axis of the local frame
IllegalArgumentException
- if one radius is'nt strictly positive, if the normal or the uVector has a not strictly positive norm,
or if they are parallel.Method Detail |
---|
public final Vector3D getCenter()
public final Vector3D getNormal()
public final double getRadiusA()
public final double getRadiusB()
public final Vector3D getU()
public final Vector3D getV()
public final boolean intersects(Line line)
intersects
in interface Shape
line
- the line
public final Vector3D[] getIntersectionPoints(Line line)
getIntersectionPoints
in interface Shape
line
- the line
public final double distanceTo(Line line)
distanceTo
in interface Shape
line
- the line
public final double distanceTo(Vector3D point)
point
- the point
public final Vector3D closestPointTo(Vector3D point)
point
- the point
public final Vector3D[] closestPointTo(Line line)
closestPointTo
in interface Shape
line
- the line
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |