/// <summary> /// Create internal octree node (eg not the root octree node). /// </summary> internal OctreeCullingNode(OctreeCullingNode parent, Vector3 index, BoundingBox boundingBox, uint divisionsLeft) { // store octree data and init _parentOctree = parent; _indexInParent = index; _octreeData = parent._octreeData; _divisionsLeft = divisionsLeft; InitOctreeBox(boundingBox); }
public SphericalOctree(int lvl, long side) { Data = new OctreeData() { WorldSide = side }; Level = lvl; }
/// <summary> /// Create the octree at top level, eg covering the whole screen. /// </summary> /// <param name="boundingBox">The starting bounding box of the entire octree. Node: nodes that are outside this box will not be culled properly.</param> /// <param name="maxDivisions">How many times we can divide this octree until reaching minumum size.</param> public OctreeCullingNode(BoundingBox boundingBox, uint maxDivisions = 6) { // create octree data _octreeData = new OctreeData(); _octreeData.Root = this; _octreeData.MaxDivisions = maxDivisions; _divisionsLeft = maxDivisions; // init octree InitOctreeBox(boundingBox); }
private SphericalOctree(int lvl, OctreeData data) { Level = lvl; Data = data; }
private Octree(int lvl, OctreeData data) { Level = lvl; Data = data; }