org.apache.commons.math3.geometry.euclidean.threed
Interface Shape

All Known Subinterfaces:
Cone, Cylinder, IEllipsoid, InfiniteCone, InfiniteCylinder, InfiniteShape, SolidShape
All Known Implementing Classes:
AbstractEllipse, Disk, Ellipse, Ellipsoid, EllipticCone, EllipticCylinder, InfiniteEllipticCone, InfiniteEllipticCylinder, InfiniteRectangleCone, InfiniteRectangleCylinder, InfiniteRightCircularCone, InfiniteRightCircularCylinder, Parallelepiped, Plane, Plate, RectangleCone, RightCircularCone, RightCircularCylinder, Sphere, SphericalCap, Spheroid

public interface Shape

Interface for all shapes.

It includes infinite and solid shapes. All of them must be able to compute their intersection and distance to a line.

Version:
$Id: Shape.java 3691 2012-03-16 08:15:40Z CardosoP $

Method Summary
 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.
 Vector3D[] getIntersectionPoints(Line line)
          Compute the intersection points with a line.
 boolean intersects(Line line)
          Tests the intersection with a line.
 

Method Detail

intersects

boolean intersects(Line line)
Tests the intersection with a line.

Parameters:
line - the line
Returns:
true if the line intersects the shape

getIntersectionPoints

Vector3D[] getIntersectionPoints(Line line)
Compute the intersection points with a line.

Parameters:
line - the line
Returns:
the intersection points if they exist. If no intersection is found, the dimension is zero

distanceTo

double distanceTo(Line line)
Computes the distance to a line.

Parameters:
line - the line
Returns:
the shortest distance between the the line and the shape

closestPointTo

Vector3D[] closestPointTo(Line line)
Computes the points of the shape and the line realizing the shortest distance. If the line intersects the shape, the returned points are identical : this point is the first common point found.

Parameters:
line - the line
Returns:
the two points : first the one from the line, and the one from the shape.


Copyright © 2017 CNES. All Rights Reserved.