com.badlogic.gdx.math.collision
Class Sphere
java.lang.Object
com.badlogic.gdx.math.collision.Sphere
- All Implemented Interfaces:
- java.io.Serializable
public class Sphere
- extends java.lang.Object
- implements java.io.Serializable
Encapsulates a 3D sphere with a center and a radius
- Author:
- badlogicgames@gmail.com
- See Also:
- Serialized Form
Constructor Summary |
Sphere(Vector3 center,
float radius)
Constructs a sphere with the given center and radius |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
radius
public float radius
- the radius of the sphere
center
public final Vector3 center
- the center of the sphere
Sphere
public Sphere(Vector3 center,
float radius)
- Constructs a sphere with the given center and radius
- Parameters:
center
- The centerradius
- The radius
overlaps
public boolean overlaps(Sphere sphere)
- Parameters:
sphere
- the other sphere
- Returns:
- whether this and the other sphere overlap
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)