Skip to documentation
SLOP

tiny.rig.Transform

Reference tiny.rig Transform

Defined in tiny.rig.

A rigid transform.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

No direct callersNo direct callstiny.rigTransform
Static calls · unresolved targets: unknown · external targets: unknown.

Source

Source: fun/rig/src/transform.zig:19

zig
/// A rigid transform. Rig normalizes every rotation before it composes or/// applies one, so rotations read from specs and ABIs need not be unit length.pub const Transform = struct {    translation: Vec3 = .{},    rotation: Quat = .{},    pub fn identity() Transform {        return .{};    }    pub fn compose(parent: Transform, child: Transform) Transform {        return .{            .translation = parent.translation.add(rotate(parent.rotation, child.translation)),            .rotation = unit(unit(parent.rotation).mul(unit(child.rotation))),        };    }    pub fn applyPoint(self: Transform, point: Vec3) Vec3 {        return self.translation.add(rotate(self.rotation, point));    }    pub fn inversePoint(self: Transform, point: Vec3) Vec3 {        return rotate(unit(self.rotation).conjugate(), point.sub(self.translation));    }    /// The transform that undoes this one: `compose(t.inverse(), t)` is the    /// identity up to rounding.    pub fn inverse(self: Transform) Transform {        const rotation = unit(self.rotation).conjugate();        return .{            .translation = rotation.rotate(self.translation).scale(-1),            .rotation = rotation,        };    }};

Source: fun/rig/src/root.zig:27

zig
pub const Transform = transform.Transform;
Called byCallsNo direct callersprivate; no linkfun.rig.src.transformrotateTransformapplyPoint
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsprivate; no linkfun.rig.src.articulated.poserefreshprivate; no linkfun.rig.src.articulated.proxyworldTransformprivate; no linkfun.rig.src.skeletonforwardParentsskinbindPalettetest; no linkfun.rig.src.transformtest: transform inverse composes to t...private; no linkfun.rig.src.transformrotateprivate; no linkfun.rig.src.transformunitTransformcompose
Static calls · unresolved targets: 1 · external targets: 0.
Called byCallsNo direct callsprivate; no linkfun.rig.src.articulated.handleaddTransformidentity
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate; no linkfun.rig.src.transformunitTransforminverse
Static calls · unresolved targets: 0 · external targets: 1.
Called byCallsNo direct callersprivate; no linkfun.rig.src.transformrotateprivate; no linkfun.rig.src.transformunitTransforminversePoint
Static calls · unresolved targets: 0 · external targets: 1.

Audit

Definitions6
Public names6
Members2
Version26.7.0
Revisiondaab053ee433