struct

MJ::Arcana::Direction

Inherits JSON::Serializable < Struct < Value < Object

Where the camera stands, and where the light comes from.

DataDungeon 0.11.1 stores both as unit vectors and asked shoot to accept them and echo back what was asked. The conversions and the sign conventions here are theirs (DESIGN-image-fields.md), reproduced rather than reinvented so the two sides cannot drift:

x = cos(pitch°) · sin(yaw°) yaw°, pitch° = value × 90° y = sin(pitch°) z = ±cos(pitch°) · cos(yaw°) + front, − back

These fields mean "as asked", never "as measured". That is not a hedge, it is the nature of the medium: these models take a prompt, not a camera matrix, so the service renders a vector into words and the model complies well but not exactly. A caller treating the echoed value as ground truth for compositing will eventually be out by ten or twenty degrees. DataDungeon has adopted the same reading, and lets a person correct the field in curio.

The trap DataDungeon flagged, kept here because it is easy to get backwards: yaw counts toward the thing's own right on BOTH faces, so a profile whose nose points LEFT in the picture is showing the thing's RIGHT side, and that is yaw +1.

Constructors

from_angles(side : String, yaw : Float64, pitch : Float64) : Direction

From the readable form an application holds: side front/back, yaw and pitch in quarter turns.

Source
from_json_any(node : JSON::Any) : Direction
Source
new(x : Float64, y : Float64, z : Float64)
Source
new(*, __pull_for_json_serializable pull : JSON::PullParser)
Source
normalise(x : Float64, y : Float64, z : Float64) : Direction
Source

Instance methods

pitch
Source
side
Source
to_json_object
Source