|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimworldobjects.SimSensor
simworldobjects.SimLightSensor
Simulates a light sensor
Constructor Summary | |
SimLightSensor(SimRCX r,
double xOffset,
double zOffset,
char loc)
Sets up a light sensor on the given SimRCX, and positions it at the the appropriate offset from the robot's position. |
Method Summary | |
int |
getCurrentValue()
Returns the present value of the sensor. |
int |
getPreviousValue()
Returns the previous value read by the sensor. |
int |
getValue()
Returns the current brightness of the world at this sensor's position modified by: Simon Zienkiewicz |
double |
getXOffset()
Returns the offset from the owning SimRCX's x coordinate |
double |
getZOffset()
Returns the offset from the owning SimRCX's y coordinate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimLightSensor(SimRCX r, double xOffset, double zOffset, char loc)
loc
- the location of the sensorr
- the SimRCX owner of this sensorxOffset
- the offest from the SimRCX's x positionzOffset
- the offest from the SimRCX's z positionMethod Detail |
public int getValue()
getValue
in class SimSensor
public double getXOffset()
public double getZOffset()
public int getPreviousValue()
public int getCurrentValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |