simbad.sim
Class SensorMatrix

java.lang.Object
  extended bysimbad.sim.SensorData
      extended bysimbad.sim.SensorMatrix
All Implemented Interfaces:
java.lang.Cloneable

public class SensorMatrix
extends SensorData

A luminance Matrix : a 2d array of normalized luminances. It can be obtained from a vision sensor (Eye).


Field Summary
 int height
           
 int width
           
 
Constructor Summary
SensorMatrix(int width, int height)
           
SensorMatrix(SensorMatrix lm)
           
 
Method Summary
 java.lang.Object clone()
           
 float get(float xf, float yf)
          Access matrix element.
 float get(int x, int y)
          Access matrix element.
 float[] getArray()
           
 int getHeight()
          Return the matrix height in pixels.
 int getWidth()
          Return the matrix width in pixels.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

width

public int width

height

public int height
Constructor Detail

SensorMatrix

public SensorMatrix(int width,
                    int height)

SensorMatrix

public SensorMatrix(SensorMatrix lm)
Method Detail

getHeight

public int getHeight()
Return the matrix height in pixels.


getWidth

public int getWidth()
Return the matrix width in pixels.


get

public float get(int x,
                 int y)
Access matrix element.


get

public float get(float xf,
                 float yf)
Access matrix element.

Parameters:
xf - x coord in range 0..1
yf - y coord in range 0..1
Returns:

getArray

public float[] getArray()

clone

public java.lang.Object clone()
Specified by:
clone in class SensorData