Ejemplo n.º 1
0
        internal QuadTreeNode(QuadTreeNode parent, int maxDepth, BoundingBox boundingBox, bool enabled)
        {
            Parent = parent;
            Depth = parent != null ? parent.Depth + 1 : 0;
            _maxDepth = maxDepth;
            _boundingBox = boundingBox;

            IsEnabled = enabled;
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Public constructor.
 /// </summary>
 /// <param name="maxDepth">The maximum depth.</param>
 /// <param name="size">The size.</param>
 /// <param name="name">The name.</param>
 public QuadTree(int maxDepth, Vector2 size, string name)
     : base(name)
 {
     _size = size;
     Root = new QuadTreeNode(null, maxDepth, new BoundingBox(Vector3.Zero, new Vector3(size, 0.0f)), true);
 }
Ejemplo n.º 3
0
 /// <summary>
 /// Public constructor.
 /// </summary>
 /// <param name="maxDepth">The maximum depth.</param>
 /// <param name="size">The size.</param>
 /// <param name="name">The name.</param>
 public QuadTree(int maxDepth, Vector2 size, string name)
     : base(name)
 {
     _size = size;
     Root  = new QuadTreeNode(null, maxDepth, new BoundingBox(Vector3.Zero, new Vector3(size, 0.0f)), true);
 }