|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjosx.vision.Region
Representation of a region in the camera's field of view
Field Summary | |
static int |
MAX_REGIONS
|
Constructor Summary | |
Region(int x,
int y,
int w,
int h)
Create a region |
Method Summary | |
void |
addColorListener(ColorListener cl,
int color)
Add a color listener |
void |
addLightListener(LightListener ll)
Add a light listener |
void |
addMotionListener(MotionListener ml)
Add a motion listener |
ColorListener[] |
getColorListeners()
Return the array of color listeners |
int[] |
getColors()
Return the array of colors corresponding to the color listeners |
int |
getHeight()
Get the height of the region |
LightListener[] |
getLightListeners()
Return the array of light listeners |
MotionListener[] |
getMotionListeners()
Return the array of motion listeners |
int |
getWidth()
Get the width of the region |
int |
getX()
Get the X coordinate of the bottom left corner |
int |
getY()
Get the Y coordinate of the bottom left corner |
boolean |
inRegion(int tx,
int ty)
Test if point is in the region |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait |
Field Detail |
public static int MAX_REGIONS
Constructor Detail |
public Region(int x, int y, int w, int h)
x
- the x coordinate of the botton left cornery
- the y coordinate of the botton left cornerw
- the width of the regionh
- the height of the regionMethod Detail |
public int getX()
public int getY()
public int getWidth()
public int getHeight()
public boolean inRegion(int tx, int ty)
tx
- test x coordinatety
- test y coordinatepublic void addMotionListener(MotionListener ml)
ml
- the listener to addpublic void addColorListener(ColorListener cl, int color)
cl
- the listener to addcolor
- the color to look forpublic void addLightListener(LightListener ll)
ll
- the listener to addpublic MotionListener[] getMotionListeners()
public ColorListener[] getColorListeners()
public int[] getColors()
public LightListener[] getLightListeners()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |