Exemplo n.º 1
0
        /// <inheritdoc/>
        public override bool Equals(object rhs)
        {
            if (rhs is LimitAngularRange)
            {
                LimitAngularRange other = (LimitAngularRange)rhs;
                return(base.Equals(rhs) && Lower == other.Lower && Upper == other.Upper);
            }

            return(false);
        }
        /// <summary>Initializes the struct with default values.</summary>
        public static LimitAngularRange Default()
        {
            LimitAngularRange value = new LimitAngularRange();

            value.lower       = new Radian();
            value.upper       = new Radian();
            value.contactDist = -1f;
            value.restitution = 0f;
            value.spring      = new Spring();

            return(value);
        }
Exemplo n.º 3
0
        /// <summary>
        /// Constructs a new set of GUI elements for inspecting the limit object.
        /// </summary>
        /// <param name="limit">Initial values to assign to the GUI elements.</param>
        /// <param name="layout">Layout to append the GUI elements to.</param>
        /// <param name="properties">A set of properties that are persisted by the parent inspector. Used for saving state.
        ///                          </param>
        public LimitAngularRangeGUI(LimitAngularRange limit, GUILayout layout, SerializableProperties properties)
        {
            this.limitData = limit.Data;

            limitLowerField.OnChanged += x => { limitData.lower = new Degree(x); MarkAsModified(); };
            limitLowerField.OnFocusLost += ConfirmModify;

            limitUpperField.OnChanged += x => { limitData.upper = new Degree(x); MarkAsModified(); };
            limitUpperField.OnFocusLost += ConfirmModify;

            layout.AddElement(limitLowerField);
            layout.AddElement(limitUpperField);
            limitCommonGUI = new LimitCommonGUI("angularRange", limit.CommonData, layout, properties);
            limitCommonGUI.OnChanged += x => MarkAsModified();
            limitCommonGUI.OnConfirmed += ConfirmModify;
        }
Exemplo n.º 4
0
 private static extern void Internal_SetLimit(IntPtr thisPtr, LimitAngularRange limit);
Exemplo n.º 5
0
 private static extern void Internal_getLimit(IntPtr thisPtr, out LimitAngularRange __output);
Exemplo n.º 6
0
 private static extern void Internal_setLimitTwist(IntPtr thisPtr, ref LimitAngularRange limit);
Exemplo n.º 7
0
 private static extern void Internal_SetLimitTwist(IntPtr thisPtr, LimitAngularRange limit);