public class Sphere extends Object implements 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(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 float volume()
public float surfaceArea()
Copyright © 2018. All rights reserved.