Esempio n. 1
0
        internal UpdateEvent(ref SteamControllerLib.Event evt) : base(evt)
        {
            this.TimeStamp    = evt.input.timeStamp;
            this.ButtonState  = evt.input.buttons;
            this.LeftTrigger  = evt.input.leftTrigger / 255.0f;
            this.RightTrigger = evt.input.rightTrigger / 255.0f;

            this.LeftXY.x  = evt.input.leftX / 32767.0f;
            this.LeftXY.y  = evt.input.leftY / 32767.0f;
            this.RightXY.x = evt.input.rightX / 32767.0f;
            this.RightXY.y = evt.input.rightY / 32767.0f;

            this.Orientation.x = evt.input.qx / 32767.0f;
            this.Orientation.y = evt.input.qy / 32767.0f;
            this.Orientation.z = evt.input.qz / 32767.0f;
            this.Orientation.w = 1.0f - (float)Math.Sqrt(this.Orientation.x * this.Orientation.x + this.Orientation.y * this.Orientation.y + this.Orientation.z * this.Orientation.z);

            this.Acceleration.x = evt.input.ax / 32767.0f;
            this.Acceleration.y = evt.input.ay / 32767.0f;
            this.Acceleration.z = evt.input.az / 32767.0f;

            this.AngularVelocity.x = evt.input.gx / 32767.0f;
            this.AngularVelocity.y = evt.input.gy / 32767.0f;
            this.AngularVelocity.z = evt.input.gz / 32767.0f;
        }
Esempio n. 2
0
 internal BatteryEvent(ref SteamControllerLib.Event evt) : base(evt)
 {
     this.MilliVolts = evt.battery.voltage;
 }
Esempio n. 3
0
 internal ConnectionEvent(ref SteamControllerLib.Event evt) : base(evt)
 {
     this.State = (WirelessState)evt.connection.details;
 }
Esempio n. 4
0
 internal Event(SteamControllerLib.Event evt)
 {
     this.EventType = (EventTypeEnum)evt.eventType;
 }