Skip to documentation
SLOP

tiny.rig.Skeleton

Reference tiny.rig Skeleton

Defined in tiny.rig.

API (7)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: fun/rig/src/skeleton.zig:29

zig
pub const Skeleton = struct {    /// Each joint's parent, or `none` for a root.    parents: []const Joint,    /// Each joint's rest transform relative to its parent.    rest: []const Transform,    pub fn init(parents: []const Joint, rest: []const Transform) Error!Skeleton {        if (parents.len != rest.len) return error.InvalidLength;        if (parents.len > max_joints) return error.InvalidLength;        for (parents, 0..) |parent, index| {            if (parent != none and parent >= index) return error.InvalidParent;        }        return .{ .parents = parents, .rest = rest };    }    pub fn count(skeleton: Skeleton) usize {        return skeleton.parents.len;    }    /// World transforms from local ones. `world` may not alias `local`.    pub fn forward(skeleton: Skeleton, local: []const Transform, world: []Transform) void {        forwardParents(skeleton.parents, local, world);    }    /// World transforms of the rest pose.    pub fn restWorld(skeleton: Skeleton, world: []Transform) void {        forwardParents(skeleton.parents, skeleton.rest, world);    }    /// Whether `ancestor` is `joint` or lies on its path to the root.    pub fn isAncestorOrSelf(skeleton: Skeleton, ancestor: Joint, joint: Joint) bool {        return ancestorOrSelf(skeleton.parents, ancestor, joint);    }};

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

zig
pub const Skeleton = skeleton.Skeleton;
Called byCallsNo direct callstest; no linkfun.rig.src.skeletontest: skeleton rejects parents that f...Skeletoncount
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callersprivate; no linkfun.rig.src.skeletonforwardParentsSkeletonforward
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallsNo direct callstest; no linkfun.rig.src.skeletontest: forward kinematics composes a c...test; no linkfun.rig.src.skeletontest: skeleton rejects parents that f...Skeletoninit
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest; no linkfun.rig.src.skeletontest: forward kinematics composes a c...private; no linkfun.rig.src.skeletonancestorOrSelfSkeletonisAncestorOrSelf
Static calls · unresolved targets: 0 · external targets: 0.
Called byCallstest; no linkfun.rig.src.skeletontest: forward kinematics composes a c...private; no linkfun.rig.src.skeletonforwardParentsSkeletonrestWorld
Static calls · unresolved targets: 0 · external targets: 0.

Audit

Definitions6
Public names6
Members2
Version26.7.0
Revisiondaab053ee433