com.badlogic.gdx.math.collision
Class Sphere

java.lang.Object
  extended by com.badlogic.gdx.math.collision.Sphere
All Implemented Interfaces:
Serializable

public class Sphere
extends Object
implements Serializable

Encapsulates a 3D sphere with a center and a radius

Author:
[email protected]
See Also:
Serialized Form

Field Summary
 Vector3 center
          the center of the sphere
 float radius
          the radius of the sphere
 
Constructor Summary
Sphere(Vector3 center, float radius)
          Constructs a sphere with the given center and radius
 
Method Summary
 boolean overlaps(Sphere sphere)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

radius

public float radius
the radius of the sphere


center

public final Vector3 center
the center of the sphere

Constructor Detail

Sphere

public Sphere(Vector3 center,
              float radius)
Constructs a sphere with the given center and radius

Parameters:
center - The center
radius - The radius
Method Detail

overlaps

public boolean overlaps(Sphere sphere)
Parameters:
sphere - the other sphere
Returns:
whether this and the other sphere overlap


Copyright © 2013. All Rights Reserved.