A B C D E G I M N O P R S T V W Z

A

AbstractIntersection - Class in <Unnamed>
Partial implementation of Intersection interface.
AbstractIntersection(Ray, double) - Constructor for class AbstractIntersection
 
add(Color) - Method in class Color
Constructs a color whose color components are the sum of this color's components and the parameter color's components.
add(ColorVector) - Method in class ColorVector
Returns a color vector whose multipliers are the sum of this color's multipliers and the parametere color's multipliers.
add(Vector) - Method in class Point
Returns a copy of this point shifted by the given * vector.
add(Surface) - Method in class Scene
Adds the given surface into this scene.
add(Vector) - Method in class Vector
Returns the sum of this vector and the parameter vector.
addFocusListener(FocusListener) - Method in class ModelViewer
 
addKeyListener(KeyListener) - Method in class ModelViewer
 
addLight(Point) - Method in class Scene
Adds a light at the given poin into this scene with full brightness.
addScaled(double, Vector) - Method in class Point
Returns a copy of this point shifted by the given vector scaled by the given scalar.

B

BLACK - Static variable in class Color
 
BLACK_PLASTIC - Static variable in class Material
 
BRASS - Static variable in class Material
 

C

Canvas - Class in <Unnamed>
Maintains a canvas whose contents are unmanaged, but which has an underlying array that can be used to modify the contents directly.
Canvas() - Constructor for class Canvas
 
Color - Class in <Unnamed>
Represents a color with red, green, and blue components.
Color(double, double, double) - Constructor for class Color
Constructs a color with the given color components.
Color(float, float, float) - Constructor for class Color
Constructs a color with the given color components.
ColorVector - Class in <Unnamed>
Represents a factor by which to multiply a color's components, including different factors for each component.
ColorVector(double, double, double) - Constructor for class ColorVector
Constructs a color vector with the given component multipliers.
ColorVector(float, float, float) - Constructor for class ColorVector
Constructs a color vector with the given component multipliers.
create(double, double, double) - Static method in class Point
Constructs a point with the given coordinates.
create(Point, Vector) - Static method in class Ray
Creates a ray with the given originating point and direction.
create(double, double, double) - Static method in class Vector
Creates a vector with the given components.
cross(Vector) - Method in class Vector
Returns the cross-product of this vector and the parameter vector.

D

dot(Vector) - Method in class Vector
Returns the dot-product of this vector and the parameter vector.
dotPoint(Point) - Method in class Vector
Returns the dot-product of this vector and the vector from the origin to the parameter point.

E

EMPTY - Static variable in class Surface
 
extend(double) - Method in class Ray
Returns the point along the ray where the direction, scaled by the given multiplier, has been added to the originating point.

G

getAmbient() - Method in class Scene
Returns the brightness of the scene's ambient light.
getBlue() - Method in class Color
Returns the blue color component.
getBlue() - Method in class ColorVector
Returns the blue color muliplier.
getColor(double, double, double) - Method in class Material
Returns the color of this surface given the amount of ambient, diffuse, and specular light computed to fall on the surface.
getDirection() - Method in class Ray
Returns the direction of this ray.
getDistance() - Method in class AbstractIntersection
 
getDistance() - Method in class Intersection
Returns the distance along the ray to the intersection; ie, how many times the direction vector should be added to the point to reach the surface.
getDistanceTo(Point) - Method in class Point
Returns the distance between this point and the parameter point.
getGreen() - Method in class Color
Returns the green color component.
getGreen() - Method in class ColorVector
Returns the green color muliplier.
getHitPoint() - Method in class AbstractIntersection
 
getHitPoint() - Method in class Intersection
Returns the point on the surface where the ray hit.
getIncidentRay() - Method in class AbstractIntersection
 
getIntersection(Ray) - Method in class Polygon
 
getIntersection(Ray) - Method in class Sphere
 
getIntersection(Ray) - Method in class Surface
Returns information about the closest point on this surface that the query ray hits, where the ``distance'' along the ray will be at least one.
getLength() - Method in class Vector
Returns the length of this vector.
getLengthSquared() - Method in class Vector
Returns the square of the length of this vector.
getLights() - Method in class Scene
Returns an unmodifiable list holding the locations of all lights in the scene.
getMaterial() - Method in class Intersection
Returns the material on the surface at the point the ray hit.
getNorm() - Method in class ColorVector
Returns the norm - ie, length - of this color vector.
getNormal() - Method in class AbstractIntersection
 
getNormal() - Method in class Intersection
Returns a vector normal to the surface at the point where the ray hit, in the direction of the surface's exterior.
getOrigin() - Method in class Ray
Returns the originating point of this ray.
getPixels() - Method in class Canvas
 
getRed() - Method in class Color
Returns the red color component.
getRed() - Method in class ColorVector
Returns the red color muliplier.
getReflectivity() - Method in class Material
Returns a color vector representing how reflective this material is for the three color components.
getRefractiveIndex() - Method in class Material
Returns this material's refractive index, a number between 0.0 and 1.0, with a vacuum being 1.0.
getRefractivity() - Method in class Material
Returns a color vector representing how refractive this material is for the three color components.
getRenderer() - Method in class ModelViewer
 
getRGB() - Method in class Color
Returns the argb encoding of this color.
getScene() - Method in class ModelViewer
 
getSpecularExponent() - Method in class Material
Returns this material's specular exponent, as per Blinn's alternative to the Phong model.
getX() - Method in class Point
Returns the x-coordinate of this point.
getX() - Method in class Vector
Returns the x-component of this vector.
getY() - Method in class Point
Returns the y-coordinate of this point.
getY() - Method in class Vector
Returns the y-component of this vector.
getZ() - Method in class Point
Returns the z-coordinate of this point.
getZ() - Method in class Vector
Returns the z-component of this vector.
GLASS - Static variable in class Material
 
GOLD - Static variable in class Material
 
grabFocus() - Method in class ModelViewer
 

I

inShadow(Point, Point) - Method in class Scene
Returns true if there are any surfaces in the scene between the given point and the given light source.
Intersection - Class in <Unnamed>
Represents information about where a ray reaches a surface.
Intersection() - Constructor for class Intersection
 

M

main(String[]) - Static method in class Test1
 
main(String[]) - Static method in class Test2
 
main(String[]) - Static method in class Test3
 
Material - Class in <Unnamed>
Represents information about the specular properties of a surface, including how reflective or refractive the surface is.
Material() - Constructor for class Material
 
ModelViewer - Class in <Unnamed>
Manages a window containing a scene.
ModelViewer() - Constructor for class ModelViewer
 

N

newPixels(int[]) - Method in class Canvas
 
NONE - Static variable in class Intersection
Represents the null intersection - for when a ray doesn't meet any surface.
normalize() - Method in class Vector
Returns a vector in the same direction as this one, but whose length is one.

O

ONE - Static variable in class ColorVector
 
ORIGIN - Static variable in class Point
The origin point, with zero for all coordinates.

P

paintComponent(Graphics) - Method in class Canvas
 
Point - Class in <Unnamed>
Represents a point in three-dimensional coordinates.
Polygon - Class in <Unnamed>
Represents a three-dimensional flat surface.
Polygon(Point[], Material) - Constructor for class Polygon
 
projectOnto(Vector) - Method in class Vector
Returns the vector resulting from projecting this vector onto the given vector's direction.

R

Ray - Class in <Unnamed>
Represents a ray in three-dimensional coordinates, including an originating point and a direction vector.
removeFocusListener(FocusListener) - Method in class ModelViewer
 
removeKeyListener(KeyListener) - Method in class ModelViewer
 
render(Scene) - Method in class Renderer
Renders the scene into the current destination array.
Renderer - Class in <Unnamed>
Object for drawing a view of the scene onto pixels.
Renderer() - Constructor for class Renderer
Constructs an empty renderer.

S

scale(double) - Method in class ColorVector
Returns a color vector whose multipliers are all scaled by the given scalar.
scale(ColorVector) - Method in class ColorVector
Returns a color vector whose multipliers are the product of this color's multipliers and the parameter color's multipliers.
scale(Color) - Method in class ColorVector
Returns a color whose components have been scaled by this color vector's multipliers.
scale(double) - Method in class Vector
Returns a copy of this vector scaled by the given vector.
Scene - Class in <Unnamed>
Represents a scene, including both the surfaces and the light sources in the scene.
Scene() - Constructor for class Scene
 
setAmbient(double) - Method in class Scene
Sets the brightness of the scene's ambient light.
setFrustum(double, double, double, double, double, double) - Method in class Renderer
Sets the coordinates of the view frustum.
setPixels(int[], int, int) - Method in class Renderer
Sets the destination array where pixels should be stored once computed.
setScene(Scene) - Method in class ModelViewer
 
setView(Point, Point, Vector) - Method in class Renderer
Sets the location and orientation of the viewer.
SILVER - Static variable in class Material
 
Sphere - Class in <Unnamed>
Represents a solid sphere.
Sphere(Point, double, Material) - Constructor for class Sphere
 
Sphere(Point, double) - Constructor for class Sphere
 
subtract(Point) - Method in class Point
Returns the vector from the parameter point to this point - ie, one whose components are the difference of this vector's coordinates and the parameter vector's coordinates.
subtract(Vector) - Method in class Vector
Returns the difference of this vector and the parameter vector.
Surface - Class in <Unnamed>
Represents an abstract surface in the scene.
Surface() - Constructor for class Surface
 

T

Test1 - Class in <Unnamed>
 
Test2 - Class in <Unnamed>
 
Test3 - Class in <Unnamed>
 
TestWindow - Class in <Unnamed>
Manages a window for the testing programs that allows the user to navigate around a scene using the arrow keys.
TestWindow() - Constructor for class TestWindow
 
toString() - Method in class Color
 
toString() - Method in class ColorVector
 
toString() - Method in class Point
 
toString() - Method in class Vector
 
traceRay(Ray) - Method in class Scene
Determines the closest intersection of the given ray with the scene that lies at least 1 unit away - ie, where the difference between hit point and the ray's origin is at least as long as the ray's direction vector.

V

Vector - Class in <Unnamed>
Represents a vector in three-dimensional space.

W

WHITE - Static variable in class Color
 
WHITE_PLASTIC - Static variable in class Material
 

Z

ZERO - Static variable in class ColorVector
 
ZERO - Static variable in class Vector
The zero vector, with zero in all components.

A B C D E G I M N O P R S T V W Z