Index
All Classes|All Packages
A
- a - Variable in class math.equations.Linear
-
The coefficient of the linear term.
- a - Variable in class math.equations.Quadratic
-
The coefficient of the quadratic term.
- add(Geometry...) - Method in class geometries.GeometryList
-
Add many
Geometry
s to the collection. - add(GeometryList) - Method in class geometries.GeometryList
-
Add all the
Geometry
s in the givenGeometryList
to the collection. - add(Colour) - Method in class primitives.Colour
-
Add two colours together and return a new colour.
- add(Triple) - Method in class primitives.NonZeroVector
-
Adds two
NonZeroVector
s and returns a newNonZeroVector
. - add(Triple) - Method in class primitives.Vector
- add(Triple, DoubleTriFunction<T>) - Method in class primitives.Vector
- add(Vector) - Method in class primitives.Point
- add(V) - Method in class util.CompleteWeightedGraph
-
Add a vertex to the complete graph, adding an edge to each existing vertex and calculating the weight of each of these.
- addToTrace(Element) - Method in exception xml.XmlParserException
-
Add an XML element to the trace of where the error occurred.
- ambient - Variable in class primitives.Material
-
The ambient coefficients of the material
- ambient - Variable in class scene.Scene
-
The ambient lighting of the scene.
- AmbientLight - Class in lighting
-
This light models the small amounts of light which reflected so many times that their source is indeterminable.
- AmbientLight(Colour) - Constructor for class lighting.AmbientLight
-
Construct an ambient light with the specified colour.
- angle(NonZeroVector) - Method in class primitives.NonZeroVector
-
Calculates the angle in radians between this vector and the given vector.
- antialiasing() - Method in class scene.camera.CameraSettings
-
Get the antialiasing level which will be used by the camera.
- antialiasing(int) - Method in class scene.camera.CameraSettings
-
Specify the level of antialiasing to be used by the camera.
- apply(double, double, double) - Method in interface util.DoubleTriFunction
-
A function that takes three doubles and returns an object of type R.
- average(Colour...) - Static method in class primitives.Colour
-
Calculate the average between any number of colours.
B
- b - Variable in class math.equations.Linear
-
The constant.
- b - Variable in class math.equations.Quadratic
-
The coefficient of the linear term.
- background - Variable in class scene.Scene
-
The background colour of the image.
- BLACK - Static variable in class primitives.Colour
-
Black.
- blue() - Method in class primitives.Colour
-
Get the integer value of blue of this colour.
- boundary() - Method in class geometries.Cylinder
- boundary() - Method in class geometries.GeometryList
- boundary() - Method in class geometries.Tube
- boundary() - Method in interface geometries.Intersectible
-
Get the
Boundary
of this intersectible. - boundary() - Method in class geometries.Polygon
- boundary() - Method in class geometries.Sphere
C
- c - Variable in class math.equations.Quadratic
-
The constant.
- camera() - Method in class scene.Scene
-
Get the camera to be used to render the scene.
- Camera - Class in scene.camera
-
The camera represents the point of view of the rendered image.
- Camera() - Constructor for class scene.camera.Camera
-
Default constructor for camera.
- Camera(CameraSettings) - Constructor for class scene.camera.Camera
-
Constructs a camera from the given
CameraSettings
. - CameraIterator - Class in scene.camera
-
An iterator to iterate over the rays shot by the camera.
- CameraIterator(Camera) - Constructor for class scene.camera.CameraIterator
-
Get an iterator to iterate over the rays shot by the camera.
- CameraSettings - Class in scene.camera
-
A settings class to simplify the construction of
Camera
objects. - CameraSettings() - Constructor for class scene.camera.CameraSettings
-
Default constructor for CameraSettings.
- CameraSettings(Camera) - Constructor for class scene.camera.CameraSettings
-
Construct a camera settings with the values of a given
Camera
. - cli - package cli
- closest(List<Intersection>) - Method in class primitives.Ray
-
Returns the closest intersection to this ray's source from the given intersections.
- col - Variable in class scene.camera.Pixel
-
The column index of the pixel in its
PixelGrid
. - colour - Variable in class lighting.Light
-
The colour of the light.
- colour(Element) - Method in class xml.factories.element.XmlLightFactory
-
Given an XML element for a light source, it will extract and return the colour of it.
- Colour - Class in primitives
-
This class represents a digital colour, with the added functionality of adding and scaling colours.
- Colour(double, double, double) - Constructor for class primitives.Colour
-
Construct a new colour from the given red, green, and blue values.
- colourAt(Point) - Method in class lighting.DirectionalLight
-
Calculate the colour of the light that this light source is projecting onto a given point.
- colourAt(Point) - Method in class lighting.LightSource
-
Calculate the colour of the light that this light source is projecting onto a given point.
- colourAt(Point) - Method in class lighting.PointLight
-
Calculate the colour of the light that this light source is projecting onto a given point.
- colourAt(Point) - Method in class lighting.Spotlight
-
Calculate the colour of the light that this light source is projecting onto a given point.
- columns - Variable in class rendering.Resolution
-
The number of pixels in the width of the resolution.
- compare(double, double) - Static method in class math.compare.DoubleCompare
-
Compare two doubles.
- completeJobs(int) - Method in class cli.ProgressBar
- completeJobs(int) - Method in interface cli.Task
-
Let all registered trackers know that one more job has been completed.
- completeJobs(int) - Method in interface cli.TaskTracker
-
React to the completion of
number
jobs. - CompleteWeightedGraph<V,W extends java.lang.Comparable<W>> - Class in util
-
This class represents a complete weighted graph and provides an interface to add vertices and extract the edge with minimal weight.
- CompleteWeightedGraph(Iterable<V>, BiFunction<V, V, W>) - Constructor for class util.CompleteWeightedGraph
-
Construct a complete weighted graph with the given vertices and the given function which calculates the weights between them.
- CompleteWeightedGraph(BiFunction<V, V, W>) - Constructor for class util.CompleteWeightedGraph
-
Construct a complete weighted graph which uses the given function to compute weghts of edges between vertices.
- CompleteWeightedGraph.Edge - Class in util
-
This class represents a weighted edge of the graph.
- contains(V) - Method in class util.CompleteWeightedGraph.Edge
-
Checks if the given vertex is one of the vertices of the edge.
- create(String) - Method in class xml.factories.attribute.XmlColourFactory
-
Constructs a new
Colour
from an XML attribute string. - create(String) - Method in class xml.factories.attribute.XmlDoubleFactory
- create(String) - Method in class xml.factories.attribute.XmlFactorsFactory
-
Constructs a new
Factors
from an XML attribute string. - create(String) - Method in class xml.factories.attribute.XmlFactoryFromAttribute
-
Create an instance of type T from the given attribute string.
- create(String) - Method in class xml.factories.attribute.XmlIntegerFactory
- create(String) - Method in class xml.factories.attribute.XmlResolutionFactory
- create(String) - Method in class xml.factories.attribute.XmlTripleFactory
-
Constructs a new
Triple
from an XML attribute string. - create(Element) - Method in class xml.factories.element.XmlFactoryFromElement
-
Construct a new instance of type T from an XML
Element
. - create(Element, String) - Method in class xml.factories.attribute.XmlFactoryFromAttribute
-
Get and create an object from an XML attribute, if it exists, otherwise throw an
XmlParserException
. - create(Element, String, T) - Method in class xml.factories.attribute.XmlFactoryFromAttribute
-
Get and create an object from an XML attribute, if it exists, otherwise return the default value.
- createHelper(Element) - Method in class xml.factories.element.XmlAmbientLightFactory
-
Constructs a new
AmbientLight
from an XMLElement
. - createHelper(Element) - Method in class xml.factories.element.XmlCameraFactory
- createHelper(Element) - Method in class xml.factories.element.XmlCylinderFactory
- createHelper(Element) - Method in class xml.factories.element.XmlDirectionalLightFactory
- createHelper(Element) - Method in class xml.factories.element.XmlFactoryFromElement
-
Construct a new instance of type T from an XML
Element
. - createHelper(Element) - Method in class xml.factories.element.XmlGeometriesFactory
- createHelper(Element) - Method in class xml.factories.element.XmlLightSourcesFactory
- createHelper(Element) - Method in class xml.factories.element.XmlMaterialFactory
- createHelper(Element) - Method in class xml.factories.element.XmlNarrowSpotlightFactory
- createHelper(Element) - Method in class xml.factories.element.XmlPlaneFactory
- createHelper(Element) - Method in class xml.factories.element.XmlPointLightFactory
- createHelper(Element) - Method in class xml.factories.element.XmlPolygonFactory
- createHelper(Element) - Method in class xml.factories.element.XmlSceneFactory
- createHelper(Element) - Method in class xml.factories.element.XmlSphereFactory
- createHelper(Element) - Method in class xml.factories.element.XmlSpotlightFactory
- createHelper(Element) - Method in class xml.factories.element.XmlTriangleFactory
- createHelper(Element) - Method in class xml.factories.element.XmlTubeFactory
- cross(NonZeroVector) - Method in class primitives.NonZeroVector
-
Calculates the cross product of two
NonZeroVector
s. - cross(Vector) - Method in class primitives.Vector
-
Calculates the cross product of two
Vector
s. - cross(Vector, DoubleTriFunction<T>) - Method in class primitives.Vector
-
Calculates the cross product of two
Vector
s. - Cylinder - Class in geometries
-
This class represents a cylinder, which is a three-dimensional tube with a height, and closed disks on either end.
- Cylinder(Material, Ray, double, double) - Constructor for class geometries.Cylinder
-
This constructs a Cylinder.
D
- data - Variable in class scene.camera.Pixel
-
The data stored by each pixel.
- diffuse - Variable in class primitives.Material
-
The diffuse coefficients of the material.
- dimensions(double, double) - Method in class scene.camera.CameraSettings
-
Specify the width and height of the view plane.
- direction - Variable in class primitives.LineSegment
-
The
NormalizedVector
which the ray is pointing towards. - DirectionalLight - Class in lighting
-
Abstract base class for all lights which have a source.
- DirectionalLight(Colour, NormalizedVector) - Constructor for class lighting.DirectionalLight
-
Construct a directional light.
- discriminant - Variable in class math.equations.Quadratic
-
The discriminant of the quadratic equation.
- distance() - Method in class scene.camera.CameraSettings
-
Get the distance between the
Camera
and the view plane. - distance(double) - Method in class scene.camera.CameraSettings
-
Specify the distance between the
Camera
and the view plane. - distance(Point) - Method in class primitives.Point
- dot(Triple) - Method in class primitives.Vector
-
Calculates the dot product of two
Vector
s - DoubleCompare - Class in math.compare
-
Class for comparing doubles with tolerance.
- DoubleTriFunction<R> - Interface in util
-
A functional interface for a function that takes three doubles and returns an object of type R.
E
- EfficientIterator<T> - Class in util
-
Provides a framework to implement iterators without having to worry about executing hasNext() twice per iteration.
- EfficientIterator() - Constructor for class util.EfficientIterator
- emission - Variable in class primitives.Material
-
The emission light colour of the material.
- EMPTY_ARRAY - Variable in class math.equations.Polynomial
-
An empty array of doubles to return when there are no solutions.
- eq(double, double) - Static method in class math.compare.DoubleCompare
-
Check if two doubles are approximately equal.
- equals(double, double, double) - Method in class primitives.Triple
-
Checks if this
Triple
's values are equal to the given values. - equals(Object) - Method in class primitives.Ray
-
Compares the source and direction of the two
Ray
s. - equals(Object) - Method in class primitives.Triple
- equals(Object) - Method in class util.CompleteWeightedGraph.Edge
- extract() - Method in class util.CompleteWeightedGraph
-
Remove the edge with the minimum weight and return it.
F
- factor(Point) - Method in class lighting.NarrowSpotlight
- factor(Point) - Method in class lighting.Spotlight
-
Calculate the factor by which to scale the colour at a given point, based on the direction of the spotlight.
- Factors - Class in primitives
-
This class represents attenuation factors for the red, green, and blue channels.
- Factors(double) - Constructor for class primitives.Factors
-
Construct a factors object with the same value for all channels.
- Factors(double, double, double) - Constructor for class primitives.Factors
-
Construct a factors object.
- FastMatrixMult - Class in math.matrices
-
Fast matrix multiplication between a 3x1 matrix and a 1x3 matrix.
- FastMatrixMult(Triple, Triple) - Constructor for class math.matrices.FastMatrixMult
-
Multiply the two given vectors as if they were matrices.
- FastMatrixMultSelf - Class in math.matrices
-
Fast matrix multiplication between a vector (as a 3x1 matrix) and itsef (as a 1x3 matrix).
- FastMatrixMultSelf(Triple) - Constructor for class math.matrices.FastMatrixMultSelf
-
Multiply the given vector with itself as if they were matrices.
- finished() - Method in class cli.ProgressBar
- finished() - Method in interface cli.Task
-
Let all registered trackers know that the task has been completed.
- finished() - Method in interface cli.TaskTracker
-
React to the completion of the entire task.
- front() - Method in class scene.camera.CameraSettings
-
Get the direction the
Camera
will be facing. - front(NormalizedVector) - Method in class scene.camera.CameraSettings
-
Specify the direction the
Camera
will be facing.
G
- geometries - package geometries
- geometries - Variable in class scene.Scene
-
The collection of geometries in the scene.
- geometry - Variable in class geometries.Intersection
-
The geometry which the ray intersects.
- Geometry - Class in geometries
-
Represents a three dimensional shape
- Geometry(Material) - Constructor for class geometries.Geometry
-
Construct a new Geometry with the given material.
- GeometryList - Class in geometries
-
A collection of
Intersectible
s which aggregates the intersections between rays and all its elements. - GeometryList(Geometry...) - Constructor for class geometries.GeometryList
-
Construct a collection of geometries given an array of
Intersectible
s or given any number ofIntersectible
s. - GeometryList.GeometriesIterator - Class in geometries
-
Iterates over the leaves of the geometries hierarchy as if they were a flat collection of
Geometry
s. - geq(double, double) - Static method in class math.compare.DoubleCompare
-
Check if two doubles are approximately equal or a is greater than b.
- getChild(Element, String) - Static method in class xml.Util
-
Get a the first direct children with a given name of the given XML element.
- getChildren(Element) - Static method in class xml.Util
-
Get a list of direct children of the given XML element.
- getChildren(Element, String) - Static method in class xml.Util
-
Get a list of direct children with a given name of the given XML element.
- green() - Method in class primitives.Colour
-
Get the integer value of green of this colour.
- gt(double, double) - Static method in class math.compare.DoubleCompare
-
Check if a is greater than b by a non-negligible amount.
H
- hasChild(Element, String) - Static method in class xml.Util
-
Returns whether or not the given XML element has a child of the given name.
- hashCode() - Method in class primitives.Ray
-
Computes the hash code based on that of the source
Point
and the directionNonZeroVector
. - hashCode() - Method in class primitives.Triple
- hashCode() - Method in class util.CompleteWeightedGraph.Edge
- hasNext - Variable in class util.EfficientIterator
-
A flag indicating whether there are more elements to iterate over.
- hasNext() - Method in class util.EfficientIterator
- height() - Method in class scene.camera.CameraSettings
-
Get the height of the view plane.
- height(double) - Method in class scene.camera.CameraSettings
-
Specify the height of the view plane.
I
- I - Static variable in class primitives.NormalizedVector
-
The I unit vector
- ImageWriter - Class in rendering
-
This class is responsible for writing pixels to an image file.
- ImageWriter(String, Resolution) - Constructor for class rendering.ImageWriter
-
Construct an image writer which will write to the given file.
- intersect(LineSegment) - Method in class geometries.Cylinder
- intersect(LineSegment) - Method in class geometries.GeometryList
- intersect(LineSegment) - Method in interface geometries.Intersectible
-
Calculates all the intersections between a given
LineSegment
and this object. - intersect(LineSegment) - Method in class geometries.Plane
- intersect(LineSegment) - Method in class geometries.Polygon
- intersect(LineSegment) - Method in class geometries.Sphere
- intersect(LineSegment) - Method in class geometries.Tube
- Intersectible - Interface in geometries
-
This interface applies to objects which can be intersected with a ray to obtain the points of intersection.
- intersection(Point) - Method in class geometries.Geometry
-
Create an intersection object with this geometry and the given
Point
. - Intersection - Class in geometries
-
This class represents an intersection between a ray and a geometry.
- Intersection(Geometry, Point) - Constructor for class geometries.Intersection
-
Construct an intersection at some point with some geometry.
- inverse - Variable in class primitives.LineSegment
-
A precomputed vector where each coordinate is the inverse of the respective coordinate in the direction vector.
- isFinite() - Method in class primitives.Point
-
Determine if a point has finite values in each of its coordinates.
- iterator() - Method in class geometries.GeometryList
- iterator() - Method in class scene.camera.Camera
J
- J - Static variable in class primitives.NormalizedVector
-
The J unit vector
K
- K - Static variable in class primitives.NormalizedVector
-
The K unit vector
L
- length() - Method in class primitives.NormalizedVector
-
Gets the length of the vector.
- length() - Method in class primitives.Vector
-
Calculates the length of this
Vector
. - leq(double, double) - Static method in class math.compare.DoubleCompare
-
Check if two doubles are approximately equal or a is less than b.
- Light - Class in lighting
-
An abstract base class for all kinds of light.
- Light(Colour) - Constructor for class lighting.Light
-
A constructor to set the colour of the light.
- lighting - package lighting
- lights - Variable in class scene.Scene
-
The light source of the scene.
- LightSource - Class in lighting
-
Abstract base class for all lights which have a source.
- LightSource(Colour) - Constructor for class lighting.LightSource
-
Set the colour of the light source.
- Linear - Class in math.equations
-
Represents a linear polynomial and provides a way to solve it.
- Linear(double, double) - Constructor for class math.equations.Linear
-
Constructor of linear equations.
- LineSegment - Class in primitives
-
A straight line segment between two points.
- LineSegment(Point, NormalizedVector, double) - Constructor for class primitives.LineSegment
-
Construct a line segment starting at start, heading in the given direction, with length equal to the square root of
squareLength
(which may be infinity). - LineSegment(Point, Point) - Constructor for class primitives.LineSegment
-
Construct a line segment between start and end.
- lt(double) - Method in class primitives.Factors
-
Returns whether or not the values of the factors are all less than some threshold.
- lt(double, double) - Static method in class math.compare.DoubleCompare
-
Check if a is less than b by a non-negligible amount.
M
- main(String[]) - Static method in class cli.Main
-
The main entry point for the program.
- Main - Class in cli
-
A command line interface for the ray tracer.
- Main() - Constructor for class cli.Main
- material - Variable in class geometries.Geometry
-
The material of this geometry.
- material(Element) - Method in class xml.factories.element.XmlGeometryFactory
-
Given an XML element for a geometry, it will extract and return the material of it.
- Material - Class in primitives
-
This class contains all the configurations which affect how light interacts with some surface.
- Material(Colour, double, Factors, Factors, Factors, Factors, Factors) - Constructor for class primitives.Material
-
Material constructor.
- math.compare - package math.compare
- math.equations - package math.equations
- math.matrices - package math.matrices
- Matrix - Class in math.matrices
- Matrix(Vector, Vector, Vector) - Constructor for class math.matrices.Matrix
-
Matrix constructor which takes three
Vector
s. - multiply(NonZeroVector) - Method in class math.matrices.Matrix
-
Multiply the matrix by a
NonZeroVector
. - multiply(Point) - Method in class math.matrices.Matrix
-
Multiply the matrix by a
Point
. - multiply(Triple, DoubleTriFunction<T>) - Method in class math.matrices.Matrix
-
Multiply the matrix by a
Triple
.
N
- NarrowSpotlight - Class in lighting
-
This class is represents an directional light source that attenuates with respect to distance.
- NarrowSpotlight(Colour, Point, NormalizedVector, double, double, double, double) - Constructor for class lighting.NarrowSpotlight
- NEGATIVE_INFINITY - Static variable in class primitives.Point
-
The point (-INF, -INF, -INF).
- neq(double, double) - Static method in class math.compare.DoubleCompare
-
Check if two doubles are not approximately equal.
- next - Variable in class util.EfficientIterator
-
The next element to iterate over.
- next() - Method in class util.EfficientIterator
- NonZeroVector - Class in primitives
-
The
NonZeroVector
class represents aNonZeroVector
with it's base at the origin and it's head at thePoint
'head'. - NonZeroVector(double, double, double) - Constructor for class primitives.NonZeroVector
-
This constructor accepts 3 doubles and returns the appropriate
NonZeroVector
- nonZeroVectorTo(Point) - Method in class primitives.Point
- normal - Variable in class geometries.Plane
-
The normal vector of the plane.
- normal() - Method in class geometries.Intersection
-
Calculate the normal of the intersected geometry at the intersection point.
- normal(Point) - Method in class geometries.Cylinder
-
This function returns the normal vector relative to the
Point
p. - normal(Point) - Method in class geometries.Geometry
- normal(Point) - Method in class geometries.Plane
- normal(Point) - Method in class geometries.Polygon
-
Calculates the normal to the
Polygon
. - normal(Point) - Method in class geometries.Sphere
-
Returns normal to the sphere at given point.
- normal(Point) - Method in class geometries.Tube
-
This function returns the normal to the tube at the given point.
- normalized() - Method in class primitives.NonZeroVector
-
Creates a new
NonZeroVector
with the same direction as this one but with a magnitude of one. - normalized() - Method in class primitives.NormalizedVector
- NormalizedVector - Class in primitives
-
This class represents a special kind of
NonZeroVector
whose length is one. - NormalizedVector(double, double, double) - Constructor for class primitives.NormalizedVector
-
This constructor accepts 3 doubles and returns the appropriate
NonZeroVector
. - NormalizedVector(NonZeroVector) - Constructor for class primitives.NormalizedVector
-
Constructs a
NormalizedVector
from a not necessarily normalizedNonZeroVector
O
- ONE - Static variable in class primitives.Factors
-
The maximum value of Factors.
- optimize() - Method in class geometries.GeometryList
-
Restructures the internal structure of the geometries for optimal ray tracing.
- ORIGIN - Static variable in class primitives.Point
-
The point (0, 0, 0).
P
- parse(String) - Method in class xml.XmlSceneParser
-
Create a
Scene
from the given XML file. - performTask() - Method in interface cli.Task
-
Trigger the task.
- PhongRayTracer - Class in rendering.raytracing
-
This RayTracer implements the Phong model.
- PhongRayTracer(Scene, int, double) - Constructor for class rendering.raytracing.PhongRayTracer
-
Construct a new PhongRayTracer for the given scene.
- Pixel<T> - Class in scene.camera
-
This class represents a pixel in a
PixelGrid
. - Pixel(T, int, int) - Constructor for class scene.camera.Pixel
-
Construct a new
Pixel
with the given row and column indices storing somedata
about itself. - Plane - Class in geometries
-
A
Plane
is a flat two dimensional surface in three dimensional space which goes off to infinity in all directions. - Plane(Material, Point, NormalizedVector) - Constructor for class geometries.Plane
-
This constructor accepts a point on the plane and a vector perpendicular to the plane.
- Plane(Material, Point, Point, Point) - Constructor for class geometries.Plane
-
This constructor accepts three distinct points on the plane.
- point - Variable in class geometries.Intersection
-
The point at which the intersection occurs.
- point - Variable in class geometries.Plane
-
A point on the plane.
- Point - Class in primitives
- Point(double, double, double) - Constructor for class primitives.Point
-
Constructs a
Point
from three coordinates. - PointLight - Class in lighting
-
This class is represents an omni-directional light source that attenuates with respect to distance, similar to a light bulb.
- PointLight(Colour, Point, double, double, double) - Constructor for class lighting.PointLight
-
Construct a
PointLight
from aColour
and 3 doubles that represent the attenuation constants. - Polygon - Class in geometries
-
This class represents a polygon in three dimensional space.
- Polygon(Material, Point...) - Constructor for class geometries.Polygon
-
This constructor accepts a list of the vertices of the polygon.
- Polynomial - Class in math.equations
-
Abstract class for different types of polynomials to extend.
- Polynomial() - Constructor for class math.equations.Polynomial
- position() - Method in class scene.camera.Camera
-
Gets the point where the camera is located.
- position() - Method in class scene.camera.CameraSettings
-
Get the position where the
Camera
will be placed. - position(Point) - Method in class scene.camera.CameraSettings
-
Specify the position where the
Camera
will be placed. - POSITIVE_INFINITY - Static variable in class primitives.Point
-
The point (INF, INF, INF).
- primitives - package primitives
- ProgressBar - Class in cli
-
This class prints the progress of a task to standard output.
Q
- Quadratic - Class in math.equations
-
This class represents a quadratic equation and provides functions to help solve them.
- Quadratic(double, double, double) - Constructor for class math.equations.Quadratic
-
Constructor of quadratic equations.
R
- Ray - Class in primitives
-
The
Ray
class represents a ray with it's base at thePoint
'source' and shoots off in direction pointed at byNonZeroVector
'direction'. - Ray(Point, NormalizedVector) - Constructor for class primitives.Ray
- RayTracer - Class in rendering.raytracing
- RayTracer(Scene) - Constructor for class rendering.raytracing.RayTracer
- red() - Method in class primitives.Colour
-
Get the integer value of red of this colour.
- reflectivity - Variable in class primitives.Material
-
The reflective coefficients of the material.
- register(TaskTracker) - Method in interface cli.Task
-
Register a
TaskTracker
to track the progress of this object. - render() - Method in class rendering.Renderer
-
Calculates the colours of each pixel, write them to the ImageWriter, then write the image to the output file.
- Renderer - Class in rendering
-
This class is responsible for communicating between a
RayTracer
and anImageWriter
. - Renderer(Camera, RayTracer, String, int) - Constructor for class rendering.Renderer
-
Construct a renderer with the provided data.
- rendering - package rendering
- rendering.raytracing - package rendering.raytracing
- resolution() - Method in class scene.camera.Camera
-
Gets the resolution of the
Camera
. - resolution() - Method in class scene.camera.CameraSettings
-
Get the resolution of the
Camera
. - resolution(String) - Method in class scene.camera.CameraSettings
-
Specify the resolution of the
Camera
. - resolution(Resolution) - Method in class scene.camera.CameraSettings
-
Specify the resolution of the
Camera
. - Resolution - Class in rendering
-
Represents the resolution of an image.
- Resolution(int, int) - Constructor for class rendering.Resolution
-
Construct a resolution
x
byy
pixels. - Resolution(String) - Constructor for class rendering.Resolution
-
Construct a resolution from a string, such as "1920x1080".
- reversed() - Method in class primitives.NonZeroVector
- reversed() - Method in class primitives.NormalizedVector
-
Calculates a new
NormalizedVector
with the opposite direction to this vector. - reversed() - Method in class primitives.Vector
-
An alias for
Vector.scale(double)
with factor -1. - rgb() - Method in class primitives.Colour
-
Returns the RGB value representing the colour.
- rotate(double, double, double) - Method in class scene.camera.Camera
-
Create a new camera which is a rotation of this one by the given angles
pitch
,yaw
androll
. - RotationMatrix - Class in math.matrices
-
Represents a rotation matrix.
- RotationMatrix(double, double, double) - Constructor for class math.matrices.RotationMatrix
-
Constructs a rotation matrix from the pitch, yaw, and roll.
- row - Variable in class scene.camera.Pixel
-
The row index of the pixel in its
PixelGrid
. - rows - Variable in class rendering.Resolution
-
The number of pixels in the height of the resolution.
- runCommand(String...) - Static method in class cli.Main
-
Ray traces the xml files listed in the given args, applying the specified options.
S
- scale(double) - Method in class math.matrices.Matrix
-
Mutlyply the matrix by a scalar.
- scale(double) - Method in class primitives.Colour
-
Scale this colour and return a new colour.
- scale(double) - Method in class primitives.NonZeroVector
-
Constructs a new
NonZeroVector
which is a scalar multiplication of thisNonZeroVector
by a scalar. - scale(double) - Method in class primitives.Vector
- scale(double, DoubleTriFunction<T>) - Method in class primitives.Vector
- scale(Factors) - Method in class primitives.Colour
-
Scale this colour by three factors, one for each channel, and return a new colour.
- scale(Factors) - Method in class primitives.Factors
-
Scale each factor by the corresponding given factor.
- scene - package scene
- scene - Variable in class rendering.raytracing.RayTracer
-
The scene to trace each ray in.
- Scene - Class in scene
-
This class groups together the elements of a scene.
- Scene(Colour, AmbientLight) - Constructor for class scene.Scene
-
Constructor for the scene with no geometries.
- Scene(Colour, AmbientLight, GeometryList, List<LightSource>, Camera) - Constructor for class scene.Scene
-
Constructor for the scene.
- scene.camera - package scene.camera
- sensor - Variable in class scene.camera.Camera
-
The
PixelGrid
where all rays are shot from. - sensorPixels() - Method in class scene.camera.CameraSettings
-
Get the number of pixels along the x and y axes of the
Camera
's sensor. - sensorPixels(int) - Method in class scene.camera.CameraSettings
-
Specify the number of pixels along the x and y axes of the
Camera
's sensor. - sensorSize() - Method in class scene.camera.CameraSettings
-
Get the size of the sensor of the
Camera
. - sensorSize(double) - Method in class scene.camera.CameraSettings
-
Specify the size of the
Camera
's sensor. - setNext() - Method in class geometries.GeometryList.GeometriesIterator
- setNext() - Method in class scene.camera.CameraIterator
- setNext() - Method in class util.EfficientIterator
-
This method should set the values of the fields
next
andhasNext
. - setPixel(int, int, Colour) - Method in class rendering.ImageWriter
-
Set the pixel at coordinates (row, col) to the given colour.
- shift(NonZeroVector) - Method in class scene.camera.Camera
-
Create a new camera which is shifted by the given
NonZeroVector
. - shine - Variable in class primitives.Material
-
The shine exponent of the material.
- size() - Method in class util.CompleteWeightedGraph
-
Get the size of the graph
- solutions() - Method in class math.equations.Linear
- solutions() - Method in class math.equations.Polynomial
-
Calculates the solutions of the equation.
- solutions() - Method in class math.equations.Quadratic
- specular - Variable in class primitives.Material
-
The specular coefficients of the material.
- Sphere - Class in geometries
-
This represents a sphere.
- Sphere(Material, Point, double) - Constructor for class geometries.Sphere
-
Constructs a sphere from a given center point and a radius.
- Spotlight - Class in lighting
-
This class is represents an directional light source that attenuates with respect to distance.
- Spotlight(Colour, Point, NormalizedVector, double, double, double) - Constructor for class lighting.Spotlight
- squareDistance(Point) - Method in class lighting.DirectionalLight
- squareDistance(Point) - Method in class lighting.LightSource
-
Return the squared distance between the light source and the given point.
- squareDistance(Point) - Method in class lighting.PointLight
- squareDistance(Point) - Method in class primitives.Point
- squareLength - Variable in class primitives.LineSegment
-
The square of the distance between the source and the light source.
- squareLength() - Method in class primitives.NormalizedVector
-
Gets the length of the vector squared.
- squareLength() - Method in class primitives.Vector
-
Calculates the square of the length of this
Vector
. - start - Variable in class primitives.LineSegment
-
The
Point
at which the ray starts. - start() - Method in class cli.ProgressBar
- start() - Method in interface cli.Task
-
Let all registered trackers know that the task has been started.
- start() - Method in interface cli.TaskTracker
-
React to the starting of the entire task.
- substitute(double) - Method in class math.equations.Quadratic
-
Get the value of the quadratic for a given x value.
- subtract(Vector) - Method in class primitives.NonZeroVector
-
Subtracts two
NonZeroVector
s and returns a newNonZeroVector
. - subtract(Vector) - Method in class primitives.Point
- subtract(Vector) - Method in class primitives.Vector
- subtract(Vector, DoubleTriFunction<T>) - Method in class primitives.Vector
T
- task() - Method in interface cli.Task
-
The task to be performed.
- task() - Method in class rendering.Renderer
- Task - Interface in cli
-
Classes which inherit this interface provide a way for registered
TaskTracker
s to track the progress of a large task this object is doing which consists of many small jobs. - TaskTracker - Interface in cli
-
Classes which implement this interface are able to track the progress and process progress updates of
Task
objects. - taskTrackers() - Method in interface cli.Task
-
Get a list of all registered
TaskTracker
s. - taskTrackers() - Method in class rendering.Renderer
- toString() - Method in class cli.ProgressBar
- toString() - Method in class math.matrices.Matrix
- toString() - Method in class primitives.Point
- toString() - Method in class primitives.Ray
-
Returns a string representing the source and direction as a tuple.
- toString() - Method in class primitives.Triple
-
Returns the
Triple
as a string in the cartesian representation, e.g. - toString() - Method in class primitives.Vector
- toString() - Method in class rendering.Resolution
- toString() - Method in exception xml.XmlParserException
- totalJobs() - Method in interface cli.Task
-
Get the total number of jobs to be performed.
- totalJobs() - Method in class rendering.Renderer
- trace(Ray) - Method in class rendering.raytracing.PhongRayTracer
- trace(Ray) - Method in class rendering.raytracing.RayTracer
-
Trace the given ray to calculate the
Colour
that ray results in. - trace(Ray...) - Method in class rendering.raytracing.RayTracer
-
Trace the given rays to calculate the average
Colour
the rays result in. - transform(DoubleBinaryOperator, Triple, DoubleTriFunction<T>) - Method in class primitives.Triple
- transform(DoubleUnaryOperator, DoubleTriFunction<T>) - Method in class primitives.Triple
-
Similar to
Triple.transform(DoubleBinaryOperator, Triple, DoubleTriFunction)
but does not require an auxiliaryTriple
, since the transformation when called in this way does not depend on a second coordinate. - transparency - Variable in class primitives.Material
-
The transparency coefficients of the material
- travel(double) - Method in class primitives.LineSegment
-
Calculate the point along the line segment after traveling "distance" units in the line segment's direction.
- Triangle - Class in geometries
-
This class represents a triangle in three dimensional space.
- Triangle(Material, Point, Point, Point) - Constructor for class geometries.Triangle
-
Constructs a triangle from three
Point
s. - Triple - Class in primitives
-
A class that has three values, (x, y, z)
- Triple(double, double, double) - Constructor for class primitives.Triple
-
Construct a triple with the given coordinates.
- Tube - Class in geometries
-
A Tube is a 3D tube object that goes on to infinity.
- Tube(Material, Ray, double) - Constructor for class geometries.Tube
U
- up() - Method in class scene.camera.CameraSettings
-
Get the direction the
Camera
will consider "up". - up(NormalizedVector) - Method in class scene.camera.CameraSettings
-
Specify the direction the
Camera
will consider "up". - util - package util
- Util - Class in xml
-
A collection of functions to help parse the XML document.
V
- Vector - Class in primitives
-
The
Vector
class represents aNonZeroVector
with the single difference that the VectorBase can be the zero vector. - Vector(double, double, double) - Constructor for class primitives.Vector
-
This constructor accepts 3 doubles and returns the appropriate
Vector
- vectorTo(Point) - Method in class lighting.DirectionalLight
-
Calculate a
NormalizedVector
from the source of the light to the given point. - vectorTo(Point) - Method in class lighting.LightSource
-
Calculate a
NormalizedVector
from the source of the light to the given point. - vectorTo(Point) - Method in class lighting.PointLight
-
Calculate a
NormalizedVector
from the source of the light to the given point. - vectorTo(Point) - Method in class primitives.Point
- vertex1 - Variable in class util.CompleteWeightedGraph.Edge
-
One of the vertices of the edge.
- vertex2 - Variable in class util.CompleteWeightedGraph.Edge
-
The other vertex of the edge.
W
- weight - Variable in class util.CompleteWeightedGraph.Edge
-
The weight of the edge.
- width() - Method in class scene.camera.CameraSettings
-
Get the width of the view plane.
- width(double) - Method in class scene.camera.CameraSettings
-
Specify the width of the view plane.
- withinDistance(double) - Method in class primitives.LineSegment
-
Returns whether or not some given distance traveled from the start along the direction is within the length of the line segment.
- withinDistance(double) - Method in class primitives.Ray
- writeToFile() - Method in class rendering.ImageWriter
-
Write the image to disk.
X
- x - Variable in class primitives.Triple
-
The x coordinate.
- xml - package xml
- xml.factories.attribute - package xml.factories.attribute
- xml.factories.element - package xml.factories.element
- XmlAmbientLightFactory - Class in xml.factories.element
-
Constructs an
AmbientLight
from an XMLElement
. - XmlAmbientLightFactory() - Constructor for class xml.factories.element.XmlAmbientLightFactory
- XmlCameraFactory - Class in xml.factories.element
-
Creates a
Camera
from the given XMLElement
. - XmlCameraFactory() - Constructor for class xml.factories.element.XmlCameraFactory
- XmlColourFactory - Class in xml.factories.attribute
-
Constructs
Colour
s from XML attributes. - XmlColourFactory() - Constructor for class xml.factories.attribute.XmlColourFactory
- XmlCylinderFactory - Class in xml.factories.element
-
Constructs a
Cylinder
from an XMLElement
. - XmlCylinderFactory() - Constructor for class xml.factories.element.XmlCylinderFactory
- XmlDirectionalLightFactory - Class in xml.factories.element
-
This class can create a
DirectionalLight
from an XMLElement
. - XmlDirectionalLightFactory() - Constructor for class xml.factories.element.XmlDirectionalLightFactory
- XmlDoubleFactory - Class in xml.factories.attribute
-
Constructs doubles from XML attributes.
- XmlDoubleFactory() - Constructor for class xml.factories.attribute.XmlDoubleFactory
- XmlFactorsFactory - Class in xml.factories.attribute
-
Constructs
Factors
s from XML attributes. - XmlFactorsFactory() - Constructor for class xml.factories.attribute.XmlFactorsFactory
- XmlFactoryFromAttribute<T> - Class in xml.factories.attribute
-
This interface represents a class which constructs an object of type T from an XML attribute string.
- XmlFactoryFromAttribute() - Constructor for class xml.factories.attribute.XmlFactoryFromAttribute
- XmlFactoryFromElement<T> - Class in xml.factories.element
-
This interface represents a class which is able to create instances of type T from an XML
Element
. - XmlFactoryFromElement() - Constructor for class xml.factories.element.XmlFactoryFromElement
- XmlGeometriesFactory - Class in xml.factories.element
-
Constructs a
GeometryList
object from an XMLElement
. - XmlGeometriesFactory() - Constructor for class xml.factories.element.XmlGeometriesFactory
- XmlGeometryFactory - Class in xml.factories.element
-
This interface represents a class which is able to create
Geometry
instances from XMLElement
s. - XmlGeometryFactory() - Constructor for class xml.factories.element.XmlGeometryFactory
- XmlIntegerFactory - Class in xml.factories.attribute
-
Constructs doubles from XML attributes.
- XmlIntegerFactory() - Constructor for class xml.factories.attribute.XmlIntegerFactory
- XmlLightFactory - Class in xml.factories.element
-
This abstract class represents a class which is able to create
LightSource
instances from XMLElement
s. - XmlLightFactory() - Constructor for class xml.factories.element.XmlLightFactory
- XmlLightSourcesFactory - Class in xml.factories.element
-
This class is able to create a list of
LightSource
instances from an XMLElement
. - XmlLightSourcesFactory() - Constructor for class xml.factories.element.XmlLightSourcesFactory
- XmlMaterialFactory - Class in xml.factories.element
-
Constructs a new
Material
from an XMLElement
. - XmlMaterialFactory() - Constructor for class xml.factories.element.XmlMaterialFactory
- XmlNarrowSpotlightFactory - Class in xml.factories.element
-
Constructs a new
NarrowSpotlight
from an XMLElement
. - XmlNarrowSpotlightFactory() - Constructor for class xml.factories.element.XmlNarrowSpotlightFactory
- XmlParserException - Exception in xml
-
This exception is thrown when something goes wrong during the parsing of the XML file.
- XmlParserException(String) - Constructor for exception xml.XmlParserException
-
Construct this exception with a message.
- XmlParserException(String, Throwable) - Constructor for exception xml.XmlParserException
-
Construct this exception with a message and an inner exception.
- XmlParserException(Throwable) - Constructor for exception xml.XmlParserException
-
Construct this exception with an inner exception.
- XmlPlaneFactory - Class in xml.factories.element
-
Constructs a
Plane
from an XMLElement
. - XmlPlaneFactory() - Constructor for class xml.factories.element.XmlPlaneFactory
- XmlPointLightFactory - Class in xml.factories.element
-
Constructs a new
PointLight
from an XMLElement
. - XmlPointLightFactory() - Constructor for class xml.factories.element.XmlPointLightFactory
- XmlPolygonFactory - Class in xml.factories.element
-
Constructs a
Polygon
from an XMLElement
. - XmlPolygonFactory() - Constructor for class xml.factories.element.XmlPolygonFactory
- XmlResolutionFactory - Class in xml.factories.attribute
-
Constructs a new
Resolution
from an XML attribute string in a form similar to "1920x1080". - XmlResolutionFactory() - Constructor for class xml.factories.attribute.XmlResolutionFactory
- XmlSceneFactory - Class in xml.factories.element
-
Constructs a
Scene
from XMLElement
s. - XmlSceneFactory() - Constructor for class xml.factories.element.XmlSceneFactory
- XmlSceneParser - Class in xml
-
A class which parses an XML file and constructs the
Scene
. - XmlSceneParser() - Constructor for class xml.XmlSceneParser
-
Default constructor for the XML scene parser.
- XmlSphereFactory - Class in xml.factories.element
-
Constructs a
Sphere
from an XMLElement
. - XmlSphereFactory() - Constructor for class xml.factories.element.XmlSphereFactory
- XmlSpotlightFactory - Class in xml.factories.element
-
Constructs a new
Spotlight
from an XMLElement
. - XmlSpotlightFactory() - Constructor for class xml.factories.element.XmlSpotlightFactory
- XmlTriangleFactory - Class in xml.factories.element
-
Constructs a
Triangle
from an XMLElement
. - XmlTriangleFactory() - Constructor for class xml.factories.element.XmlTriangleFactory
- XmlTripleFactory<T extends Triple> - Class in xml.factories.attribute
-
Constructs
Triple
s from XML attributes, according to the givenDoubleTriFunction
. - XmlTripleFactory(DoubleTriFunction<T>) - Constructor for class xml.factories.attribute.XmlTripleFactory
-
Construct a triple factory which will create instances of the type returned by
creator
. - XmlTubeFactory - Class in xml.factories.element
-
Constructs a
Tube
from an XMLElement
. - XmlTubeFactory() - Constructor for class xml.factories.element.XmlTubeFactory
- xx - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (0, 0) (starting from top left).
- xy - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (0, 1) (starting from top left).
- xz - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (0, 2) (starting from top left).
Y
- y - Variable in class primitives.Triple
-
The y coordinate.
- yx - Variable in class math.matrices.FastMatrixMult
-
Matrix entry at position (1, 0) (starting from top left).
- yy - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (1, 1) (starting from top left).
- yz - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (1, 2) (starting from top left).
Z
- z - Variable in class primitives.Triple
-
The z coordinate.
- ZERO - Static variable in class primitives.Factors
-
The minimum value of Factors.
- ZeroVectorException - Exception in primitives
-
This exception is thrown when an attempt is made to create a zero vector.
- ZeroVectorException() - Constructor for exception primitives.ZeroVectorException
-
Construct a default zero vector exception with a default message.
- ZeroVectorException(String) - Constructor for exception primitives.ZeroVectorException
-
Construct a zero vector exception with a custom message.
- zx - Variable in class math.matrices.FastMatrixMult
-
Matrix entry at position (2, 0) (starting from top left).
- zy - Variable in class math.matrices.FastMatrixMult
-
Matrix entry at position (2, 1) (starting from top left).
- zz - Variable in class math.matrices.FastMatrixMultSelf
-
Matrix entry at position (2, 2) (starting from top left).
All Classes|All Packages