crashcat docs
    Preparing search index...

    Type Alias Support

    type Support = {
        addRadius: number;
        box: { halfExtents: Vec3 };
        capsule: { halfHeight: number; radius: number };
        convexRadius: number;
        cylinder: { halfHeight: number; radius: number };
        getSupport: SupportFunction;
        hasTransform: boolean;
        hull: {
            lastVertex: number;
            neighbors: number[];
            neighborsStart: number[];
            outputScale: number;
            scratch: number[];
            vertexCount: number;
            vertices: number[];
        };
        point: Vec3;
        sphere: { radius: number };
        transform: Mat4;
        triangle: { vertices: number[] };
    }
    Index

    Properties

    addRadius: number

    extra radius added along the local direction by the evaluator (EPA separation / cast radius)

    box: { halfExtents: Vec3 }

    axis-aligned box: support is the corner picked by the sign of the direction on each axis (±halfExtents)

    capsule: { halfHeight: number; radius: number }

    capsule core: a segment of half-length halfHeight along local Y, rounded by radius (0 in exclude mode)

    convexRadius: number

    reported convex radius — read by the driver, never added by the evaluator (0 in include mode)

    cylinder: { halfHeight: number; radius: number }

    cylinder: radius is the radial extent in the local XZ plane, halfHeight the axial extent along local Y. support = the radial extreme (radius·dir̂ₓ_z) combined with the near/far axial cap.

    getSupport: SupportFunction

    the shape's evaluator, installed by the fill. the hot call site is support.getSupport(out, support, direction)

    hasTransform: boolean

    whether the support has a transform

    hull: {
        lastVertex: number;
        neighbors: number[];
        neighborsStart: number[];
        outputScale: number;
        scratch: number[];
        vertexCount: number;
        vertices: number[];
    }

    convex vertex set (a hull, or a borrowed polygon face) — support is the vertex with the greatest dot product against the direction

    Type Declaration

    • lastVertex: number

      warm-start hint: the last winning vertex index, carried across support calls within one pair; -1 = cold

    • neighbors: number[]

      borrowed CSR flat neighbour indices (shape-owned), indexed via neighborsStart

    • neighborsStart: number[]

      borrowed CSR neighbour prefix offsets (shape-owned, length numPoints+1); empty ⇔ brute scan

    • outputScale: number

      per-vertex output scale — the winning vertex is multiplied by this (uniform-scale fast path); 1 when vertices are already baked

    • scratch: number[]

      owned grow-once buffer that vertices points at for the non-uniform scaled slow path

    • vertexCount: number

      number of vertices in vertices (it may be longer than vertexCount * 3)

    • vertices: number[]

      flat [x,y,z,...] vertices scanned by the evaluator; read-only borrow valid for the current pair

    point: Vec3

    single point (collidePoint operand), owned and copied into by the fill

    sphere: { radius: number }

    sphere core: the origin, rounded by radius. 0 in exclude mode, where the radius is reported instead.

    transform: Mat4

    B-in-A transform, applied when hasTransform is true (identity otherwise)

    triangle: { vertices: number[] }

    triangle (mesh operand): three vertices as a flat [ax,ay,az, bx,by,bz, cx,cy,cz] buffer, owned and copied into by the fill