protected override void FinishSetup()
        {
            base.FinishSetup();

            thumbstick     = GetChildControl <Vector2Control>("thumbstick");
            trigger        = GetChildControl <AxisControl>("trigger");
            triggerTouched = GetChildControl <AxisControl>("triggerTouched");
            grip           = GetChildControl <AxisControl>("grip");

            primaryButton     = GetChildControl <ButtonControl>("primaryButton");
            secondaryButton   = GetChildControl <ButtonControl>("secondaryButton");
            gripPressed       = GetChildControl <ButtonControl>("gripPressed");
            thumbstickClicked = GetChildControl <ButtonControl>("thumbstickClicked");
            primaryTouched    = GetChildControl <ButtonControl>("primaryTouched");
            secondaryTouched  = GetChildControl <ButtonControl>("secondaryTouched");
            thumbstickTouched = GetChildControl <ButtonControl>("thumbstickTouched");
            triggerPressed    = GetChildControl <ButtonControl>("triggerPressed");

            trackingState             = GetChildControl <IntegerControl>("trackingState");
            isTracked                 = GetChildControl <ButtonControl>("isTracked");
            devicePosition            = GetChildControl <Vector3Control>("devicePosition");
            deviceRotation            = GetChildControl <QuaternionControl>("deviceRotation");
            deviceVelocity            = GetChildControl <Vector3Control>("deviceVelocity");
            deviceAngularVelocity     = GetChildControl <Vector3Control>("deviceAngularVelocity");
            deviceAcceleration        = GetChildControl <Vector3Control>("deviceAcceleration");
            deviceAngularAcceleration = GetChildControl <Vector3Control>("deviceAngularAcceleration");
        }
        protected override void FinishSetup()
        {
            base.FinishSetup();

            userPresence                 = GetChildControl <ButtonControl>("userPresence");
            trackingState                = GetChildControl <IntegerControl>("trackingState");
            isTracked                    = GetChildControl <ButtonControl>("isTracked");
            devicePosition               = GetChildControl <Vector3Control>("devicePosition");
            deviceRotation               = GetChildControl <QuaternionControl>("deviceRotation");
            deviceAngularVelocity        = GetChildControl <Vector3Control>("deviceAngularVelocity");
            deviceAcceleration           = GetChildControl <Vector3Control>("deviceAcceleration");
            deviceAngularAcceleration    = GetChildControl <Vector3Control>("deviceAngularAcceleration");
            leftEyePosition              = GetChildControl <Vector3Control>("leftEyePosition");
            leftEyeRotation              = GetChildControl <QuaternionControl>("leftEyeRotation");
            leftEyeAngularVelocity       = GetChildControl <Vector3Control>("leftEyeAngularVelocity");
            leftEyeAcceleration          = GetChildControl <Vector3Control>("leftEyeAcceleration");
            leftEyeAngularAcceleration   = GetChildControl <Vector3Control>("leftEyeAngularAcceleration");
            rightEyePosition             = GetChildControl <Vector3Control>("rightEyePosition");
            rightEyeRotation             = GetChildControl <QuaternionControl>("rightEyeRotation");
            rightEyeAngularVelocity      = GetChildControl <Vector3Control>("rightEyeAngularVelocity");
            rightEyeAcceleration         = GetChildControl <Vector3Control>("rightEyeAcceleration");
            rightEyeAngularAcceleration  = GetChildControl <Vector3Control>("rightEyeAngularAcceleration");
            centerEyePosition            = GetChildControl <Vector3Control>("centerEyePosition");
            centerEyeRotation            = GetChildControl <QuaternionControl>("centerEyeRotation");
            centerEyeAngularVelocity     = GetChildControl <Vector3Control>("centerEyeAngularVelocity");
            centerEyeAcceleration        = GetChildControl <Vector3Control>("centerEyeAcceleration");
            centerEyeAngularAcceleration = GetChildControl <Vector3Control>("centerEyeAngularAcceleration");
        }
Beispiel #3
0
        protected override void FinishSetup(InputDeviceBuilder builder)
        {
            base.FinishSetup(builder);

            trackingState                = builder.GetControl <IntegerControl>("trackingState");
            isTracked                    = builder.GetControl <ButtonControl>("isTracked");
            devicePosition               = builder.GetControl <Vector3Control>("devicePosition");
            deviceRotation               = builder.GetControl <QuaternionControl>("deviceRotation");
            deviceAngularVelocity        = builder.GetControl <Vector3Control>("deviceAngularVelocity");
            deviceAcceleration           = builder.GetControl <Vector3Control>("deviceAcceleration");
            deviceAngularAcceleration    = builder.GetControl <Vector3Control>("deviceAngularAcceleration");
            leftEyePosition              = builder.GetControl <Vector3Control>("leftEyePosition");
            leftEyeRotation              = builder.GetControl <QuaternionControl>("leftEyeRotation");
            leftEyeAngularVelocity       = builder.GetControl <Vector3Control>("leftEyeAngularVelocity");
            leftEyeAcceleration          = builder.GetControl <Vector3Control>("leftEyeAcceleration");
            leftEyeAngularAcceleration   = builder.GetControl <Vector3Control>("leftEyeAngularAcceleration");
            rightEyePosition             = builder.GetControl <Vector3Control>("rightEyePosition");
            rightEyeRotation             = builder.GetControl <QuaternionControl>("rightEyeRotation");
            rightEyeAngularVelocity      = builder.GetControl <Vector3Control>("rightEyeAngularVelocity");
            rightEyeAcceleration         = builder.GetControl <Vector3Control>("rightEyeAcceleration");
            rightEyeAngularAcceleration  = builder.GetControl <Vector3Control>("rightEyeAngularAcceleration");
            centerEyePosition            = builder.GetControl <Vector3Control>("centerEyePosition");
            centerEyeRotation            = builder.GetControl <QuaternionControl>("centerEyeRotation");
            centerEyeAngularVelocity     = builder.GetControl <Vector3Control>("centerEyeAngularVelocity");
            centerEyeAcceleration        = builder.GetControl <Vector3Control>("centerEyeAcceleration");
            centerEyeAngularAcceleration = builder.GetControl <Vector3Control>("centerEyeAngularAcceleration");
        }
        public void UpdateValue(Vector3 value)
        {
            Tag  = value;
            Text = Name + ": " + ((Vector3)Tag).ToString();
            Vector3Control vectorBox = (Vector3Control)Control;

            vectorBox.Value = (Vector3)Tag;
        }
        private void SetControl(float min, float max, int decimals)
        {
            Vector3Control vectorBox = new Vector3Control(min, max, decimals);

            vectorBox.Value         = ((Vector3)Tag);
            vectorBox.ValueChanged += new EventHandler(OnValueChanged);
            Control = vectorBox;
        }
        Vector3Control AddComponent(string name)
        {
            var component = new Vector3Control();

            component.Name      = name;
            component.ValueSet += h => ValueSet(h);
            AddChild(component);
            return(component);
        }
Beispiel #7
0
        protected override void FinishSetup(InputDeviceBuilder builder)
        {
            if (builder == null)
            {
                throw new System.ArgumentNullException(nameof(builder));
            }

            gravity = builder.GetControl <Vector3Control>("gravity");
            base.FinishSetup(builder);
        }
        /// <inheritdoc />
        protected override void FinishSetup()
        {
            isTracked       = GetChildControl <ButtonControl>("isTracked");
            trackingState   = GetChildControl <IntegerControl>("trackingState");
            position        = GetChildControl <Vector3Control>("position");
            rotation        = GetChildControl <QuaternionControl>("rotation");
            velocity        = GetChildControl <Vector3Control>("velocity");
            angularVelocity = GetChildControl <Vector3Control>("angularVelocity");

            base.FinishSetup();
        }
        private void OnValueChanged(object sender, EventArgs e)
        {
            Vector3Control vectorBox = (Vector3Control)Control;

            Tag  = vectorBox.Value;
            Text = Name + ": " + ((Vector3)Tag).ToString();
            if (ValueChanged != null)
            {
                ValueChanged(this);
            }
        }
Beispiel #10
0
        protected override void FinishSetup()
        {
            base.FinishSetup();

            isGrab                 = GetChildControl <ButtonControl>("isGrab");
            gestureOpen            = GetChildControl <ButtonControl>("gestureOpen");
            gestureClose           = GetChildControl <ButtonControl>("gestureClose");
            gesturePointer         = GetChildControl <ButtonControl>("gesturePointer");
            gestureGrab            = GetChildControl <ButtonControl>("gestureGrab");
            gestureTwo             = GetChildControl <ButtonControl>("gestureTwo");
            gesturePointerPosition = GetChildControl <Vector3Control>("gesturePointerPosition");
        }
        //Need Bone control and Hand Control

        protected override void FinishSetup()
        {
            base.FinishSetup();

            center   = GetChildControl <Vector3Control>("center");
            rotation = GetChildControl <QuaternionControl>("rotation");

            handConfidence  = GetChildControl <AxisControl>("handConfidence");
            normalizeCenter = GetChildControl <Vector3Control>("normalizeCenter");
            wristCenter     = GetChildControl <Vector3Control>("wristCenter");
            wristUlnar      = GetChildControl <Vector3Control>("wristUlnar");
            wristRadial     = GetChildControl <Vector3Control>("wristRadial");
        }
Beispiel #12
0
        public TransformControl(bool allowScale = false)
        {
            AllowScale = allowScale;

            SizeFlagsHorizontal = (int)Control.SizeFlags.ExpandFill;

            translate = AddComponent("Translation");
            rotation  = AddComponent("Rotation");

            if (AllowScale)
            {
                scale = AddComponent("Scale");
            }
        }
Beispiel #13
0
        protected override void FinishSetup()
        {
            base.FinishSetup();

            grip            = GetChildControl <AxisControl>("grip");
            primary         = GetChildControl <ButtonControl>("primary");
            gripPressed     = GetChildControl <ButtonControl>("gripPressed");
            trackpadPressed = GetChildControl <ButtonControl>("trackpadPressed");
            trackpadTouched = GetChildControl <ButtonControl>("trackpadTouched");
            trackpad        = GetChildControl <Vector2Control>("trackpad");
            trigger         = GetChildControl <AxisControl>("trigger");
            triggerPressed  = GetChildControl <ButtonControl>("triggerPressed");

            deviceVelocity        = GetChildControl <Vector3Control>("deviceVelocity");
            deviceAngularVelocity = GetChildControl <Vector3Control>("deviceAngularVelocity");
        }
Beispiel #14
0
        protected override void FinishSetup(InputDeviceBuilder builder)
        {
            if (builder == null)
            {
                throw new System.ArgumentNullException(nameof(builder));
            }

            base.FinishSetup(builder);

            trackingState         = builder.GetControl <IntegerControl>("trackingState");
            isTracked             = builder.GetControl <ButtonControl>("isTracked");
            devicePosition        = builder.GetControl <Vector3Control>("devicePosition");
            deviceRotation        = builder.GetControl <QuaternionControl>("deviceRotation");
            deviceVelocity        = builder.GetControl <Vector3Control>("deviceVelocity");
            deviceAngularVelocity = builder.GetControl <Vector3Control>("deviceAngularVelocity");
        }
        protected override void FinishSetup()
        {
            base.FinishSetup();

            touchpad           = GetChildControl <Vector2Control>("touchpad");
            volumeUp           = GetChildControl <ButtonControl>("volumeUp");
            recentered         = GetChildControl <ButtonControl>("recentered");
            volumeDown         = GetChildControl <ButtonControl>("volumeDown");
            recentering        = GetChildControl <ButtonControl>("recentering");
            app                = GetChildControl <ButtonControl>("app");
            home               = GetChildControl <ButtonControl>("home");
            touchpadClicked    = GetChildControl <ButtonControl>("touchpadClicked");
            touchpadTouched    = GetChildControl <ButtonControl>("touchpadTouched");
            deviceVelocity     = GetChildControl <Vector3Control>("deviceVelocity");
            deviceAcceleration = GetChildControl <Vector3Control>("deviceAcceleration");
        }
Beispiel #16
0
        protected override void FinishSetup(InputDeviceBuilder builder)
        {
            base.FinishSetup(builder);

            touchpad        = builder.GetControl <Vector2Control>("touchpad");
            volumeUp        = builder.GetControl <ButtonControl>("volumeUp");
            recentered      = builder.GetControl <ButtonControl>("recentered");
            volumeDown      = builder.GetControl <ButtonControl>("volumeDown");
            recentering     = builder.GetControl <ButtonControl>("recentering");
            app             = builder.GetControl <ButtonControl>("app");
            home            = builder.GetControl <ButtonControl>("home");
            touchpadClicked = builder.GetControl <ButtonControl>("touchpadClicked");
            touchpadTouched = builder.GetControl <ButtonControl>("touchpadTouched");

            trackingState      = builder.GetControl <IntegerControl>("trackingState");
            isTracked          = builder.GetControl <ButtonControl>("isTracked");
            devicePosition     = builder.GetControl <Vector3Control>("devicePosition");
            deviceRotation     = builder.GetControl <QuaternionControl>("deviceRotation");
            deviceVelocity     = builder.GetControl <Vector3Control>("deviceVelocity");
            deviceAcceleration = builder.GetControl <Vector3Control>("deviceAcceleration");
        }