org.metasyntactic.graphics.shapes
Class Sphere

java.lang.Object
  |
  +--org.metasyntactic.graphics.shapes.Shape
        |
        +--org.metasyntactic.graphics.shapes.CartesianShape
              |
              +--org.metasyntactic.graphics.shapes.ReflectiveShape
                    |
                    +--org.metasyntactic.graphics.shapes.VolumetricShape
                          |
                          +--org.metasyntactic.graphics.shapes.CircularVolume
                                |
                                +--org.metasyntactic.graphics.shapes.Sphere

public class Sphere
extends CircularVolume


Constructor Summary
Sphere()
          Creates a new instance of Sphere
 
Method Summary
static Sphere fromXML(org.w3c.dom.Element element)
           
 java.util.List getIntersections(Ray ray)
           
 java.util.List getIntersections1(Ray ray)
          returns null if there is no intersection
 java.lang.String toXML()
           
 
Methods inherited from class org.metasyntactic.graphics.shapes.CircularVolume
getRadius, setRadius
 
Methods inherited from class org.metasyntactic.graphics.shapes.VolumetricShape
getDepth, getHeight, getWidth, setDepth, setHeight, setWidth
 
Methods inherited from class org.metasyntactic.graphics.shapes.ReflectiveShape
getShadeModel, setShadeModel
 
Methods inherited from class org.metasyntactic.graphics.shapes.CartesianShape
getIntersection, getPosition, setPosition
 
Methods inherited from class org.metasyntactic.graphics.shapes.Shape
getColor, setColor, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Sphere

public Sphere()
Creates a new instance of Sphere

Method Detail

getIntersections

public java.util.List getIntersections(Ray ray)
Overrides:
getIntersections in class CartesianShape

getIntersections1

public java.util.List getIntersections1(Ray ray)
returns null if there is no intersection


fromXML

public static Sphere fromXML(org.w3c.dom.Element element)

toXML

public java.lang.String toXML()