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

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

public final class InfiniteEllipticCone
extends Object
implements InfiniteCone, Serializable

This class is the Infinite Oblique Circular Cone class.

It represents the mathematical object by the same name.

Since:
1.0
Version:
$Id: InfiniteEllipticCone.java 17583 2017-05-10 13:05:10Z bignon $
Author:
Rami Houdroge
See Also:
InfiniteCone, Shape, Serialized Form
Use sample :
With the following parameters :
  Vector3D origin = new Vector3D(1,2,3);
  Vector3D axis = new Vector3D(0,0,1);
  Vector3D axisU = new Vector3D(1,0,0);
  double alpha = FastMath.PI / 4;
  double beta = FastMath.PI / 5;
The user may instanciate an infinite oblique circular cone :
  InfiniteObliqueCircularCone myCone = new InfiniteObliqueCircularCone(origin, axis, axisU, alpha, beta);
Concurrency :
immutable

Constructor Summary
InfiniteEllipticCone(Vector3D aorigin, Vector3D aDirection, Vector3D aaxisU, double aalpha, double bbeta)
          This is the constructor for the class InfiniteObliqueCircularCone.
 
Method Summary
 Vector3D[] closestPointTo(Line line)
          Calculate the 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 vector)
          Express a Vector3D in standard basis.
 double getAngleX()
          This method returns the angle of the cone along X axis
 double getAngleY()
          This method returns the angle of the cone along Y axis
 double getApertureX()
          This method returns the aperture of the cone along X axis
 double getApertureY()
          This method returns the aperture of the cone along Y axis
 Vector3D[] getIntersectionPoints(Line line)
          This methods computes and returns the intersection points between a line and the cone.
 Matrix3D getLocalBasisTransform()
          This method returns the matrix of the transformation to the local basis
 Vector3D getOrigin()
          This method returns the origin of the cone
 double getSemiAxisX()
          This method returns the semi axis of the cone along X axis
 double getSemiAxisY()
          This method returns the semi axis of the cone along Y axis
 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 vector)
          Express a Vector3D in standard basis.
 boolean intersects(Line line)
          This method returns true if the user specified line intersects the cone.
 boolean isInside(Vector3D point)
          Return true if point is inside cone
 boolean isStrictlyInside(Vector3D point)
          Return true if point is inside cone
 String toString()
          Get a representation for this infinite oblique circular cone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InfiniteEllipticCone

public InfiniteEllipticCone(Vector3D aorigin,
                            Vector3D aDirection,
                            Vector3D aaxisU,
                            double aalpha,
                            double bbeta)
This is the constructor for the class InfiniteObliqueCircularCone. It allow the user to instantiate an infinite oblique circular cone. An infinite oblique circular cone is a cone with the particularity that its axis is not perpendicular to the center of the base. As such, this cone does not have the rotational symmetry property about its axis.

Parameters:
aorigin - Apex, or vertex, or summit, of the cone
aDirection - Direction of the axis of the cone
aaxisU - Axis of the plane perpendicular to the cones' axis : will be recomputed to be orthogonal and and normalised. Along this direction (in the (origin, aaxisU, aaxis) plane), the cone has an angle of alpha. Along the cross product of axis and the recomputed axisU, the cone has an angle of beta
aalpha - Angle along axisU (in radians)
bbeta - Angle along axis.crossProduct(axisU) (in radians)
Throws:
IllegalArgumentException - if semi-axis or norm of revolution axis is null
Method Detail

getOrigin

public Vector3D getOrigin()
This method returns the origin of the cone

Specified by:
getOrigin in interface InfiniteCone
Returns:
A vector containing the coordinates of the cones origin

getAngleX

public double getAngleX()
This method returns the angle of the cone along X axis

Returns:
A double representing the angle along X axis

getApertureX

public double getApertureX()
This method returns the aperture of the cone along X axis

Returns:
A double representing the aperture along X axis

getSemiAxisX

public double getSemiAxisX()
This method returns the semi axis of the cone along X axis

Returns:
A double representing the semi axis along X axis (at height h=1)

getAngleY

public double getAngleY()
This method returns the angle of the cone along Y axis

Returns:
A double representing the angle along Y axis

getApertureY

public double getApertureY()
This method returns the aperture of the cone along Y axis

Returns:
A double representing the aperture along Y axis

getSemiAxisY

public double getSemiAxisY()
This method returns the semi axis of the cone along Y axis

Returns:
A double representing the semi axis along Y axis (at height h=1)

getLocalBasisTransform

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

Returns:
the matrix

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

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

getVectorialStandardExpression

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

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

getAffineStandardExpression

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

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

getStandardBasisTransform

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

Returns:
A vector containing the coordinates of the cones origin

intersects

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

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 cone.

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.

isInside

public boolean isInside(Vector3D point)
Return true if point is inside cone

Parameters:
point - in standard basis
Returns:
boolean if is inside
Since:
1.0

isStrictlyInside

public boolean isStrictlyInside(Vector3D point)
Return true if point is inside cone

Parameters:
point - in standard basis
Returns:
boolean if is inside
Since:
1.0

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

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(Line line)
Calculate the closest point to a line

Specified by:
closestPointTo in interface Shape
Parameters:
line - specified by user
Returns:
closest point as a Vector3D to line

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 oblique circular cone. The given parameters are in the same order as in the constructor.

Overrides:
toString in class Object
Returns:
a representation for this infinite oblique circular cone


Copyright © 2017 CNES. All Rights Reserved.