@pmndrs/bvh
    Preparing search index...

    Interface BvhShapecastFnOptions

    Options of BvhTraceNodes.getShapecastFn: three-mesh-bvh's getShapecastFn hooks as three function nodes, compiled into one shapecast walk (shapecastWalkWgsl, the walk traceModuleWgsl({ shapecast }) stamps for WGSL hooks). Each hook takes shape first when a shape type is given, then its own arguments.

    interface BvhShapecastFnOptions {
        intersectsBounds: any;
        intersectsTriangle: any;
        keep?: any;
        name?: string;
        shape?: string | StructTypeNode;
    }
    Index
    intersectsBounds: any

    (shape?, boxMin: vec3, boxMax: vec3) -> float: a world box's score; negative skips it, the lower of two siblings is entered first.

    intersectsTriangle: any

    (shape?, a: vec3, b: vec3, c: vec3, instance: uint, triangle: uint, material: uint, normal: vec3) -> bool, or any leading part of those arguments (only what it declares is computed): a triangle in world space, its instance (BvhHit.instance), original triangle, material and the world normal of its authored front side. True stops the cast.

    keep?: any

    (shape?, score: float) -> bool: asked when a pushed box comes off the stack with the score it was pushed with; false skips it. Default: keep every box.

    name?: string

    The WGSL name of the function (its walk, private state and adapters are <name>_bvh*; a hook may not use those names). Default bvhThreeShapecast<n>, numbered in creation order.

    shape?: string | StructTypeNode

    The TSL type of the value the cast is called with and every hook gets first ('vec4', 'mat4', a StructTypeNode, ...): the query's shape. Default none: the hooks get no shape and the call takes none.