/Users/lyon/j4p/src/graphics/raytracers/rmiRaytracer/raytracer/Targets.java
|
1 package graphics.raytracers.rmiRaytracer.raytracer;
2
3 import java.util.Vector;
4
5 class Targets {
6 static SceneConsts sConsts;
7 Vec VRP;
8 Vec light;
9 private Vector targetList = new Vector(); // objects in the scene
10
11 public int getSize() {
12 return targetList.size();
13 }
14
15 public Target getElementAt(int i) {
16 return (Target) targetList.elementAt(i);
17 }
18
19 public void add(Target t) {
20 targetList.addElement(t);
21 t.setScene(this);
22
23 }
24
25 public static final Targets getTargets() {
26 Targets s = new Targets();
27
28 // set up the lights and view reference point
29 s.VRP = new Vec(0.0, 0.0, -1.0);
30 s.light = new Vec(16.0, 8.0, -16.0);
31
32 s.add(new SphereTarget(0.05, -0.3, 0.0, 0.3));
33 s.add(new SphereTarget(0.05, 0.06, 0.0, 0.24));
34 s.add(new SphereTarget(0.05, 0.19, -0.205, 0.01));
35 s.add(new SphereTarget(0.05, 0.09, -0.237, 0.01));
36 s.add(new SphereTarget(0.05, 0.0, -0.230, 0.01));
37 s.add(new SphereTarget(0.05, 0.32, -0.205, 0.018));
38 s.add(new SphereTarget(0.05, 0.34, 0.0, 0.2));
39 s.add(new SphereTarget(0.1, 0.4, -0.195, 0.02));
40 s.add(new SphereTarget(-0.02, 0.393, -0.185, 0.02));
41
42 s.add(new SphereTarget(0.0, 0.0, 10, 10));
43 return s;
44 }
45 }