Пример #1
0
        public IntuitiveNodeGizmoHandler(IntuitiveNodeGizmosManager intuitiveManeuvers, ManeuverNode maneuverNode, PreciseNodeOptions options)
        {
            this.intuitiveManeuvers = intuitiveManeuvers;
            this.maneuverNode       = maneuverNode;
            this.options            = options;

            this.progradeChangeOccurred = false;
            this.radialChangeOccurred   = false;
            this.normalChangeOccurred   = false;

            // store the current value of the maneuver node
            this.oldDV = new Vector3d(this.maneuverNode.DeltaV.x,
                                      this.maneuverNode.DeltaV.y,
                                      this.maneuverNode.DeltaV.z);

            AttachHandleHandlers();
            this.maneuverNode.attachedGizmo.OnDelete += this.DeleteHandler;
        }
Пример #2
0
        internal static void drawConicsControls(PreciseNodeOptions options)
        {
            PatchedConicSolver solver = NodeTools.getSolver();
            Color defaultColor = GUI.backgroundColor;

            // Conics mode controls
            GUILayout.BeginHorizontal();
            GUILayout.Label("Conics mode: ", GUILayout.Width(100));
            for (int mode = 0; mode <= 4; mode++) {
                drawButton(mode.ToString(), (options.conicsMode == mode) ? Color.yellow : defaultColor, () => {
                    options.setConicsMode(mode);
                });
            }
            GUILayout.EndHorizontal();

            // conics patch limit editor.
            GUILayout.BeginHorizontal();
            GUILayout.Label("Change conics samples:", GUILayout.Width(200));
            drawPlusMinusButtons(solver.IncreasePatchLimit, solver.DecreasePatchLimit);
            GUILayout.EndHorizontal();
        }
Пример #3
0
        internal static void drawConicsControls(PreciseNodeOptions options)
        {
            PatchedConicSolver solver = NodeTools.getSolver();
            Color defaultColor        = GUI.backgroundColor;

            // Conics mode controls
            GUILayout.BeginHorizontal();
            GUILayout.Label("Conics mode: ", GUILayout.Width(100));
            for (int mode = 0; mode <= 4; mode++)
            {
                drawButton(mode.ToString(), (options.conicsMode == mode) ? Color.yellow : defaultColor, () => {
                    options.setConicsMode(mode);
                });
            }
            GUILayout.EndHorizontal();

            // conics patch limit editor.
            GUILayout.BeginHorizontal();
            GUILayout.Label("Change conics samples:", GUILayout.Width(200));
            drawPlusMinusButtons(solver.IncreasePatchLimit, solver.DecreasePatchLimit);
            GUILayout.EndHorizontal();
        }
 public IntuitiveNodeGizmosManager(PreciseNodeOptions options)
 {
     this.options = options;
     this.maneuverGizmoHandlers = new List <IntuitiveNodeGizmoHandler>();
 }