コード例 #1
0
ファイル: QuadTree.cs プロジェクト: BlenderCN-Org/Skirmish
        /// <summary>
        /// Gets the nodes contained into the specified bounding sphere
        /// </summary>
        /// <param name="sphere">Bounding sphere</param>
        /// <returns>Returns the nodes contained into the bounding sphere</returns>
        public IEnumerable <QuadTreeNode <T> > GetNodesInVolume(ref BoundingSphere sphere)
        {
            Stopwatch w = Stopwatch.StartNew();

            try
            {
                return(this.Root.GetNodesInVolume(ref sphere));
            }
            finally
            {
                w.Stop();

                Counters.AddVolumeSphereTest((float)w.Elapsed.TotalSeconds);
            }
        }