-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathScene.java
More file actions
83 lines (65 loc) · 1.51 KB
/
Copy pathScene.java
File metadata and controls
83 lines (65 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
package scene;
import geometries.*;
import java.util.List;
import elements.*;
import primitives.Color;
public class Scene {
private String _name;
private Color _background;
private Geometries _geomtries;
private Camera _camera;
private double _distance;
private AmbientLight _ambientLight;
private List<LightSource> _lights;
// ***************** Constructors ********************** //
/**
* construct scene with string
*
* @param name
* - string
*/
public Scene(String name) {
_name = name;
_geomtries = new Geometries();
}
// ***************** Getters/Setters ********************** //
public String name() {
return _name;
}
public Color background() {
return _background;
}
public Camera camera() {
return _camera;
}
public double distance() {
return _distance;
}
public Geometries getGeomtries() {
return _geomtries;
}
public AmbientLight ambientLight() {
return _ambientLight;
}
public List<LightSource> lights() {
return _lights;
}
public void ambientLight(AmbientLight ambientLight) {
_ambientLight = ambientLight;
}
public void background(Color color) {
_background = color;
}
public void camera(Camera camera) {
_camera = camera;
}
public void distance(double distance) {
_distance = distance;
}
public void setGeomtries(Intersectable shape) {
_geomtries.addGeometry(shape);
}
public void setLights(List<LightSource> light) {
_lights = light;
}
}