|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsimworldobjects.SimSensor
simworldobjects.SimTouchSensor
Simulates a light sensor
Constructor Summary | |
SimTouchSensor(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 | |
boolean |
getBooleanValue()
Returns the current boolean value of this sensor, a 'true' if it is touching something or 'false' if it is not. |
boolean |
getCurrentValue()
|
boolean |
getPreviousValue()
|
int |
getValue()
Returns the current value of this sensor, a 1 if it is touching something or 0 if it is not. |
double |
getXOffset()
|
double |
getZOffset()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimTouchSensor(SimRCX r, double xOffset, double zOffset, char loc)
r
- 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 boolean getBooleanValue()
public double getXOffset()
public double getZOffset()
public boolean getPreviousValue()
public boolean getCurrentValue()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |