public final class InfiniteRectangleCone 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 three Vector3D and two angles between 0.0 and PI/4: Vector3D origin = new Vector3D(1.0, 6.0, -2.0); Vector3D axis = new Vector3D(6.0, -3.0, -1.0); Vector3D uVector = new Vector3D(-5.0, 3.0, 0.0); InfiniteRectangleCone cone = new InfiniteRectangleCone(origin, axis, uVector, 0.82, 0.56); Intersection with a line : boolean intersects = cone(line);
| Constructor and Description |
|---|
InfiniteRectangleCone(Vector3D inOrigin,
Vector3D inDirection,
Vector3D inUvector,
double inAngleU,
double inAngleV)
Build an infinite rectangle cone from the position of its origin, its axis, a vector defining the orientation of
the rectangle and two angles
|
| 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 |
getAngleU() |
double |
getAngleV() |
Vector3D |
getAxis() |
Vector3D[] |
getIntersectionPoints(Line line)
Compute the intersection points with a line.
|
Vector3D |
getOrigin() |
Vector3D |
getU() |
Vector3D |
getV() |
boolean |
intersects(Line line)
Tests the intersection with a line.
|
String |
toString()
Get a representation for this infinite rectangle cone.
|
public InfiniteRectangleCone(Vector3D inOrigin, Vector3D inDirection, Vector3D inUvector, double inAngleU, double inAngleV)
inOrigin - the origin of the coneinDirection - the direction of the axis of the coneinUvector - the input u vector : will be recomputed to be orthogonal to the axis and normalisedinAngleU - the angle of the pyramid on the U axisinAngleV - the angle of the pyramid on the V axisIllegalArgumentException - if one of the angles is not between 0.0 and PI/2 or if the axis has a null normpublic Vector3D getOrigin()
getOrigin in interface InfiniteConepublic Vector3D getAxis()
public Vector3D getU()
public Vector3D getV()
public double getAngleU()
public double getAngleV()
public boolean intersects(Line line)
intersects in interface Shapeline - the linepublic Vector3D[] getIntersectionPoints(Line line)
getIntersectionPoints in interface Shapeline - the linepublic double distanceTo(Line line)
distanceTo in interface Shapeline - the linepublic Vector3D[] closestPointTo(Line line)
closestPointTo in interface Shapeline - the lineCopyright © 2024 CNES. All rights reserved.