public Octree(Octree parent) { this.wireBoundingBox = null; HalfSize = new Vector3(); this.parent = parent; NumNodes = 0; }
public Octree(PCZone zone, Octree parent) { this.wireBoundingBox = null; HalfSize = new Vector3(); this.parent = parent; NunodeList = 0; this.zone = zone; //initialize all children to null. for (int i = 0; i < 2; i++) { for (int j = 0; j < 2; j++) { for (int k = 0; k < 2; k++) { this.Children[i, j, k] = null; } } } }
public override void FindVisibleObjects(Camera cam, VisibleObjectsBoundsInfo visibleBounds, bool onlyShadowCasters) { GetRenderQueue().Clear(); boxList.Clear(); visible.Clear(); if(cullCamera) { Camera c = cameraList["CullCamera"]; if(c != null) { cameraInProgress = cameraList["CullCamera"]; } } numObjects = 0; //walk the octree, adding all visible Octreenodes nodes to the render queue. WalkOctree((OctreeCamera)cam, GetRenderQueue(), octree, visibleBounds, onlyShadowCasters, false); // Show the octree boxes & cull camera if required if(this.ShowBoundingBoxes || cullCamera) { if(this.ShowBoundingBoxes) { for(int i = 0; i < boxList.Count; i++) { WireBoundingBox box = (WireBoundingBox)boxList[i]; GetRenderQueue().AddRenderable(box); } } if(cullCamera) { OctreeCamera c = (OctreeCamera)GetCamera("CullCamera"); if(c != null) { GetRenderQueue().AddRenderable(c); } } } }
internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WireBoundingBox obj) { return((obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr); }