CauldronGPU.Placement (CauldronGPU v0.3.3)

Copy Markdown View Source

Transforms standing a model made in map axes (x forward, y left, z up) at a point of a map, in the renderer's frame, matching CauldronGPU.Bsp.transform/1 and CauldronGPU.Bsp.point/2: map units times scale metres, +Z up turned to +Y up.

CauldronGPU.Placement.transform(1 / 32, {480.0, -352.0, 88.0}, 90)

Summary

Functions

The transform for a model at map point origin turned by angles: a yaw in degrees (0 along +X, counter-clockwise from above), or {pitch, yaw, roll} in degrees, applied roll about x, then pitch about y, then yaw about z.

Types

vec3()

@type vec3() :: {number(), number(), number()}

Functions

transform(scale, origin, yaw)

@spec transform(number(), vec3(), number() | vec3()) :: CauldronGPU.Transform.t()

The transform for a model at map point origin turned by angles: a yaw in degrees (0 along +X, counter-clockwise from above), or {pitch, yaw, roll} in degrees, applied roll about x, then pitch about y, then yaw about z.