Package xal.tools.math.r3
Class Sphere
java.lang.Object
xal.tools.math.r3.Sphere
- All Implemented Interfaces:
Serializable
Represents a sphere in three-space.
- Since:
- Jan, 2003
- Author:
- Christopher Allen
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanDetermine whether a point is a boundary element of the sphereGet the centroid of the spheredoubleGet the radius of the spherebooleanmembership(R3 pt) Determine whether a point is an element of the spheredoublevolume()Compute the volume of this sphere
-
Constructor Details
-
Sphere
Creates a new instance of SphereR3 initialized to the arguments.- Parameters:
ptOrg- the centroid of the spheredblRad- the radius of the sphere
-
-
Method Details
-
getRadius
public double getRadius()Get the radius of the sphere -
getCentroid
Get the centroid of the sphere -
membership
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
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
-