Rosegold::Look
Inherits Struct / Value / Object
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.
Constants
EAST = self.new(270, 0)
NORTH = self.new(180, 0)
SOUTH = self.new(0, 0)
WEST = self.new(90, 0)
Constructors
new(yaw : Float32, pitch : Float32)
SourceClass methods
from_rad(yaw_rad : Float32, pitch_rad : Float32)
Sourcefrom_vec(vec : Vec3d | Vec3f)
SourceInstance methods
down(angle : Float32 = 90)
Sourceinspect(io)
Sourcepitch
Sourcepitch_rad
Sourceto_vec3
Sourceup(angle : Float32 = 90)
Sourcewith_pitch(pitch : Float32)
Sourcewith_pitch(pitch : Float64)
Sourcewith_yaw(yaw : Float32)
Sourcewith_yaw(yaw : Float64)
Sourceyaw
Sourceyaw_rad
Source