-
Notifications
You must be signed in to change notification settings - Fork 103
Octree
cjcliffe edited this page Oct 15, 2011
·
3 revisions
Creates an Octree.
Parameters:
-
size
: Edge length of initial bounding box. -
max_depth
: Maximum depth of the octree. -
root
: An OctreeNode to be the root node (optional). -
position
: (default:[0,0,0]
) - child_index
Empties an octree of all child nodes and references.
Returns:
none
Removes node from an octree.
Parameters:
-
node
: Node to remove.
Returns:
none
Test if point lies within bounding box.
Parameters:
-
point
:[x,y,z]
Returns:
true
or false
Purpose:
Get useful debugging info about an octree.
Returns:
String info.
From tests/octree/octree.html:
var octree, scene;
// ...
octree = new CubicVR.Octree(400, 6);
scene = new CubicVR.Scene(canvas.width, canvas.height, 40, 0.1, 200, octree);