Skip to documentation
SLOP

tiny.geometry.Obb

Reference tiny.geometry Obb

Defined in tiny.geometry.

A box rotated by axes, whose columns are orthonormal, around center.

API (5)

Actions

Public operations.

Fields and members

Public fields and members.

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

Source

Source: lib/geometry/src/primitive.zig:128

zig
/// A box rotated by `axes`, whose columns are orthonormal, around `center`.pub const Obb = struct {    center: Vec3,    axes: Mat3 = .{},    half_extents: Vec3,    /// `p` in the box frame, where the box is the axis-aligned    /// `[-half_extents, half_extents]`.    pub fn toLocal(box: Obb, p: Vec3) Vec3 {        const d = p.sub(box.center);        return .{ .x = d.dot(box.axes.cols[0]), .y = d.dot(box.axes.cols[1]), .z = d.dot(box.axes.cols[2]) };    }    pub fn fromLocal(box: Obb, p: Vec3) Vec3 {        return box.center.add(box.axes.mulVec(p));    }};

Source: lib/geometry/src/root.zig:18

zig
pub const Obb = primitive.Obb;

Audit

Definitions3
Public names3
Members3
Version26.7.0
Revisiondaab053ee433