struct Rosegold::Look
- Rosegold::Look
- Struct
- Value
- Object
Overview
The unit circle of yaw on the XZ-plane has 0° at (0, 1), 90° at (-1, 0), 180° at (0, -1) and 270° at (1, 0).
Yaw is not clamped to between 0° and 360°; any number is valid, including negative numbers and numbers greater than 360°.
Pitch 0 is looking straight ahead, -90° is looking straight up, and 90° is looking straight down.
There are an infinite number of "down"/"up" looks with different yaw; use e.g. NORTH.down
.
Defined in:
rosegold/world/look.crConstant Summary
-
EAST =
self.new(270, 0)
-
NORTH =
self.new(180, 0)
-
SOUTH =
self.new(0, 0)
-
WEST =
self.new(90, 0)
Constructors
Class Method Summary
Instance Method Summary
- #down(angle : Float32 = 90)
- #inspect(io)
- #pitch : Float32
- #pitch_rad
- #to_vec3
- #up(angle : Float32 = 90)
- #with_pitch(pitch : Float32)
- #with_pitch(pitch : Float64)
- #with_yaw(yaw : Float32)
- #with_yaw(yaw : Float64)
- #yaw : Float32
- #yaw_rad