org.apache.commons.math3.geometry.euclidean.threed
Class Ellipse
java.lang.Object
org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse
org.apache.commons.math3.geometry.euclidean.threed.Ellipse
- All Implemented Interfaces:
- Serializable, Shape, SolidShape
public final class Ellipse
- extends AbstractEllipse
- implements Serializable
This is a describing class for an ellipse in 3D space, with some algorithm to compute intersections and distances to
some other objects.
- Since:
- 1.0
- Version:
- $Id: Ellipse.java 17583 2017-05-10 13:05:10Z bignon $
- Author:
- Thomas Trapier
- See Also:
Shape.distanceTo(Line)
,
Shape.intersects(Line)
,
Serialized Form- Use sample :
Creation 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);
- Concurrency :
- immutable
Constructor Summary |
Ellipse(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 |
String |
toString()
Get a string representation for this ellipse. |
Methods inherited from class org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse |
closestPointTo, closestPointTo, distanceTo, distanceTo, getCenter, getIntersectionPoints, getNormal, getRadiusA, getRadiusB, getU, getV, intersects |
Ellipse
public Ellipse(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.
- Parameters:
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
- Throws:
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.
toString
public String toString()
- Get a string representation for this ellipse.
The given parameters are in the same order as
in the constructor.
- Overrides:
toString
in class Object
- Returns:
- a string representation for this ellipse
Copyright © 2017 CNES. All Rights Reserved.