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.
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 and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
String |
toString()
Get a string representation for this ellipse.
|
closestPointTo, closestPointTo, distanceTo, distanceTo, getCenter, getIntersectionPoints, getNormal, getRadiusA, getRadiusB, getU, getV, intersects
public Ellipse(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 frameIllegalArgumentException
- if one radius is'nt strictly positive, if the normal or the uVector has a not strictly positive norm,
or if they are parallel.Copyright © 2018 CNES. All Rights Reserved.