gnu.gleem
Class BSphere

java.lang.Object
  |
  +--gnu.gleem.BSphere

public class BSphere
extends java.lang.Object

Represents a bounding sphere.


Constructor Summary
BSphere()
          Default constructor creates a sphere with center (0, 0, 0) and radius 0
BSphere(Vec3f center, float radius)
           
 
Method Summary
 void extendBy(BSphere arg)
          Mutate this sphere to encompass both itself and the argument.
 Vec3f getCenter()
           
 float getRadius()
           
 void makeEmpty()
          Re-initialize this sphere to center (0, 0, 0) and radius 0
 void set(Vec3f center, float radius)
           
 void setCenter(Vec3f center)
           
 void setRadius(float radius)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BSphere

public BSphere()
Default constructor creates a sphere with center (0, 0, 0) and radius 0


BSphere

public BSphere(Vec3f center,
               float radius)
Method Detail

makeEmpty

public void makeEmpty()
Re-initialize this sphere to center (0, 0, 0) and radius 0


setCenter

public void setCenter(Vec3f center)

getCenter

public Vec3f getCenter()

setRadius

public void setRadius(float radius)

getRadius

public float getRadius()

set

public void set(Vec3f center,
                float radius)

extendBy

public void extendBy(BSphere arg)
Mutate this sphere to encompass both itself and the argument. Ignores zero-size arguments.