Package limn.math


package limn.math
Single-precision linear algebra for 3D: immutable Vec2, Vec3, Vec4, Mat3, Mat4 (column-major, OpenGL convention) and Quat, the composed Transform3D, and the geometry a renderer asks about, namely Aabb, Frustum culling and Ray picking. MutMat4 is the deliberate exception to immutability, for per-frame arithmetic where the allocation itself is the cost being avoided.
  • Class
    Description
    An axis-aligned bounding box.
    The six clip planes of a view-projection, for frustum culling.
    An immutable column-major 3×3 matrix (m[col*3 + row]).
    An immutable column-major 4×4 matrix (m[col*4 + row], OpenGL convention), single precision.
    A mutable column-major 4×4 matrix (m[col*4 + row], same conventions as Mat4) for allocation-free transform composition in hot loops.
    An immutable unit quaternion (x, y, z, w) for rotations: no gimbal lock, cheap to compose and interpolate (Quat.slerp(limn.math.Quat, float)).
    A ray origin + t·direction, t ≥ 0.
    A translation/rotation/scale transform, the human-friendly way to place a node in 3D.
    An immutable 2-component vector (single precision): texture coords, screen points.
    An immutable 3-component vector (single precision), right-handed.
    An immutable 4-component vector: homogeneous positions (w=1), directions (w=0), and RGBA colors.