Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Bindings: Add mirroring support/examples

  • Loading branch information...
commit 58cf465b55ee04f83dd94811d25b27752fee6a46 1 parent 7738c22
Thomas Perl authored
9 bindings/swig/psmove.i
View
@@ -259,6 +259,15 @@ void reinit();
enabled?PSMove_True:PSMove_False);
}
+ void set_mirror(int enabled) {
+ psmove_tracker_set_mirror($self,
+ enabled?PSMove_True:PSMove_False);
+ }
+
+ int get_mirror() {
+ return psmove_tracker_get_mirror($self);
+ }
+
enum PSMoveTracker_Status get_status(PSMove *move) {
return psmove_tracker_get_status($self, move);
}
3  examples/java/Tracker.java
View
@@ -37,6 +37,9 @@ public static void main(String [] args) {
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) {
3  examples/python/test_tracker.py
View
@@ -37,6 +37,9 @@
tracker = psmove.PSMoveTracker()
move = psmove.PSMove()
+# Mirror the camera image
+tracker.set_mirror(True)
+
# Calibrate the controller with the tracker
result = -1
while result != psmove.Tracker_CALIBRATED:
Please sign in to comment.
Something went wrong with that request. Please try again.