Add recentering support for Oculus Rift, improve associated Javadoc

This commit is contained in:
Campbell Suter 2017-10-07 19:46:39 +13:00
parent 2464dcd17a
commit 0b37e56bd0
No known key found for this signature in database
GPG Key ID: 754A66CCF3F73C0F
2 changed files with 4 additions and 3 deletions

View File

@ -329,12 +329,12 @@ public class OculusVR implements VRAPI {
@Override
public void reset() {
throw new UnsupportedOperationException();
ovr_RecenterTrackingOrigin(session);
}
@Override
public void getRenderSize(Vector2f store) {
if(!isInitialized()) {
if (!isInitialized()) {
throw new IllegalStateException("Cannot call getRenderSize() before initialized!");
}
store.x = textureW;

View File

@ -86,7 +86,8 @@ public interface VRAPI {
public boolean isInitialized();
/**
* Reset the VR system.
* Reset (recenter) the VR system. The current position of the HMD is
* now considered the origin (observer+[0,0,0]).
*/
public void reset();