ExMujoco.Types.Event (ExMujoco v0.2.2)

Copy Markdown View Source

mjtEvent — mouse and keyboard event type. From MuJoCo's headers, as numbers. All 9 values carry a number in the header.

Summary

Functions

mjEVENT_FILESDROP is 8 — files drop.

mjEVENT_KEY is 5 — key press.

mjEVENT_MOVE is 1 — mouse move.

mjEVENT_NONE is 0 — no event.

mjEVENT_PRESS is 2 — mouse button press.

mjEVENT_REDRAW is 7 — redraw.

mjEVENT_RELEASE is 3 — mouse button release.

mjEVENT_RESIZE is 6 — resize.

mjEVENT_SCROLL is 4 — scroll.

The name behind an integer. An atom is already one.

The integer behind a name. An integer is already one.

Every value, as {name, integer}, in the order the header lists them.

Types

t()

@type t() :: integer()

Functions

filesdrop()

@spec filesdrop() :: 8

mjEVENT_FILESDROP is 8 — files drop.

key()

@spec key() :: 5

mjEVENT_KEY is 5 — key press.

move()

@spec move() :: 1

mjEVENT_MOVE is 1 — mouse move.

none()

@spec none() :: 0

mjEVENT_NONE is 0 — no event.

press()

@spec press() :: 2

mjEVENT_PRESS is 2 — mouse button press.

redraw()

@spec redraw() :: 7

mjEVENT_REDRAW is 7 — redraw.

release()

@spec release() :: 3

mjEVENT_RELEASE is 3 — mouse button release.

resize()

@spec resize() :: 6

mjEVENT_RESIZE is 6 — resize.

scroll()

@spec scroll() :: 4

mjEVENT_SCROLL is 4 — scroll.

to_atom(value)

@spec to_atom(integer() | atom()) :: atom() | nil

The name behind an integer. An atom is already one.

to_integer(value)

@spec to_integer(t() | atom()) :: integer() | nil

The integer behind a name. An integer is already one.

values()

@spec values() :: [{atom(), integer()}]

Every value, as {name, integer}, in the order the header lists them.