traverse method

BVHNode traverse(
  1. Function callback
)

Executes the given callback for this BVH node and its ancestors.

Implementation

BVHNode traverse(Function callback ) {
	callback( this );

	for ( int i = 0, l = children.length; i < l; i ++ ) {
		children[ i ].traverse( callback );
	}

	return this;
}