Skip to documentation
SLOP

tiny.rig.articulated

Reference tiny.rig articulated

Defined in tiny.rig.

An articulated rig: handles joined by revolute and prismatic coordinates, with a point Jacobian and collision proxies on top.

API (25)

Actions

Public operations.

Types and contracts

Public types and contracts.

Values and defaults

Public values and defaults.

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

Source

Source: fun/rig/src/articulated/handle.zig:15

zig
pub const CoordinateKind = enum(u8) {    revolute = 0,    prismatic = 1,};

Source: fun/rig/src/articulated/handle.zig:32

zig
pub const Handle = struct {    name_buf: [64]u8 = @as([64]u8, @splat(0)),    name_len: u8 = 0,    parent: ?u32 = null,    rest_translation: Vec3 = .{},    rest_rotation: Quat = .{},    coordinate_offset: u32 = 0,    coordinate_count: u8 = 0,    coordinate_kinds: [max_handle_coordinates]CoordinateKind = @as([max_handle_coordinates]CoordinateKind, @splat(.revolute)),    coordinate_axes: [max_handle_coordinates]Vec3 = @as([max_handle_coordinates]Vec3, @splat(Vec3.zero)),    coordinate_mins: [max_handle_coordinates]f32 = @as([max_handle_coordinates]f32, @splat(0.0)),    coordinate_maxs: [max_handle_coordinates]f32 = @as([max_handle_coordinates]f32, @splat(0.0)),};

Source: fun/rig/src/articulated/handle.zig:20

zig
pub const HandleSpec = struct {    name: []const u8 = "",    parent: ?u32 = null,    rest_translation: Vec3 = .{},    rest_rotation: Quat = .{},    coordinate_kinds: []const CoordinateKind = &.{},    coordinate_axes: []const Vec3 = &.{},    coordinate_mins: []const f32 = &.{},    coordinate_maxs: []const f32 = &.{},    initial_coordinates: []const f32 = &.{},};

Source: fun/rig/src/articulated/proxy.zig:12

zig
pub const MotionType = enum(u8) {    dynamic = 0,    kinematic = 1,    static_ = 2,};

Source: fun/rig/src/articulated/proxy.zig:25

zig
pub const ProxyBinding = struct {    handle_index: u32,    local_translation: Vec3 = .{},    local_rotation: Quat = .{},    shape: ProxyShape = .point,    mass: f32 = 1.0,    friction: f32 = 0.0,    restitution: f32 = 0.0,    motion_type: MotionType = .kinematic,};

Source: fun/rig/src/articulated/proxy.zig:18

zig
pub const ProxyShape = union(enum(u8)) {    point: void,    sphere: struct { radius: f32 },    box: struct { half_extents: [3]f32 },    capsule: struct { half_height: f32, radius: f32 },};

Source: fun/rig/src/articulated/handle.zig:13

zig
pub const max_handle_coordinates: usize = 3;
Called byCallsNo direct callstest; no linkfun.rig.src.articulated.handletest: a failed handle leaves the rig ...test; no linkfun.rig.src.articulated.handletest: handle coordinate limits clamp ...test; no linkfun.rig.src.articulated.testtest: rig proxy transform follows the...test; no linkfun.rig.src.articulated.testtest: rig world point jacobian matche...test; no linkfun.sdfii.src.physics.articulationtest: articulated servo tracking conv...+4 morearticulated.ArticulatedRigdeinit
Static calls · unresolved targets: 0 · external targets: 9.
Called byCallsNo direct callstest; no linkfun.rig.src.articulated.handletest: a failed handle leaves the rig ...test; no linkfun.rig.src.articulated.handletest: handle coordinate limits clamp ...test; no linkfun.rig.src.articulated.testtest: rig proxy transform follows the...test; no linkfun.rig.src.articulated.testtest: rig world point jacobian matche...test; no linkfun.sdfii.src.physics.articulationtest: articulated servo tracking conv...+4 morearticulated.ArticulatedRiginit
Static calls · unresolved targets: 0 · external targets: 0.

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

zig
//! An articulated rig: handles joined by revolute and prismatic//! coordinates, with a point Jacobian and collision proxies on top.//!//! Each handle's coordinates turn its rest transform into a local//! transform, rest first and then each coordinate's motion in order. The//! skeleton's forward kinematics composes the local transforms down the//! hierarchy; there is no second composition of the chain. Storage grows//! only when a handle or proxy is added, so posing and querying never//! allocate.const std = @import("std");const linear = @import("linear");const skeleton = @import("../skeleton.zig");const transform = @import("../transform.zig");const handle = @import("handle.zig");const jacobian = @import("jacobian.zig");const pose = @import("pose.zig");const proxy = @import("proxy.zig");const Allocator = std.mem.Allocator;const Joint = skeleton.Joint;const Transform = transform.Transform;const Vec3 = linear.Vec3;pub const CoordinateKind = handle.CoordinateKind;pub const HandleSpec = handle.HandleSpec;pub const Handle = handle.Handle;pub const max_handle_coordinates = handle.max_handle_coordinates;pub const MotionType = proxy.MotionType;pub const ProxyBinding = proxy.ProxyBinding;pub const ProxyShape = proxy.ProxyShape;pub const ArticulatedRig = struct {    handles: std.ArrayListUnmanaged(Handle) = .empty,    /// Each handle's parent, in the skeleton's form.    parents: std.ArrayListUnmanaged(Joint) = .empty,    coordinates: std.ArrayListUnmanaged(f32) = .empty,    coordinate_to_handle: std.ArrayListUnmanaged(u32) = .empty,    local_transforms: std.ArrayListUnmanaged(Transform) = .empty,    world_transforms: std.ArrayListUnmanaged(Transform) = .empty,    /// Each coordinate's axis and origin in world space, in the frame its    /// motion applies in.    coordinate_world_axes: std.ArrayListUnmanaged(Vec3) = .empty,    coordinate_world_origins: std.ArrayListUnmanaged(Vec3) = .empty,    proxies: std.ArrayListUnmanaged(ProxyBinding) = .empty,    pose_dirty: bool = true,    pub fn init() ArticulatedRig {        return .{};    }    pub fn deinit(rig: *ArticulatedRig, allocator: Allocator) void {        rig.handles.deinit(allocator);        rig.parents.deinit(allocator);        rig.coordinates.deinit(allocator);        rig.coordinate_to_handle.deinit(allocator);        rig.local_transforms.deinit(allocator);        rig.world_transforms.deinit(allocator);        rig.coordinate_world_axes.deinit(allocator);        rig.coordinate_world_origins.deinit(allocator);        rig.proxies.deinit(allocator);        rig.* = .{};    }    pub const addHandle = handle.add;    pub const coordinateCount = handle.coordinateCount;    pub const setCoordinate = handle.setCoordinate;    pub const getCoordinate = handle.getCoordinate;    pub const clampCoordinateValue = handle.clampCoordinateValue;    pub const handleByIndex = handle.byIndex;    pub const coordinateValue = handle.coordinateValue;    pub const refresh = pose.refresh;    pub const worldTransform = pose.worldTransform;    pub const worldPoint = pose.worldPoint;    pub const pointJacobian = jacobian.point;    pub const addProxy = proxy.add;    pub const proxyCount = proxy.count;    pub const proxyBinding = proxy.binding;    pub const proxyWorldTransform = proxy.worldTransform;};

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

zig
pub const articulated = @import("articulated/root.zig");

Complete caller list for articulated.ArticulatedRig.deinit

9 direct callers.

Complete caller list for articulated.ArticulatedRig.init

9 direct callers.

Audit

Definitions26
Public names26
Members47
Version26.7.0
Revisiondaab053ee433