org.apache.commons.math3.geometry.euclidean.threed
Class Disk
java.lang.Object
org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse
org.apache.commons.math3.geometry.euclidean.threed.Disk
- All Implemented Interfaces:
- Serializable, Shape, SolidShape
public final class Disk
- extends AbstractEllipse
- implements Serializable
Implements a representation of a disk.
The disk is defined by a center, a normal to the plane containing the disk, and a radius.
This class implements the SolidShape interface.
- Since:
- 1.0
- Version:
- $Id: Disk.java 17583 2017-05-10 13:05:10Z bignon $
- Author:
- Thomas Trapier
- See Also:
SolidShape
,
Serialized Form- Use sample :
// normal to the disk
final Vector3D normPlane = new Vector3D(...);
// center of the disk
final Vector3D centerDisk = new Vector3D(...);
// Radius of the disk
final double diskRadius = 6.55957;
// We create the disk
final Disk myDisk = new Disk(centerDisk, normPlane, diskRadius);
final double rez = capDisk.distanceTo(something);
- Concurrency :
- immutable
Method Summary |
String |
toString()
Get a string representation for this disk. |
Methods inherited from class org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse |
closestPointTo, closestPointTo, distanceTo, distanceTo, getCenter, getIntersectionPoints, getNormal, getRadiusA, getRadiusB, getU, getV, intersects |
Disk
public Disk(Vector3D center,
Vector3D normal,
double radius)
- Constructs the disk.
- Parameters:
center
- the vector for the centernormal
- the vector for the normal to the disk's planeradius
- the radius of the disk - has to be positive
toString
public String toString()
- Get a string representation for this disk.
The given parameters are in the same order as
in the constructor.
- Overrides:
toString
in class Object
- Returns:
- a string representation for this disk
Copyright © 2017 CNES. All Rights Reserved.