Examples of PSMoveTracker


Examples of io.thp.psmove.PSMoveTracker

        if (connected == 0) {
            System.out.println("Please connect a controller first.");
            System.exit(1);
        }

        PSMoveTracker tracker = new PSMoveTracker();
        PSMove move = new PSMove();

        // Mirror the camera image
        tracker.set_mirror(1);

        while (tracker.enable(move) != Status.Tracker_CALIBRATED);

        while (true) {
            tracker.update_image();
            tracker.update();

            /* Optional and not required by default
            short [] r = {0};
            short [] g = {0};
            short [] b = {0};
            tracker.get_color(move, r, g, b);
            move.set_leds(r[0], g[0], b[0]);
            move.update_leds();
            */

            if (tracker.get_status(move) == Status.Tracker_TRACKING) {
                float [] x = { 0.f };
                float [] y = { 0.f };
                float [] radius = { 0.f };

                tracker.get_position(move, x, y, radius);

                System.out.format("x: %5.2f y: %5.2f radius: %5.2f\n",
                        x[0], y[0], radius[0]);
            } else {
                System.out.println("Not tracking.");
View Full Code Here

Examples of io.thp.psmove.PSMoveTracker

        if (psmoveapi.count_connected() == 0) {
            System.out.println("Please connect a controller first.");
            System.exit(1);
        }

        tracker = new PSMoveTracker();
        tracker.set_mirror(1);

        fusion = new PSMoveFusion(tracker, 1.f, 1000.f);
        move = new PSMove();
        move.enable_orientation(1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.