Exemple #1
0
        private char r, g, b;     // for RGB_Color components

        public PSMoveController(int index, PSMoveTracker tracker)
        {
            this.Index   = index;
            this.tracker = tracker;
            this.Connect();

            this.position        = new Vector3();
            this.rawPosition     = new Vector3();
            this.centerPosition  = new Vector3();
            this.rotation        = new Quaternion();
            this.gyroscope       = new Vector3();
            this.accelerometer   = new Vector3();
            this.led             = new RGB_Color();
            this.rumble          = (char)0;
            this.buttons         = 0;
            this.buttonsPressed  = 0;
            this.buttonsReleased = 0;

            Global = new PSMoveGlobal(this);
        }
Exemple #2
0
        private float w, x, y, z; // for Vector3 and Quaternion components

        #endregion Fields

        #region Constructors

        public PSMoveController(int index, PSMoveTracker tracker)
        {
            this.Index = index;
            this.tracker = tracker;
            this.Connect();

            this.position = new Vector3();
            this.rawPosition = new Vector3();
            this.centerPosition = new Vector3();
            this.rotation = new Quaternion();
            this.gyroscope = new Vector3();
            this.accelerometer = new Vector3();
            this.led = new RGB_Color();
            this.rumble = (char)0;
            this.buttons = 0;
            this.buttonsPressed = 0;
            this.buttonsReleased = 0;

            Global = new PSMoveGlobal(this);
        }
Exemple #3
0
 public override object CreateGlobal()
 {
     tracker = new PSMove.PSMoveTracker();
     holders = new Dictionary <int, PSMove.PSMoveController>();
     return(new GlobalIndexer <PSMoveGlobal>(Create));
 }