Shape
public 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, setRadius
public Sphere()
public Sphere(double radius)
public double getVolume()
getVolume
in interface Shape
getVolume
in class Hypersphere