public final class InfiniteRightCircularCone extends Object implements InfiniteCone, Serializable
This is a describing class for a 3D infinite cone, with some algorithm to compute intersections and distances to some other objects.
Shape.distanceTo(Line)
,
Shape.intersects(Line)
,
Serialized FormCreation with an angle and two Vector3D : Vector3D origin = new Vector3D(1.0, 6.0, -2.0); Vector3D axis = new Vector3D(6.0, -3.0, -1.0); InfiniteEllipticCone cone = new InfiniteEllipticCone(origin, axis; FastMath.PI / 4.0); Intersection with a line : boolean intersects = cone(line);
Constructor and Description |
---|
InfiniteRightCircularCone(Vector3D inOrigin,
Vector3D inDirection,
double inAngle)
Build an infinite elliptic cone from its angle, the position of its origin and its axis
|
Modifier and Type | Method and Description |
---|---|
Vector3D[] |
closestPointTo(Line line)
Computes the points of the shape and the line realizing
the shortest distance.
|
double |
distanceTo(Line line)
Computes the distance to a line.
|
double |
getAngle() |
Vector3D |
getAxis() |
Vector3D[] |
getIntersectionPoints(Line line)
Compute the intersection points with a line.
|
Vector3D |
getOrigin() |
boolean |
intersects(Line line)
Tests the intersection with a line.
|
String |
toString()
Get a representation for this infinite elliptic cone.
|
public InfiniteRightCircularCone(Vector3D inOrigin, Vector3D inDirection, double inAngle)
inOrigin
- the origin of the coneinDirection
- the direction : axis of the coneinAngle
- the angle of the coneIllegalArgumentException
- if the angle is not between 0.0 and PI/4 or if the axis has a null normpublic Vector3D getOrigin()
getOrigin
in interface InfiniteCone
public Vector3D getAxis()
public double getAngle()
public boolean intersects(Line line)
intersects
in interface Shape
line
- the linepublic Vector3D[] getIntersectionPoints(Line line)
getIntersectionPoints
in interface Shape
line
- the linepublic double distanceTo(Line line)
distanceTo
in interface Shape
line
- the linepublic Vector3D[] closestPointTo(Line line)
closestPointTo
in interface Shape
line
- the lineCopyright © 2020 CNES. All rights reserved.