public SectorTreeComponent(MyPlanetsDebugInputComponent comp)
            {
                Size = Radius * Math.Sqrt(2);
                double sectorSize = 64;

                m_comp = comp;

                m_tree = new My2DClipmap <DebugDrawHandler> [6];

                for (m_activeClipmap = 0; m_activeClipmap < m_tree.Length; m_activeClipmap++)
                {
                    var forward = Base6Directions.Directions[m_activeClipmap];

                    var up = Base6Directions.Directions[(int)Base6Directions.GetPerpendicular((Base6Directions.Direction)m_activeClipmap)];

                    // Forward is -z so it inverts the orientation of the map which we do not want.
                    MatrixD wm = MatrixD.CreateFromDir(-forward, up);

                    wm.Translation = (Vector3D)forward * Size / 2;

                    m_tree[m_activeClipmap] = new My2DClipmap <DebugDrawHandler>();
                    m_tree[m_activeClipmap].Init(this, ref wm, sectorSize, Size);
                }

                AddShortcut(MyKeys.NumPad8, true, false, false, false, () => "Toggle clipmap update", () => m_update = !m_update);
            }
 public MiscComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
Ejemplo n.º 3
0
 public ShapeComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
            public SectorsComponent(MyPlanetsDebugInputComponent comp)
            {
                m_comp = comp;

                AddShortcut(MyKeys.NumPad8, true, false, false, false, () => "Toggle update range", () => m_updateRange = !m_updateRange);
            }
 public MiscComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
Ejemplo n.º 6
0
            public SectorsComponent(MyPlanetsDebugInputComponent comp)
            {
                m_comp = comp;

                AddShortcut(MyKeys.S, true, true, false, false, () => "Toggle sector work cycle", () => ToggleSectors());
            }
 public ShapeComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
Ejemplo n.º 8
0
 public InfoComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
 public InfoComponent(MyPlanetsDebugInputComponent comp)
 {
     m_comp = comp;
 }
            public SectorsComponent(MyPlanetsDebugInputComponent comp)
            {
                m_comp = comp;

                AddShortcut(MyKeys.NumPad8, true, false, false, false, () => "Toggle update range", () => m_updateRange = !m_updateRange);
            }