public Octree(Octree parent) { this.wireBoundingBox = null; this.HalfSize = new Vector3(); this.parent = parent; this.NumNodes = 0; }
/// <summary> /// Adds this nodes bounding box (wireframe) to the RenderQueue. /// </summary> /// <param name="queue"></param> public void AddBoundingBoxToQueue(RenderQueue queue) { if (wireBox == null) { wireBox = new WireBoundingBox(); } // add the wire bounding box to the render queue wireBox.InitAABB(worldAABB); queue.AddRenderable(wireBox); }
/// <summary> /// Adds this nodes bounding box (wireframe) to the RenderQueue. /// </summary> /// <param name="queue"></param> public void AddBoundingBoxToQueue(RenderQueue queue) { if (this.wireBox == null) { this.wireBox = new WireBoundingBox(); } // add the wire bounding box to the render queue this.wireBox.BoundingBox = this.worldAABB; queue.AddRenderable(this.wireBox); }
protected override void dispose(bool disposeManagedResources) { if (disposeManagedResources) { foreach (MovableObject item in this.objectList) { item.NotifyAttached(null); } this.objectList.Clear(); if (this.wireBox != null) { if (!this.wireBox.IsDisposed) { this.wireBox.Dispose(); } this.wireBox = null; } } base.dispose(disposeManagedResources); }
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; } } } }
/// <summary> /// Adds this nodes bounding box (wireframe) to the RenderQueue. /// </summary> /// <param name="queue"></param> public void AddBoundingBoxToQueue( RenderQueue queue ) { if ( wireBox == null ) wireBox = new WireBoundingBox(); // add the wire bounding box to the render queue wireBox.BoundingBox = worldAABB; queue.AddRenderable( wireBox ); }
protected override void dispose( bool disposeManagedResources ) { if ( disposeManagedResources ) { foreach ( MovableObject item in objectList ) { item.NotifyAttached( null ); } objectList.Clear(); if ( wireBox != null ) { if (!wireBox.IsDisposed) wireBox.Dispose(); wireBox = null; } } base.dispose( disposeManagedResources ); }