- A - Static variable in class ch.aplu.robotsim.MotorPort
-
A motor port for a motor connected to port A.
- act() - Method in class ch.aplu.robotsim.TouchSensor
-
For internal use only (overrides Actor.act()).
- activate(boolean) - Method in class ch.aplu.robotsim.LightSensor
-
Turns on/off the LED used for reflecting light back into the sensor.
- addButtonListener(ButtonListener) - Method in class ch.aplu.robotsim.LegoRobot
-
Registers a button listener that simulates the events
when one of the brick buttons is hit.
- addCollisionListener(CollisionListener) - Method in class ch.aplu.robotsim.LegoRobot
-
Registers a robot-obtacle collision listener that fires
the collide callback when the circumcircle of the robot overlaps
with an obstacle.
- addLightListener(LightListener, int) - Method in class ch.aplu.robotsim.LightSensor
-
Registers the given LightListener to detect crossing the given trigger triggerLevel.
- addLightListener(LightListener) - Method in class ch.aplu.robotsim.LightSensor
-
Registers the given LightListener with default trigger triggerLevel 500.
- addMouseListener(GGMouseListener) - Method in class ch.aplu.robotsim.RobotContext
-
Registers a mouse listener to get left mouse button press,
release and drag events
- addObstacle(Obstacle, int, int) - Method in class ch.aplu.robotsim.LegoRobot
-
Adds the given obstacle in the obstacle list and shows it at the given
location.
- addPart(Part) - Method in class ch.aplu.robotsim.LegoRobot
-
Assembles the given part into the robot.
- addSoundListener(SoundListener, int) - Method in class ch.aplu.robotsim.NxtSoundSensor
-
Registers the given sound listener for the given trigger level.
- addSoundListener(SoundListener) - Method in class ch.aplu.robotsim.NxtSoundSensor
-
Registers the given sound listener with default trigger level 50.
- addSoundListener(SoundListener, int) - Method in class ch.aplu.robotsim.SoundSensor
-
Registers the given sound listener for the given trigger level.
- addSoundListener(SoundListener) - Method in class ch.aplu.robotsim.SoundSensor
-
Registers the given sound listener with default trigger level 50.
- addTarget(Target, int, int) - Method in class ch.aplu.robotsim.LegoRobot
-
Adds the given target in the target list and shows it at the given
location.
- addTouchListener(TouchListener) - Method in class ch.aplu.robotsim.TouchSensor
-
Register the given TouchListener to detect press or release events.
- addUltrasonicListener(UltrasonicListener, int) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Registers the given UltrasonicListener to detect crossing the given trigger triggerLevel.
- addUltrasonicListener(UltrasonicListener) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Registers the given UltrasonicListener with default trigger triggerLevel 100.
- C - Static variable in class ch.aplu.robotsim.MotorPort
-
A motor port for a motor connected to port C.
- ch.aplu.robotsim - package ch.aplu.robotsim
-
- channel - Static variable in class ch.aplu.robotsim.RobotContext
-
Channel obstacle.
- checkRobot() - Static method in class ch.aplu.robotsim.RobotContext
-
- checkRobot() - Static method in class ch.aplu.robotsim.RobotInstance
-
- clearDisplay() - Method in class ch.aplu.robotsim.LegoRobot
-
Clears the display.
- collide() - Method in interface ch.aplu.robotsim.CollisionListener
-
Called in a new thread when the circumcircle of the robot overlaps
with an obstacle.
- collisionCenter - Static variable in class ch.aplu.robotsim.LegoRobot
-
Center of a circle to detect robot-obstacle collisions
(pixel coordinates relative to center of robot image, default: (-13, 0)).
- CollisionListener - Interface in ch.aplu.robotsim
-
Interface with declarations of a callback method to detect robot-obstacle collisions.
- collisionRadius - Static variable in class ch.aplu.robotsim.LegoRobot
-
Radius of a circle to detect robot-obstacle collisions
(in pixels, default: 20).
- colorCubes - Static variable in class ch.aplu.robotsim.ColorSensor
-
Color cubes for detecting color labels.
6 user adaptable int arrays with red_min, red_max, green_min, green_max, blue_min, blue_max
for the colors Black, Blue, Green, Yellow, Red, White.
- ColorLabel - Enum in ch.aplu.robotsim
-
Enumeration of detectable colors for color sensors.
- ColorSensor - Class in ch.aplu.robotsim
-
Class that represents a color sensor.
- ColorSensor(SensorPort) - Constructor for class ch.aplu.robotsim.ColorSensor
-
Creates a sensor instance connected to the given port.
- ColorSensor() - Constructor for class ch.aplu.robotsim.ColorSensor
-
Creates a sensor instance connected to port S1.
- continueRelativeTo(int) - Method in class ch.aplu.robotsim.Motor
-
Same as rotateTo(int count), but the rotation counter
is not set to zero.
- continueRelativeTo(int, boolean) - Method in class ch.aplu.robotsim.Motor
-
Same as rotateTo(int count, boolean blocking), but the rotation counter
is not set to zero.
- continueTo(int) - Method in class ch.aplu.robotsim.Motor
-
Same as rotateTo(int count), but the rotation counter
is not set to zero.
- continueTo(int, boolean) - Method in class ch.aplu.robotsim.Motor
-
Same as rotateTo(int count, boolean blocking), but the rotation counter
is not set to zero.
- Gear - Class in ch.aplu.robotsim
-
Combines two motors on an axis to perform a car-like movement.
- Gear() - Constructor for class ch.aplu.robotsim.Gear
-
Creates a gear instance with right motor plugged into port A, left motor plugged into port B.
- getCenter() - Method in class ch.aplu.robotsim.Shadow
-
Returns the center of the rectangular area
- getColor() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns the color detected by the color sensor at the current location.
- getColorID() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns a integer number ID for the current color reading.
- getColorLabel() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns one of the enums of ColorLabel.
- getColorStr() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns the name of the enums of ColorLabel.
- getDistance() - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Returns the distance to the nearest target object.
- getGameGrid() - Static method in class ch.aplu.robotsim.LegoRobot
-
Returns the instance reference of the GameGrid.
- getGear() - Method in class ch.aplu.robotsim.TurtleRobot
-
Returns the gear used for the turtle robot.
- getHitButtonID() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns the button ID of the button previously hit.
- getInitialLoc() - Method in class ch.aplu.robotsim.Torch
-
Returns the initial location of the torch actor.
- getIntensity(Location) - Method in class ch.aplu.robotsim.Torch
-
Returns the light intensity at given location using the 1 / r^2
law.
- getLightValue() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns the brightness (scaled intensity in the HSB color model)
detected by the light sensor at the current location.
- getLocation() - Method in class ch.aplu.robotsim.Gear
-
Returns the current location.
- getMotorCount() - Method in class ch.aplu.robotsim.Motor
-
Returns current value of the rotation counter.
- getPort() - Method in class ch.aplu.robotsim.ColorSensor
-
Returns the port of the sensor.
- getPort() - Method in class ch.aplu.robotsim.LightSensor
-
Returns the port of the sensor.
- getPort() - Method in class ch.aplu.robotsim.Motor
-
Returns the port of the motor.
- getPort() - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Returns the port of the sensor.
- getRobot() - Static method in class ch.aplu.robotsim.LegoRobot
-
Returns the instance reference of the Robot actor.
- getRobot() - Static method in class ch.aplu.robotsim.RobotInstance
-
- getSpeed() - Method in class ch.aplu.robotsim.Gear
-
Returns the current speed (arbitrary units).
- getSpeed() - Method in class ch.aplu.robotsim.Motor
-
Returns the current speed (arbitrary units).
- getTime() - Static method in class ch.aplu.robotsim.Tools
-
Gets the timer's time.
- getTurtleSpeed() - Method in class ch.aplu.robotsim.TurtleRobot
-
Returns the current turtle speed.
- getValue() - Method in class ch.aplu.robotsim.LightSensor
-
For sensor ports 1, 2, 3, 4: returns the brightness of the background
at the current location.
- getValue() - Method in class ch.aplu.robotsim.NxtSoundSensor
-
Polls the sensor.
- getValue() - Method in class ch.aplu.robotsim.SoundSensor
-
Polls the sensor.
- getVersion() - Static method in class ch.aplu.robotsim.LegoRobot
-
Returns the current library version.
- getX() - Method in class ch.aplu.robotsim.Gear
-
Returns the x-coordinate of the current location.
- getY() - Method in class ch.aplu.robotsim.Gear
-
Returns the y-coordinate of the current location.
- ID_DOWN - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the DOWN button.
- ID_ENTER - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the ENTER button.
- ID_ESCAPE - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the ESCAPE button.
- ID_LEFT - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the LEFT button.
- ID_RIGHT - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the RIGHT button.
- ID_UP - Static variable in interface ch.aplu.robotsim.BrickButton
-
Constant for the UP button.
- inColorCube(Color, int[]) - Static method in class ch.aplu.robotsim.ColorSensor
-
Checks if given color lies within given color cube.
- init() - Method in class ch.aplu.robotsim.RobotContext
-
Initializes the static context.
- inShadow(Location) - Method in class ch.aplu.robotsim.Shadow
-
Tests if the given target location is in the shadow area.
- isAutonomous() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns always false.
- isButtonHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if any of the buttons was hit.
- isConnected() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns the current state of the underlying GameGrid window.
- isDown() - Method in class ch.aplu.robotsim.Button
-
Returns true, if the button was pressed.
- isDownHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the DOWN button was the last button hit since
the last call of this method.
- isEnterHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the ENTER button was the last button hit since
the last call of this method.
- isEscapeHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the ESCAPE button was the last button hit since
the last call of this method.
- isLeftHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the LEFT button was the last button hit since
the last call of this method.
- isMoving() - Method in class ch.aplu.robotsim.Gear
-
Checks if one or both motors are rotating
Calls Thread.sleep(1) to prevent CPU overload in close polling loops.
- isMoving() - Method in class ch.aplu.robotsim.Motor
-
Checks if motor is rotating.
- isPressed() - Method in class ch.aplu.robotsim.Button
-
Returns true, if the button was pressed.
- isPressed() - Method in class ch.aplu.robotsim.TouchSensor
-
Polls the touch sensor and returns true, if there is a collision
with any of the collision obstacles.
- isRightHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the RIGHT button was the last button hit since
the last call of this method.
- isUpHit() - Method in class ch.aplu.robotsim.LegoRobot
-
Returns true, if the UP button was the last button hit since
the last call of this method.
- Led - Class in ch.aplu.robotsim
-
Class that represents one of the Led.
- Led() - Constructor for class ch.aplu.robotsim.Led
-
Creates a Led instance.
- left() - Method in class ch.aplu.robotsim.Gear
-
Starts to rotate left (center of rotation at middle of the wheel axes).
- left(int) - Method in class ch.aplu.robotsim.Gear
-
Starts to rotate left (center of rotation at middle of the wheel axes)
for the given duration (in ms) and stops.
- left(double) - Method in class ch.aplu.robotsim.TurtleRobot
-
Turns the left to the right for the given angle.
- left() - Method in class ch.aplu.robotsim.TurtleRobot
-
Starts turning left and returns immediately.
- leftArc(double) - Method in class ch.aplu.robotsim.Gear
-
Starts to move to the left on an arc with given radius.
- leftArc(double, int) - Method in class ch.aplu.robotsim.Gear
-
Starts to move left on an arc with given radius
for the given duration (in ms) and stops.
- LegoRobot - Class in ch.aplu.robotsim
-
Class that represents a simulated NXT or EV3 robot brick.
- LegoRobot() - Constructor for class ch.aplu.robotsim.LegoRobot
-
Creates a robot with its playground using defaults from RobotContext.
- LightAdapter - Class in ch.aplu.robotsim
-
Class with empty callback methods for the light sensor.
- LightAdapter() - Constructor for class ch.aplu.robotsim.LightAdapter
-
- LightListener - Interface in ch.aplu.robotsim
-
Interface with declarations of callback methods for the light sensor.
- LightSensor - Class in ch.aplu.robotsim
-
Class that represents a light sensor.
- LightSensor(SensorPort) - Constructor for class ch.aplu.robotsim.LightSensor
-
Creates a sensor instance pointing downwards connected to the given port.
- LightSensor(SensorPort, boolean) - Constructor for class ch.aplu.robotsim.LightSensor
-
Creates a sensor instance connected to the given port.
- loud(SensorPort, int) - Method in class ch.aplu.robotsim.SoundAdapter
-
Empty method called when the sound becomes louder than the trigger level.
- loud(SensorPort, int) - Method in interface ch.aplu.robotsim.SoundListener
-
Called when the sound becomes louder than the trigger level.
- released(SensorPort) - Method in class ch.aplu.robotsim.TouchAdapter
-
Empty method called when the touch sensor is released.
- released(SensorPort) - Method in interface ch.aplu.robotsim.TouchListener
-
Called when the touch sensor is released.
- removeObstacle(Obstacle) - Method in class ch.aplu.robotsim.LegoRobot
-
Removes the given obstacle from the obstacle list and hides it.
- removeTarget(Target) - Method in class ch.aplu.robotsim.LegoRobot
-
Removes the given target from the target list and hides it.
- reset() - Method in class ch.aplu.robotsim.LegoRobot
-
Resets Robot to start location/direction.
- resetMotorCount() - Method in class ch.aplu.robotsim.Motor
-
Resets the rotation counter to zero.
- right() - Method in class ch.aplu.robotsim.Gear
-
Starts to rotate right (center of rotation at middle of the wheel axes).
- right(int) - Method in class ch.aplu.robotsim.Gear
-
Starts to rotate right (center of rotation at middle of the wheel axes)
for the given duration (in ms) and stops.
- right(double) - Method in class ch.aplu.robotsim.TurtleRobot
-
Turns the turtle to the right for the given angle.
- right() - Method in class ch.aplu.robotsim.TurtleRobot
-
Starts turning right and returns immediately.
- rightArc(double) - Method in class ch.aplu.robotsim.Gear
-
Starts to move to the right on an arc with given radius.
- rightArc(double, int) - Method in class ch.aplu.robotsim.Gear
-
Starts to move right on an arc with given radius
for the given duration (in ms) and stops.
- RobotContext - Class in ch.aplu.robotsim
-
Class to select user defined initial conditions of the
playground and the Nxt or EV3 robot.
- RobotContext() - Constructor for class ch.aplu.robotsim.RobotContext
-
Creates a RobotContext instance.
- RobotInstance - Class in ch.aplu.robotsim
-
Holder of global Robot instance
- RobotInstance() - Constructor for class ch.aplu.robotsim.RobotInstance
-
- rotateTo(int) - Method in class ch.aplu.robotsim.Motor
-
Sets the rotation counter to zero and rotates the motor until the given count is reached.
- rotateTo(int, boolean) - Method in class ch.aplu.robotsim.Motor
-
Sets the rotation counter to zero and rotates the motor until the given count is reached.
- S1 - Static variable in class ch.aplu.robotsim.SensorPort
-
A sensor port for a sensor connected to port S1.
- S2 - Static variable in class ch.aplu.robotsim.SensorPort
-
A sensor port for a sensor connected to port S2.
- S3 - Static variable in class ch.aplu.robotsim.SensorPort
-
A sensor port for a sensor connected to port S3.
- S4 - Static variable in class ch.aplu.robotsim.SensorPort
-
A sensor port for a sensor connected to port S4.
- sampleReceived(int) - Method in class ch.aplu.robotsim.NxtSoundSensor
-
- sampleReceived(int) - Method in class ch.aplu.robotsim.SoundSensor
-
- SensorPort - Class in ch.aplu.robotsim
-
Useful declarations for sensor port connections.
- setBeamAreaColor(Color) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Sets the color of the beam area (two sector border lines and axis).
- setHeight(int) - Method in class ch.aplu.robotsim.Torch
-
Sets the height of the torch (z-coordinate).
- setLED(int) - Method in class ch.aplu.robotsim.Led
-
- setLED(int) - Method in class ch.aplu.robotsim.LegoRobot
-
Turn on/off the brick's left/right LEDs (only affected in pair).
- setLocation(int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Sets the location of the playground (pixel coordinates of the upper left vertex).
- setMeshTriangleColor(Color) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Sets the color of the triangle mesh lines.
- setPixelLocation(int, int) - Method in class ch.aplu.robotsim.Torch
-
Sets the torch to given pixel location.
- setProximityCircleColor(Color) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Sets the color of the circle with center at sensor location and radius
equals to the current distance value.
- setRobot(LegoRobot) - Static method in class ch.aplu.robotsim.RobotInstance
-
- setSpeed(int) - Method in class ch.aplu.robotsim.Gear
-
Sets the speed to the given value (arbitrary units).
- setSpeed(int) - Method in class ch.aplu.robotsim.Motor
-
Sets the speed to the given value (arbitrary units).
- setStartDirection(double) - Static method in class ch.aplu.robotsim.RobotContext
-
Sets the Nxt starting direction (zero to EAST).
- setStartPosition(int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Sets the Nxt starting position (x-y-coordinates 0..500, origin at upper left).
- setStatusText(String) - Static method in class ch.aplu.robotsim.RobotContext
-
Displays the given text in the status bar (if available).
- setTriggerLevel(int) - Method in class ch.aplu.robotsim.LightSensor
-
Sets a new triggerLevel and returns the previous one.
- setTriggerLevel(int) - Method in class ch.aplu.robotsim.NxtSoundSensor
-
Sets a new trigger level and returns the previous one.
- setTriggerLevel(int) - Method in class ch.aplu.robotsim.SoundSensor
-
Sets a new trigger level and returns the previous one.
- setTriggerLevel(int) - Method in class ch.aplu.robotsim.UltrasonicSensor
-
Sets a new trigger level and returns the previous one.
- setTurtleSpeed(int) - Method in class ch.aplu.robotsim.TurtleRobot
-
Sets the turtle speed to the given value.
- Shadow - Class in ch.aplu.robotsim
-
Class to represent a rectangle shadow area where light from torches
is absorbed.
- Shadow(Location, Location) - Constructor for class ch.aplu.robotsim.Shadow
-
Creates a rectangular shadow area.
- showNavigationBar(boolean) - Static method in class ch.aplu.robotsim.RobotContext
-
Shows the navigation bar of the GameGrid.
- showNavigationBar() - Static method in class ch.aplu.robotsim.RobotContext
-
Shows the navigation bar of the GameGrid and runs the simulation immediately.
- showStatusBar(int) - Static method in class ch.aplu.robotsim.RobotContext
-
Shows a status bar with given height.
- SoundAdapter - Class in ch.aplu.robotsim
-
Class with empty callback methods for the sound sensor.
- SoundAdapter() - Constructor for class ch.aplu.robotsim.SoundAdapter
-
- SoundListener - Interface in ch.aplu.robotsim
-
Class with declaration of callback methods for the sound sensor.
- SoundSensor - Class in ch.aplu.robotsim
-
Class that represents a NXT sound sensor.
- SoundSensor(SensorPort) - Constructor for class ch.aplu.robotsim.SoundSensor
-
Creates a sensor instance connected to the given port.
- startTimer() - Static method in class ch.aplu.robotsim.Tools
-
Starts a timer or restart it by setting its time to zero.
- stop() - Method in class ch.aplu.robotsim.Gear
-
Stops the movement.
- stop() - Method in class ch.aplu.robotsim.Motor
-
Stops the rotation.
- UltrasonicAdapter - Class in ch.aplu.robotsim
-
Class with empty callback methods for the ultrasonic sensor.
- UltrasonicAdapter() - Constructor for class ch.aplu.robotsim.UltrasonicAdapter
-
- UltrasonicListener - Interface in ch.aplu.robotsim
-
Class with declarations of callback methods for the ultrasonic sensor.
- UltrasonicSensor - Class in ch.aplu.robotsim
-
Class that represents a ultrasonic sensor.
- UltrasonicSensor(SensorPort) - Constructor for class ch.aplu.robotsim.UltrasonicSensor
-
The port selection determines the position of the sensor and
the direction of the beam axis.
- useBackground(String) - Static method in class ch.aplu.robotsim.RobotContext
-
Use the given image as background (playground size 501 x 501).
- useObstacle(String, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines the given sprite image to be used as touch obstacle.
- useObstacle(BufferedImage, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines the given buffered image to be used as touch obstacle.
- useObstacle(Obstacle, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines the given obstacle to be used as touch obstacle.
- useObstacle(Obstacle) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines the given obstacle to be used as touch obstacle.
- useObstacle(GGBitmap, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines the given GGBitmap to be used as touch obstacle.
- useShadow(int, int, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines a shadow with given size and position.
- useTarget(String, int[][], int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Creates a target for the ultrasonic sensor using the given sprite image.
- useTarget(String, Point[], int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Creates a target for the ultrasonic sensor using the given sprite image.
- useTarget(BufferedImage, Point[], int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Creates a target for the ultrasonic sensor using the given buffered image.
- useTarget(GGBitmap, Point[], int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Creates a target for the ultrasonic sensor using the given GGBitmap.
- useTarget(Target, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines a clone of the given target to be used as target.
- useTorch(double, int, int, int) - Static method in class ch.aplu.robotsim.RobotContext
-
Defines a light source (torch) with given power at given position.