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

java.lang.Object
  extended by org.apache.commons.math3.geometry.euclidean.threed.InfiniteEllipticCylinder
All Implemented Interfaces:
Serializable, InfiniteCylinder, InfiniteShape, Shape

public final class InfiniteEllipticCylinder
extends Object
implements InfiniteCylinder, Serializable

This class is the Infinite Elliptic Cylinder class.

It represents the mathematical object by he same name

Since:
1.0
Version:
$Id: InfiniteEllipticCylinder.java 16755 2016-10-07 15:47:40Z bignon $
Author:
Rami Houdroge
See Also:
InfiniteCylinder, Shape, Serialized Form
Use sample :
With the following parameters :
  Vector3D axis = new Vector3D(0,0,1);
  Vector3D axisU = new Vector3D(1,0,0);
  double a = 1;
  double b = 1.5;
The user may instanciate an infinite oblique circular cone :
  InfiniteEllipticCylinder myCylinder = new InfiniteEllipticCylinder(axis, axisU, a, b);
Concurrency :
immutable

Constructor Summary
InfiniteEllipticCylinder(Vector3D myLocalOrigin, Vector3D myDirection, Vector3D myXAxis, double myA, double myB)
          This is the constructor for the class InfiniteEllipticCylinder.
 
Method Summary
 Vector3D[] closestPointTo(Line line)
          Calculate closest point to a line
 Vector3D closestPointTo(Vector3D point)
          Computes the closest point on the cone to a user specified point
 double distanceTo(Line line)
          Get the smallest distance from the line to the cone
 double distanceTo(Vector3D point)
           
 Vector3D getAffineLocalExpression(Vector3D myVector)
          Express a Vector3D in spheroid local frame.
 Vector3D getAffineStandardExpression(Vector3D myVector)
          Express a Vector3D in standard basis.
 Vector3D getDirection()
          This method returns the main axis of the cylinder
 Vector3D[] getIntersectionPoints(Line line)
          This methods computes and returns the intersection points between a line and the cylinder.
 Matrix3D getLocalBasisTransform()
          This method returns the matrix of the transformation to the local basis
 Vector3D getOrigin()
          This method returns the position of the cylinder on the Oxy plane
 double getSemiAxisA()
          This method returns the semi axis a
 double getSemiAxisB()
          This method returns the semi axis b
 Matrix3D getStandardBasisTransform()
          This method returns the matrix of the transformation to the standard basis
 Vector3D getVectorialLocalExpression(Vector3D myVector)
          Express a Vector3D in spheroid local frame.
 Vector3D getVectorialStandardExpression(Vector3D myVector)
          Express a Vector3D in standard basis.
 boolean intersects(Line line)
          This method returns true if the user specified line intersects the cylinder.
 String toString()
          Get a representation for this infinite elliptic cylinder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfiniteEllipticCylinder

public InfiniteEllipticCylinder(Vector3D myLocalOrigin,
                                Vector3D myDirection,
                                Vector3D myXAxis,
                                double myA,
                                double myB)
This is the constructor for the class InfiniteEllipticCylinder. It allow the user to instantiate an infinite elliptic cylinder. An infinite elliptic cylinder is a cylinder with the particularity that the result of the intersection of the cylinder with a plane perpendicular to its axis is an ellipse.

Parameters:
myLocalOrigin - Origin of cylinder. It is a point that belong to the cylinders' axis.
myDirection - Cylinder direction
myXAxis - Transver axis along which semi axis is a : corrected to be orthogonal to the direction
myA - semi axis of cylinder along myXAxis
myB - semi axis of cylinder along axis perpendicular to myXAxis and myAxis
Throws:
IllegalArgumentException - if semi-axis or norm of revolution axis is null
Method Detail

getOrigin

public Vector3D getOrigin()
This method returns the position of the cylinder on the Oxy plane

Returns:
A vector containing the position

getDirection

public Vector3D getDirection()
This method returns the main axis of the cylinder

Returns:
A vector containing the cylinders' axis

getSemiAxisA

public double getSemiAxisA()
This method returns the semi axis a

Returns:
A double representing the semi axis along X axis

getLocalBasisTransform

public Matrix3D getLocalBasisTransform()
This method returns the matrix of the transformation to the local basis

Returns:
the matrix

getSemiAxisB

public double getSemiAxisB()
This method returns the semi axis b

Returns:
A double representing the semi axis along b axis

getStandardBasisTransform

public Matrix3D getStandardBasisTransform()
This method returns the matrix of the transformation to the standard basis

Returns:
A vector containing the coordinates of the cylinder origin

getVectorialLocalExpression

public Vector3D getVectorialLocalExpression(Vector3D myVector)
Express a Vector3D in spheroid local frame. Warning : Vectorial transformation

Parameters:
myVector - Vector expressed in standard basis
Returns:
vectorRef Same vector expressed in spheroid local frame

getAffineStandardExpression

public Vector3D getAffineStandardExpression(Vector3D myVector)
Express a Vector3D in standard basis. Warning : Affine transformation

Parameters:
myVector - Vector expressed in spheroid local frame
Returns:
vectorRef Same vector expressed in standard basis

getAffineLocalExpression

public Vector3D getAffineLocalExpression(Vector3D myVector)
Express a Vector3D in spheroid local frame. Warning : Affine transformation

Parameters:
myVector - Vector expressed in standard basis
Returns:
vectorRef Same vector expressed in spheroid local frame

getVectorialStandardExpression

public Vector3D getVectorialStandardExpression(Vector3D myVector)
Express a Vector3D in standard basis. Warning : Vectorial transformation

Parameters:
myVector - Vector expressed in spheroid local frame
Returns:
vectorRef Same vector expressed in standard basis

intersects

public boolean intersects(Line line)
This method returns true if the user specified line intersects the cylinder.

Specified by:
intersects in interface Shape
Parameters:
line - User specified line
Returns:
a boolean set to true if the line intersects, false otherwise

getIntersectionPoints

public Vector3D[] getIntersectionPoints(Line line)
This methods computes and returns the intersection points between a line and the cylinder.

Specified by:
getIntersectionPoints in interface Shape
Parameters:
line - The line with which the intersections are to be computed
Returns:
A Vector3D array containing the intersections coordinates. If no intersections have been found, the array is empty.

distanceTo

public double distanceTo(Vector3D point)
Parameters:
point - specified by user in standard basis
Returns:
distance to point. Negative if point is inside cone

closestPointTo

public Vector3D closestPointTo(Vector3D point)
Computes the closest point on the cone to a user specified point

Parameters:
point - specified by user in standard basis
Returns:
A vector3D representing the coordinates of the closest point

closestPointTo

public Vector3D[] closestPointTo(Line line)
Calculate closest point to a line

Specified by:
closestPointTo in interface Shape
Parameters:
line - user line
Returns:
points in a Vector3D array.
Since:
1.0
See Also:
closestPointTo(Vector3D)

distanceTo

public double distanceTo(Line line)
Get the smallest distance from the line to the cone

Specified by:
distanceTo in interface Shape
Parameters:
line - the line
Returns:
the computed distance

toString

public String toString()
Get a representation for this infinite elliptic cylinder. The given parameters are in the same order as in the constructor.

Overrides:
toString in class Object
Returns:
a representation for this infinite elliptic cylinder


Copyright © 2016 CNES. All Rights Reserved.