Module three::controls

source ·
Expand description

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

Axes for handling input.
First person controls.
Mouse orbit controls.

Structs

Controls for first person camera.
Controls user and system input from keyboard, mouse and system clock.
Simple controls for Orbital Camera.
Timer can be used to find the time difference between the moment of timer creation and the moment of calling elapsed.

Enums

Keyboard or mouse button.
Symbolic name for a keyboard key.
Describes a button of a mouse controller.

Constants

Axis for up and down arrow keys.
Axis for left and right arrow keys.
Escape keyboard button.
Space keyboard button.
Left mouse button.
Right mouse button.

Traits

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