Module three::controls [] [src]

High-level input handling.

Controllers

Controllers are used to orient objects in the scene using input devices. Any Object can be the target of a controller, including cameras.

Orbital

  • Uses mouse movement to rotate the object around its target.
  • Uses the mouse scroll wheel to move the object closer to or further from its target.

First-person

  • Uses the W and S keys to move forward or backward.
  • Uses the A and D keys to strafe left or right.
  • Uses mouse movement to rotate the object when the right mouse button is held down.

Modules

axis

Axes for handling input.

first_person

First person controls.

orbit

Mouse orbit controls.

Structs

FirstPerson

Controls for first person camera.

Input

Controls user and system input from keyboard, mouse and system clock.

Orbit

Simple controls for Orbital Camera.

Timer

Timer can be used to find the time difference between the moment of timer creation and the moment of calling elapsed.

Enums

Button

Keyboard or mouse button.

Key

Symbolic name for a keyboard key.

MouseButton

Describes a button of a mouse controller.

Constants

AXIS_DOWN_UP

Axis for up and down arrow keys.

AXIS_LEFT_RIGHT

Axis for left and right arrow keys.

KEY_ESCAPE

Escape keyboard button.

KEY_SPACE

Space keyboard button.

MOUSE_LEFT

Left mouse button.

MOUSE_RIGHT

Right mouse button.

Traits

Delta

Trait for axis::Key and axis::Raw.

Hit

Trait for Buttons.

HitCount

Trait for Buttons and axis::Key.