octree

    A WASM-first static AABB octree with bounded construction, read-only queries and reusable query buffers.

    Download zip
    Author
    Version
    0.1.0
    License
    Apache-2.0
    Last updated
    1 hour ago
    Downloads
    2

    No dependencies

    OrisGo/octree does not have a README file

    Aabb

    using @OrisGo/octree/geom { type Aabb }

    Validated, closed AABB. Touching counts as intersection; zero extent is legal.

    BatchError

    BatchQuery

    A query or its geometry validation error, with an explicit output interval.

    BuildError

    Completeness

    Cube

    using @OrisGo/octree/geom { type Cube }

    A fixed root specified by center and positive half extent.

    Entry

    One immutable object snapshot. IDs are unique within an index.

    GeometryError

    IndexStats

    NodeInfo

    A read-only value snapshot, not a mutable node reference.

    QueryError

    QueryStats

    Ray

    using @OrisGo/octree/geom { type Ray }

    Ray positions are origin + t * direction, for the finite closed parameter interval. Direction need not be normalized; only a unit direction makes t a distance.

    StaticObjectIndex

    Read-only tree. Private arrays are never returned to callers.

    Vec3

    using @OrisGo/octree/geom { type Vec3 }

    Immutable three-dimensional coordinates. Geometry constructors validate finiteness.

    Workspace

    Caller-owned reusable traversal memory. Do not share during an active query.

    scan_aabb

    Linear oracle: allocates results, performs no tree pruning or ID validation. Duplicate input IDs remain duplicated. Intended for verification and tiny inputs.

    scan_ray_candidates

    fn scan_ray_candidates(input : ArrayView[
    Entry
    ], query :
    Ray
    ) -> Array[UInt]

    Source Files

    Powered by MoonBit

    Site sourceReport issueModulesSkillsBuild queueStatistics

    © 2026 mooncakes.io