public class Sphere
extends java.lang.Object
implements java.io.Serializable
| Modifier and Type | Field and Description |
|---|---|
Vector3 |
center
the center of the sphere
|
float |
radius
the radius of the sphere
|
| Constructor and Description |
|---|
Sphere(Vector3 center,
float radius)
Constructs a sphere with the given center and radius
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
boolean |
overlaps(Sphere sphere) |
float |
surfaceArea() |
float |
volume() |
public float radius
public final Vector3 center
public Sphere(Vector3 center, float radius)
center - The centerradius - The radiuspublic boolean overlaps(Sphere sphere)
sphere - the other spherepublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic float volume()
public float surfaceArea()