Small World Engine API Reference - v0.46.1
    Preparing search index...

    Interface BoundingVolume

    Interface for bounding volumes used for collision detection and culling.

    interface BoundingVolume {
        center: Vector3D;
        type: BoundingType;
        containsVolume(other: BoundingVolume): boolean;
        getBroadRadius(): number;
        intersectsFrustum(frustum: FrustumInterface): boolean;
        intersectsVolume(other: BoundingVolume): boolean;
        transform(matrix: Matrix4): void;
    }

    Implemented by

    Index

    Properties

    center: Vector3D

    The center position of the volume in world space.

    The type of the bounding volume.

    Methods

    • Returns the radius of a sphere that fully encloses the volume. Used for coarse broad-phase intersection tests.

      Returns number

      The broad radius.

    • Transforms the bounding volume by a matrix. Typically used to move local geometry bounds into world space.

      Parameters

      • matrix: Matrix4

        The transformation matrix.

      Returns void