Class Sphere

java.lang.Object
xal.tools.math.r3.Sphere
All Implemented Interfaces:
Serializable

public class Sphere extends Object implements Serializable
Represents a sphere in three-space.
Since:
Jan, 2003
Author:
Christopher Allen
See Also:
  • Constructor Summary

    Constructors
    Constructor
    Description
    Sphere(R3 ptOrg, double dblRad)
    Creates a new instance of SphereR3 initialized to the arguments.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Determine whether a point is a boundary element of the sphere
    Get the centroid of the sphere
    double
    Get the radius of the sphere
    boolean
    Determine whether a point is an element of the sphere
    double
    Compute the volume of this sphere

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Sphere

      public Sphere(R3 ptOrg, double dblRad)
      Creates a new instance of SphereR3 initialized to the arguments.
      Parameters:
      ptOrg - the centroid of the sphere
      dblRad - the radius of the sphere
  • Method Details

    • getRadius

      public double getRadius()
      Get the radius of the sphere
    • getCentroid

      public R3 getCentroid()
      Get the centroid of the sphere
    • membership

      public boolean membership(R3 pt)
      Determine whether a point is an element of the sphere
      Parameters:
      pt - point to be tested for membership
      Returns:
      true if pt is an element of the sphere
    • boundary

      public boolean boundary(R3 pt)
      Determine whether a point is a boundary element of the sphere
      Parameters:
      pt - point to be tested for boundary membership
      Returns:
      true if pt is an element of the sphere boundary
    • volume

      public double volume()
      Compute the volume of this sphere
      Returns:
      volume of sphere