public unsafe void Split(BoundingBox2D* childBoxes, ref IMy2DClipmapNodeHandler[] children) { m_split = true; for (int i = 0; i < 4; ++i) children[i].Init(m_manager, (Coords.X << 1) + (i & 1), (Coords.Y << 1) + ((i >> 1) & 1), Lod - 1, ref childBoxes[i]); if (EnvironmentSector != null) // if we have so do our children. { for (int i = 0; i < 4; ++i) { m_children[i] = (MyPlanetEnvironmentClipmapProxy)children[i]; m_children[i].m_parent = this; } } }
public void InitJoin(IMy2DClipmapNodeHandler[] children) { m_split = false; m_closed = false; if (EnvironmentSector != null) { m_manager.UnmarkProxyOutgoingProxy(this); m_manager.EnqueueOperation(this, Lod); LodSet = Lod; for (int i = 0; i < 4; ++i) m_children[i] = null; } else { m_manager.RegisterProxy(this); } }