Пример #1
0
        public void AddNode(NodeBase node)
        {
            Quadrant quad = GetQuadrant(node.Position);

            node.CurrentQuadrant = quad;
            quad.AddNode(node);
        }
Пример #2
0
        public void UpdateNodeQuadrant(NodeBase node)
        {
            Quadrant quad = GetQuadrant(node.Position);

            if (quad != node.CurrentQuadrant)
            {
                node.CurrentQuadrant.RemoveNode(node);
                node.CurrentQuadrant = quad;
                quad.AddNode(node);
            }
        }