1   package simworldobjects;
2   
3   /**
4   * Models a simple light source
5   *
6   * @author Graham Ritchie
7   */
8   public class SimLight extends BasicSimObject
9   {
10      // central brightness of this light
11      private int brightness;
12      
13      /**
14      * Sets up this light
15      *
16      * @param brightness the intensity of the light - must be between 1 and 100
17      * @param x the light's x coordinate
18      * @param y the light's y coordinate
19      * @param z the light's z coordinate
20      */
21      public SimLight(int brightness, double x, double y, double z)
22      {
23          // initialise the SimObject
24          super(30.0,30.0,30.0,"light",x,y,z,0.0,0.0);
25          
26          this.brightness=brightness;
27      }
28  
29      /**
30      * Returns the brightness of this light, this will always be a value between 0 and 100
31      *
32      * @return the brightness
33      */
34      public int getBrightness()
35      {
36          return brightness;
37      }
38  }
39