edu.stanford.rsl.konrad.geometry.shapes.simple
Class Sphere

java.lang.Object
  extended by edu.stanford.rsl.konrad.geometry.AbstractShape
      extended by edu.stanford.rsl.konrad.geometry.AbstractSurface
          extended by edu.stanford.rsl.konrad.geometry.shapes.simple.SimpleSurface
              extended by edu.stanford.rsl.konrad.geometry.shapes.simple.QuadricSurface
                  extended by edu.stanford.rsl.konrad.geometry.shapes.simple.Sphere
All Implemented Interfaces:
Transformable, java.io.Serializable
Direct Known Subclasses:
ForbildSphere

public class Sphere
extends QuadricSurface

Creates a Sphere.

Author:
Rotimi X Ojo
See Also:
Serialized Form

Constructor Summary
Sphere()
           
Sphere(double radius)
           
Sphere(double radius, PointND surfaceOrigin)
           
 
Method Summary
 Axis getPrincipalAxis()
           
 PointND[] getRasterPoints(int number)
          Rasters the shape with a given number of points or less.
 boolean isBounded()
          Returns true if the shape is of limited space
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.QuadricSurface
applyTransform, evaluate, getDimension, getHits, getHitsOnBoundingBox, isMember
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.shapes.simple.SimpleSurface
addAllBoundingConditions, addBoundingCondition, evaluate, getChangeOfAxisMatrix, getInternalDimension, getTransform, intersect
 
Methods inherited from class edu.stanford.rsl.konrad.geometry.AbstractShape
getHitsOnBoundingBox_slow, getMax, getMin
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sphere

public Sphere()

Sphere

public Sphere(double radius,
              PointND surfaceOrigin)

Sphere

public Sphere(double radius)
Method Detail

isBounded

public boolean isBounded()
Description copied from class: AbstractShape
Returns true if the shape is of limited space

Specified by:
isBounded in class QuadricSurface
Returns:
Boundedness of this shape.

getRasterPoints

public PointND[] getRasterPoints(int number)
Description copied from class: AbstractShape
Rasters the shape with a given number of points or less. If the shape is not bounded null is returned.

Overrides:
getRasterPoints in class QuadricSurface
Parameters:
number - the number of points
Returns:
the raster points

getPrincipalAxis

public Axis getPrincipalAxis()
Specified by:
getPrincipalAxis in class SimpleSurface