コード例 #1
0
 protected override bool DoesDataFallWithinNodeAABB(Vector3 data, OctreeNode node)
 {
     return(node.AABB.ContainsPoint(data));
 }
コード例 #2
0
        protected override List <int> GatherIndicesOfDataWhichFallsWithinNodeAABB(List <int> dataIndices, OctreeNode node)
        {
            if (dataIndices.Count == 0)
            {
                return(new List <int>());
            }

            var indicesOfPointsInsideAABB = new List <int>(dataIndices.Count);

            foreach (int index in dataIndices)
            {
                Vector3 point = _data[index];
                if (DoesDataFallWithinNodeAABB(point, node))
                {
                    indicesOfPointsInsideAABB.Add(index);
                }
            }

            return(indicesOfPointsInsideAABB);
        }
コード例 #3
0
ファイル: Octree.cs プロジェクト: runewather/AstilaQuest
 protected abstract bool DoesDataFallWithinNodeAABB(T data, OctreeNode node);
コード例 #4
0
ファイル: Octree.cs プロジェクト: runewather/AstilaQuest
        private void CollectDataIndicesInLeavesAABBrecurse(Box aabb, List <int> dataIndices, OctreeNode root)
        {
            if (!root.AABB.IntersectsBox(aabb))
            {
                return;
            }

            if (root.IsLeaf)
            {
                dataIndices.AddRange(root.DataIndices);
            }
            else
            {
                List <OctreeNode> children = root.Children;
                foreach (var child in children)
                {
                    CollectDataIndicesInLeavesAABBrecurse(aabb, dataIndices, child);
                }
            }
        }
コード例 #5
0
ファイル: Octree.cs プロジェクト: runewather/AstilaQuest
 protected abstract List <int> GatherIndicesOfDataWhichFallsWithinNodeAABB(List <int> dataIndices, OctreeNode node);