Examples of PSMove


Examples of io.thp.psmove.PSMove

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

        PSMove move = new PSMove();

        System.out.println("PS Move Serial: " + move.get_serial());

        float [] ax = { 0.f }, ay = { 0.f }, az = { 0.f };
        float [] gx = { 0.f }, gy = { 0.f }, gz = { 0.f };
        float [] mx = { 0.f }, my = { 0.f }, mz = { 0.f };

        while (true) {
            while (move.poll() != 0) {
                move.get_accelerometer_frame(Frame.Frame_SecondHalf,
                        ax, ay, az);
                move.get_gyroscope_frame(Frame.Frame_SecondHalf,
                        gx, gy, gz);
                move.get_magnetometer_vector(mx, my, mz);
                System.out.format("ax: %.2f ay: %.2f az: %.2f ",
                        ax[0], ay[0], az[0]);
                System.out.format("gx: %.2f gy: %.2f gz: %.2f ",
                        gx[0], gy[0], gz[0]);
                System.out.format("mx: %.2f my: %.2f mz: %.2f\n",
View Full Code Here

Examples of io.thp.psmove.PSMove

            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);
View Full Code Here

Examples of io.thp.psmove.PSMove

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

        fusion = new PSMoveFusion(tracker, 1.f, 1000.f);
        move = new PSMove();
        move.enable_orientation(1);
        move.reset_orientation();

        while (tracker.enable(move) != Status.Tracker_CALIBRATED);
    }
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.