|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.commons.math3.geometry.euclidean.threed.SphericalCap
public final class SphericalCap
Implements a representation of a spherical cap solid.
This class implements the SolidShape interface, so it provides the expected : intersection with a line, distance from the surface of the shape, intersection points...
SolidShape
// A half-sphere :
// - sphere at the origin, radius 1.
// - plane (x,y), the normal is the z unit vector
final Sphere originSphere = new Sphere(new Vector3D(0., 0., 0.) , 1.);
final Plane xyPlane = new Plane(new Vector3D(0., 0., 1.));
final SphericalCap halfSphere = new SphericalCap(originSphere, xyPlane);
| Constructor Summary | |
|---|---|
SphericalCap(Sphere s,
Plane p)
Constructor of a SphericalCap using a Sphere and a Plane. |
|
| Method Summary | |
|---|---|
Vector3D[] |
closestPointTo(Line line)
Computes the points of the shape and the line realizing the shortest distance. |
double |
distanceTo(Line line)
Gives the distance from the line to the spherical cap. When the line intersects the spherical cap, the distance is 0. |
Vector3D[] |
getIntersectionPoints(Line line)
Returns a list of intersection points between the line and the spherical cap. Only the border points are given. |
boolean |
intersects(Line line)
Returns true when the line intersects the spherical cap. |
String |
toString()
Get a representation for this sphere. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public SphericalCap(Sphere s,
Plane p)
SphericalCap using a Sphere and a Plane.
s - the sphere enclosing the spherical capp - plane delimiting the spherical cap.
This plane must intersect with the sphere by more than a single point, if not
the spherical cap is considered undefined. The direction of the plane is used to determine in which side the
spherical cap is : it is on the side of the normal vector.| Method Detail |
|---|
public boolean intersects(Line line)
intersects in interface Shapeline - to intersect
Shape.intersects(Line)public double distanceTo(Line line)
distanceTo in interface Shapeline - to get the distance from
Shape.distanceTo(Line)public Vector3D[] getIntersectionPoints(Line line)
getIntersectionPoints in interface Shapeline - to intersect
Shape.getIntersectionPoints(Line)public Vector3D[] closestPointTo(Line line)
closestPointTo in interface Shapeline - the line
public String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||