Example #1
0
        /// <summary>
        /// Construct a new wiimote provider.
        /// </summary>
        public WiiProvider()
        {
            // Create a new classifer.
            this.InputClassifier = new SpatioTemporalClassifier();
            this.InputClassifier.DefaultSmoothSize = 4;

            // Bind events.
            this.InputClassifier.OnStart  += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnStart);
            this.InputClassifier.OnUpdate += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnUpdate);
            this.InputClassifier.OnEnd    += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnEnd);

            // Set default source and destination rectangles.
            this.pWarper = new Warper();
            this.setCalibrationData(new CalibrationRectangle(), new CalibrationRectangle(), new Vector(1.0, 1.0));

            // Enable the calibration.
            this.TransformResults = true;

            this.settingsControl = new WiiProviderSettings(this);
        }
Example #2
0
        /// <summary>
        /// Construct a new wiimote provider.
        /// </summary>
        public WiiProvider()
        {
            // Create a new classifer.
            this.InputClassifier = new SpatioTemporalClassifier();
            this.InputClassifier.DefaultSmoothSize = 4;

            // Bind events.
            this.InputClassifier.OnStart += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnStart);
            this.InputClassifier.OnUpdate += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnUpdate);
            this.InputClassifier.OnEnd += new SpatioTemporalClassifier.TrackerEventHandler(handleInputClassifier_OnEnd);

            // Set default source and destination rectangles.
            this.pWarper = new Warper();
            this.setCalibrationData(new CalibrationRectangle(), new CalibrationRectangle(), new Vector(1.0, 1.0));

            // Enable the calibration.
            this.TransformResults = true;

            this.settingsControl = new WiiProviderSettings(this);
        }