simbad.sim
Class Eye

java.lang.Object
  extended by simbad.sim.BaseObject
      extended by simbad.sim.Device
          extended by simbad.sim.SensorDevice
              extended by simbad.sim.Eye
Direct Known Subclasses:
CameraSensor, LightSensor

public class Eye
extends SensorDevice


Nested Class Summary
 class Eye.EyeJPanel
           
private  class Eye.OffScreenCanvas3D
          An off screen Canvas3D for offscreen rendering of a 3D scene - call render to ask rendering
 
Field Summary
protected  int imageHeight
           
protected  int imageWidth
           
private  Eye.OffScreenCanvas3D offscreenCanvas3D
           
protected  int[] tempRGBABuffer
           
private  javax.media.j3d.View view
           
private  javax.media.j3d.ViewPlatform viewPlatform
           
(package private)  java.awt.image.BufferedImage visionImage
           
 
Fields inherited from class simbad.sim.BaseObject
black, branchGroup, canBeTraversed, compilable, detachedFromSceneGraph, group, localBounds, material, rotation, rotationGroup, translation, translationGroup, white, world
 
Constructor Summary
Eye(float radius, int imageWidth, int imageHeight)
           
 
Method Summary
 void copyVisionImage(java.awt.image.BufferedImage bim)
          Request to fill a bufferedImage with last capture.
 void copyVisionImage(SensorMatrix matrix)
          Request to fill a SensorMatrix with last capture.
(package private)  void create3D(float radius)
           
 java.awt.image.BufferedImage createCompatibleImage()
          for allocating a working copy of the vision image
 SensorMatrix createCompatibleSensorMatrix()
          for allocating a SensorMatrix compabtible with device dimensions
 javax.swing.JPanel createInspectorPanel()
          Creates the panel associated to the device.
(package private)  void createViewPlatform()
           
 int getImageHeight()
          Returns the height of captured image.
 int getImageWidth()
          Returns the width of captured image.
protected  void update()
          Called by simulator to render a new vision image
 
Methods inherited from class simbad.sim.Device
getName, getOwner, getUpdatePerSecond, reset, setName, setOwner, setUpdateOnEachFrame, setUpdatePerSecond, update
 
Methods inherited from class simbad.sim.BaseObject
addChild, addChild, attach, compile, create3D, detach, getBounds, getCanBeTraversed, getGroup, getNode, getRotationTransform, getRotationTransformGroup, getTranslation, getTranslationTransform, getTranslationTransform, resetTransforms, rotateY, setBounds, setCanBeTraversed, setColor, setWorld, translateTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

viewPlatform

private javax.media.j3d.ViewPlatform viewPlatform

view

private javax.media.j3d.View view

offscreenCanvas3D

private Eye.OffScreenCanvas3D offscreenCanvas3D

tempRGBABuffer

protected int[] tempRGBABuffer

visionImage

java.awt.image.BufferedImage visionImage

imageWidth

protected int imageWidth

imageHeight

protected int imageHeight
Constructor Detail

Eye

Eye(float radius,
    int imageWidth,
    int imageHeight)
Method Detail

create3D

void create3D(float radius)

createViewPlatform

void createViewPlatform()

createCompatibleImage

public final java.awt.image.BufferedImage createCompatibleImage()
for allocating a working copy of the vision image


createCompatibleSensorMatrix

public final SensorMatrix createCompatibleSensorMatrix()
for allocating a SensorMatrix compabtible with device dimensions


copyVisionImage

public final void copyVisionImage(java.awt.image.BufferedImage bim)
Request to fill a bufferedImage with last capture.

Parameters:
bim - - buffered image to be filled.

copyVisionImage

public final void copyVisionImage(SensorMatrix matrix)
Request to fill a SensorMatrix with last capture.

Parameters:
matrix - - to be filled

update

protected void update()
Called by simulator to render a new vision image

Overrides:
update in class Device

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 Device
Returns:
the JPanel. null if no panel can be associated

getImageWidth

public int getImageWidth()
Returns the width of captured image.

Returns:
width in pixels

getImageHeight

public int getImageHeight()
Returns the height of captured image.

Returns:
height in pixels