crashcat docs
    Preparing search index...

    Type Alias ConvexHullShape

    a convex hull shape

    type ConvexHullShape = {
        aabb: Box3;
        centerOfMass: Vec3;
        convexRadius: number;
        density: number;
        faces: ConvexHullFace[];
        inertia: Mat4;
        materialId: number;
        numPoints: number;
        planes: ConvexHullPlane[];
        pointFaces: number[];
        pointNeighbors: number[];
        pointNeighborsStart: number[];
        pointNumFaces: number[];
        pointPositions: number[];
        shrunkPointPositions: number[];
        type: CONVEX_HULL;
        vertexIndices: number[];
        volume: number;
    }
    Index

    Properties

    aabb: Box3

    local bounds

    centerOfMass: Vec3

    center of mass

    convexRadius: number

    convex radius

    density: number

    shape density

    faces of the convex hull

    inertia: Mat4

    inertia tensor (column-major mat4)

    materialId: number

    material identifier

    numPoints: number

    number of hull vertices (pointPositions.length / 3)

    planes: ConvexHullPlane[]

    plane equations for each face (1-to-1 with faces)

    pointFaces: number[]

    up to 3 neighbouring face indices per point [f0, f1, f2, ...] (-1 = unused), 3 per point

    pointNeighbors: number[]

    flat neighbour point indices, indexed via pointNeighborsStart; empty ⇔ not baked

    pointNeighborsStart: number[]

    CSR vertex 1-ring adjacency for support hill climbing; empty ⇔ not baked (runtime brute-scan dispatch). prefix offsets into pointNeighbors, length numPoints+1: vertex p's neighbours are pointNeighbors[pointNeighborsStart[p] .. pointNeighborsStart[p+1]).

    pointNumFaces: number[]

    number of neighbouring faces per point (1..3), 1 per point (used by the convex-radius shrink)

    pointPositions: number[]

    flat vertex positions [x, y, z, ...], 3 per point

    shrunkPointPositions: number[]

    convex-radius-shrunk vertex positions [x, y, z, ...] (derived, immutable); the same reference as pointPositions when convexRadius is 0. computed once at create so the exclude-mode support fill can borrow it per pair instead of rebuilding it every frame

    vertexIndices: number[]

    flattened vertex indices for all faces

    volume: number

    volume