jakke-graphics-ts
    Preparing search index...

    Class BVHTree

    BVHTree for fast traverse of triangles.

    Index

    Constructors

    Properties

    triangleHashes: Set<string> = ...

    Triangle hashes included in BVHTree.

    triangles: BVHTriangle[] = []

    Triangles included.

    Accessors

    Methods

    • Get the intersection point between the given line and tree. This uses Möller Trumbore's soluion for determine the collision. Currently, it returns only the first collision point.

      Parameters

      • p1: Vertex3d

        The start point of line.

      • p2: Vertex3d

        The end point of line.

      • onlyOnLine: boolean

        Parameter for testing the getting collision point. When this set true, it returns the collision point including outbound of the line.

      Returns undefined | Vertex3d

      Intersection point when only the intersection exists.