Package scene
Class Scene
java.lang.Object
scene.Scene
public class Scene
extends java.lang.Object
This class groups together the elements of a scene. That is, the light sources, the geometries, and some additional
details.
-
Field Summary
Fields Modifier and Type Field Description AmbientLight
ambient
The ambient lighting of the scene.Colour
background
The background colour of the image.GeometryList
geometries
The collection of geometries in the scene.java.util.List<LightSource>
lights
The light source of the scene. -
Constructor Summary
Constructors Constructor Description Scene(Colour background, AmbientLight ambient)
Constructor for the scene with no geometries.Scene(Colour background, AmbientLight ambient, GeometryList geometries, java.util.List<LightSource> lights, Camera camera)
Constructor for the scene. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
background
The background colour of the image. This will be applied when a ray doesn't intersect any geometry. -
ambient
The ambient lighting of the scene. -
geometries
The collection of geometries in the scene. -
lights
The light source of the scene.
-
-
Constructor Details
-
Scene
Constructor for the scene with no geometries.- Parameters:
background
- The background colour of the scene.ambient
- The ambient lighting of the scene.
-
Scene
public Scene(Colour background, AmbientLight ambient, GeometryList geometries, java.util.List<LightSource> lights, Camera camera)Constructor for the scene.- Parameters:
background
- The background colour of the scene.ambient
- The ambient colour of the scene.geometries
- The geometries to initialise the scene with.lights
- The list of light sourcescamera
- The camera to use to render the scene.
-
-
Method Details
-
camera
Get the camera to be used to render the scene.- Returns:
- The camera to be used to render the scene.
-