simbad.sim
Class LightSensor

java.lang.Object
  extended bysimbad.sim.BaseObject
      extended bysimbad.sim.Device
          extended bysimbad.sim.SensorDevice
              extended bysimbad.sim.Eye
                  extended bysimbad.sim.LightSensor

public class LightSensor
extends Eye

This class models a single light sensor. The sensor outputs a float proportionnal to received light.
Implementation Note:
We use a small camera to implement the light sensor. The camera must look back at the sensor body so as to measured the light received.


Nested Class Summary
 class LightSensor.LigthSensorJPanel
           
 
Nested classes inherited from class simbad.sim.Eye
Eye.EyeJPanel
 
Constructor Summary
LightSensor()
           
 
Method Summary
 javax.swing.JPanel createInspectorPanel()
          Creates the panel associated to the device.
 float getAverageLuminance()
          Returns the measured luminance.
 
Methods inherited from class simbad.sim.Eye
copyVisionImage, copyVisionImage, createCompatibleImage, createCompatibleSensorMatrix, getImageHeight, getImageWidth
 
Methods inherited from class simbad.sim.Device
attach, detach, getCanBeTraversed, getName, getRotationTransform, getTranslationTransform, getUpdatePerSecond, rotateY, setCanBeTraversed, setColor, setUpdateOnEachFrame, setUpdatePerSecond, translateTo
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LightSensor

public LightSensor()
Method Detail

getAverageLuminance

public float getAverageLuminance()
Returns the measured luminance.

Returns:
0.0 means no light , 1.0 f maximum enlightment

createInspectorPanel

public javax.swing.JPanel createInspectorPanel()
Description copied from class: Device
Creates the panel associated to the device. This panel can be inserted in the inspector window for monitoring.

Overrides:
createInspectorPanel in class Eye