Ejemplo n.º 1
0
        public void TestCompactQuadTree()
        {
            var tree = new CompactQuadTree <bool>(6);

            if (tree.GetRoot().UpperLeft.UpperLeft.UpperLeft.Index != 1 + 4 + 16)
            {
                throw new Exception("Test failed");                                                                   // This is a lame test but anyways
            }
        }
Ejemplo n.º 2
0
        private void UpdateVisibility(BoundingFrustum frustum)
        {
            var boundingBox = TreeBoundingBox;

            // This is to allow non-virtual calls to the culling methods
            var info = new CullingInfo();

            info.Frustum            = frustum;
            info.FrustumBoundingBox = BoundingBox.FromPoints(frustum.GetCorners());
            info.Tree = tree;
            info.CullablesReferenceCounts = cullablesReferenceCounts;
            info.Culler = culler;


            updateVisibility(tree.GetRoot(), ref info, ref boundingBox, false);
        }