BVH class

Class representing a bounding volume hierarchy. The current implementation represents single BVH nodes as AABBs. It accepts arbitrary branching factors and can subdivide the given geometry until a defined hierarchy depth has been reached. Besides, the hierarchy finalruction is performed top-down and the algorithm only performs splits along the cardinal axes.

Reference: Bounding Volume Hierarchies in Real-Time Collision Detection by Christer Ericson (chapter 6).

@author {@link https://github.com/robp94|robp94} @author {@link https://github.com/Mugen87|Mugen87}

Constructors

BVH([double branchingFactor = 2, double primitivesPerNode = 1, double depth = 10])

Properties

branchingFactor double
getter/setter pair
depth double
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
primitivesPerNode double
getter/setter pair
root BVHNode?
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

fromMeshGeometry(MeshGeometry geometry) BVH
Computes a BVH for the given mesh geometry.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
traverse(Function callback) BVH
Executes the given callback for each node of the BVH.

Operators

operator ==(Object other) bool
The equality operator.
inherited