Shapepublic class Sphere extends Hypersphere
radius| Constructor | Description |
|---|---|
Sphere() |
Creates sphere with unit radius
|
Sphere(double radius) |
Creates sphere of the given radius.
|
| Modifier and Type | Method | Description |
|---|---|---|
double |
getVolume() |
Returns the volume for the present sphere radius.
|
contains, D, getPosition, getRadius, setPosition, setRadiuspublic Sphere()
public Sphere(double radius)
public double getVolume()
getVolume in interface ShapegetVolume in class Hypersphere