tiny.geometry.Obb
Defined in tiny.geometry.
A box rotated by axes, whose columns are orthonormal, around center.
API (5)
Actions
Public operations.
fromLocaltoLocal:pin the box frame, where the box is the axis-aligned[-half_extents, half_extents].
Fields and members
Public fields and members.
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
| Definitions | 3 |
|---|---|
| Public names | 3 |
| Members | 3 |
| Version | 26.7.0 |
| Revision | daab053ee433 |