org.apache.commons.math3.geometry.euclidean.threed
Class Disk

java.lang.Object
  extended by org.apache.commons.math3.geometry.euclidean.threed.AbstractEllipse
      extended by 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

Constructor Summary
Disk(Vector3D center, Vector3D normal, double radius)
          Constructs the disk.
 
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Disk

public Disk(Vector3D center,
            Vector3D normal,
            double radius)
Constructs the disk.

Parameters:
center - the vector for the center
normal - the vector for the normal to the disk's plane
radius - the radius of the disk - has to be positive
Method Detail

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.