Overview | Package | Class | Use | Tree | Index | Help
| Rings Version 0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## threeD.raytracer.surfaceUI
Class SphereUI

    java.lang.Object
      threeD.raytracer.surfaceUI.AbstractSurfaceUI
          threeD.raytracer.surfaceUI.SphereUI

All Implemented Interfaces:
  Surface, SurfaceUI, SurfaceWrapper

public class SphereUI
extends AbstractSurfaceUI

A SphereUI object is an extension of the basic Sphere object that can be used in an application with a user interface.

Field Summary

Fields inherited from class threeD.raytracer.surfaceUI.AbstractSurfaceUI
`surface`

Constructor Summary
`SphereUI()` Constructs a new SphereUI object that represents a unit sphere centered at the origin that is black.
`SphereUI(Sphere sphere)` Constructs a new SphereUI object based on the specified Sphere object.
`SphereUI(Vector location, double radius)` Constructs a new SphereUI object that represents a sphere with the specified center location, and radius, that is black.
`SphereUI(Vector location, double radius, RGB color)` Constructs a new SphereUI object that represents a sphere with the specified center location, radius, and color.

Method Summary
`void` | `draw(Graphics g, Camera camera)` Draws a simple representation of the sphere represented by this SphereUI object on the specified Graphics object using the viewing settings of the specified Camera object.
`String` | `getType()` Returns "Primitive Sphere" as the surface type of this SphereUI object.

Methods inherited from class threeD.raytracer.surfaceUI.AbstractSurfaceUI
`getColorAt, getDialog, getName, getNormalAt, getShadeBack, getShadeFront, getSurface, hasDialog, intersect, intersectAt, setName, setParent, setSurface, shade, toString`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### SphereUI

    public SphereUI()

  Constructs a new SphereUI object that represents a unit sphere centered at the origin that is black.

### SphereUI

    public SphereUI(Vector location,
                    double radius)

  Constructs a new SphereUI object that represents a sphere with the specified center location, and radius, that is black.

### SphereUI

    public SphereUI(Vector location,
                    double radius,
                    RGB color)

  Constructs a new SphereUI object that represents a sphere with the specified center location, radius, and color.

### SphereUI

    public SphereUI(Sphere sphere)

  Constructs a new SphereUI object based on the specified Sphere object.

Method Detail

### getType

    public String getType()

  Returns "Primitive Sphere" as the surface type of this SphereUI object.

### draw

    public void draw(Graphics g,
                     Camera camera)

  Draws a simple representation of the sphere represented by this SphereUI object on the specified Graphics object using the viewing settings of the specified Camera object.

Overview | Package | Class | Use | Tree | Index | Help
| Rings Version 0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 2003-05 Mike Murray