gov.sns.tools.math.r3
Class Sphere

java.lang.Object
  |
  +--gov.sns.tools.math.r3.Sphere
All Implemented Interfaces:
java.io.Serializable

public class Sphere
extends java.lang.Object
implements java.io.Serializable

Represents a sphere in three-space.

See Also:
Serialized Form

Constructor Summary
Sphere(R3 ptOrg, double dblRad)
          Creates a new instance of SphereR3 initialized to the arguments.
 
Method Summary
 boolean boundary(R3 pt)
          Determine whether a point is a boundary element of the sphere
 R3 getCentroid()
          Get the centroid of the sphere
 double getRadius()
          Get the radius of the sphere
 boolean membership(R3 pt)
          Determine whether a point is an element of the sphere
 double volume()
          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 Detail

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 Detail

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