aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2015-07-20 02:59:54 +0200
committerSven Gothel <[email protected]>2015-07-20 02:59:54 +0200
commitd99b7bf16fe316a10784e9588408ab28b204e506 (patch)
treefe631eecaef1a3e3d3522f21e471f3bc5c524b7c /src/test/com
parentd9674620bc4f03dff9611a785a27dd41b1b72648 (diff)
StereoDevice (Generic/OVR): Add knowledge about LocationSensorParameter and allow reset origin of location-sensor
Diffstat (limited to 'src/test/com')
-rw-r--r--src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
index c2e808770..df8e2bef6 100644
--- a/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
+++ b/src/test/com/jogamp/opengl/test/junit/jogl/stereo/StereoDemo01.java
@@ -34,8 +34,10 @@ import java.util.Arrays;
import com.jogamp.nativewindow.util.DimensionImmutable;
import com.jogamp.nativewindow.util.PointImmutable;
import com.jogamp.opengl.GL;
+import com.jogamp.opengl.GLAutoDrawable;
import com.jogamp.opengl.GLCapabilities;
import com.jogamp.opengl.GLProfile;
+import com.jogamp.opengl.GLRunnable;
import jogamp.opengl.util.stereo.GenericStereoDevice;
@@ -334,6 +336,24 @@ public class StereoDemo01 {
return;
}
switch(e.getKeySymbol()) {
+ case KeyEvent.VK_O: {
+ window.invoke(false, new GLRunnable() {
+ @Override
+ public boolean run(final GLAutoDrawable drawable) {
+ stereoDevice.resetLocationSensorOrigin();
+ return true;
+ } });
+ break;
+ }
+ case KeyEvent.VK_P: {
+ window.invoke(false, new GLRunnable() {
+ @Override
+ public boolean run(final GLAutoDrawable drawable) {
+ System.err.println(stereoDeviceRenderer.getLastViewerPose());
+ return true;
+ } });
+ break;
+ }
case KeyEvent.VK_R: {
if( stereoDevice.getSensorsStarted() ) {
stereoDevice.stopSensors();