org.apache.commons.math3.geometry.euclidean.threed
Class Ellipse

java.lang.Object
  extended by org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse
      extended by 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

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 center
inNormal - normal to the plane containing the ellipse
inUvector - approximative U vector of the local frame : corrected to be orthogonal to the normal
inRadiusA - radius on the U axis of the local frame
inRadiusB - 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.
Method Detail

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.