Package com.jogamp.opengl.util.stereo
Class StereoUtil
- java.lang.Object
-
- com.jogamp.opengl.util.stereo.StereoUtil
-
public class StereoUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description StereoUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StringdistortionBitsToString(int distortionBits)static float[]getHorizPupilCenterFromLeft(float screenWidthInMeters, float interpupillaryDistanceInMeters)Return the horizontal pupil center from the left side for both eyes in the range [0..1].static voidgetSBSUpstreamPMV(ViewerPose viewerPose, StereoDeviceRenderer.Eye eye, float zNear, float zFar, com.jogamp.math.Matrix4f mat4Projection, com.jogamp.math.Matrix4f mat4Modelview)Calculates the Side By Side, SBS, projection- and modelview matrix for one eye.static floatgetVertPupilCenterFromTop(float screenHeightInMeters, float pupilCenterFromScreenTopInMeters)Return the vertical pupil center from the screen top in the range [0..1].static StringsensorBitsToString(int sensorBits)static booleanusesBarrelDistortion(int distortionBits)static booleanusesChromaticDistortion(int distortionBits)static booleanusesOrientationSensor(int sensorBits)static booleanusesPositionSensor(int sensorBits)static booleanusesTimewarpDistortion(int distortionBits)static booleanusesVignetteDistortion(int distortionBits)static booleanusesYawCorrectionSensor(int sensorBits)
-
-
-
Method Detail
-
getVertPupilCenterFromTop
public static float getVertPupilCenterFromTop(float screenHeightInMeters, float pupilCenterFromScreenTopInMeters)Return the vertical pupil center from the screen top in the range [0..1].- Parameters:
screenHeightInMeters-pupilCenterFromScreenTopInMeters-
-
getHorizPupilCenterFromLeft
public static float[] getHorizPupilCenterFromLeft(float screenWidthInMeters, float interpupillaryDistanceInMeters)Return the horizontal pupil center from the left side for both eyes in the range [0..1].<-------------left eye------------->| |<-----------right eye--------------> <------------------------------------screenSizeInMeters.Width-----------------------------------> <------interpupillaryDistanceInMeters------> <--centerFromLeftInMeters-> ^ center of pupil- Parameters:
screenWidthInMeters-interpupillaryDistanceInMeters-
-
usesBarrelDistortion
public static boolean usesBarrelDistortion(int distortionBits)
-
usesTimewarpDistortion
public static boolean usesTimewarpDistortion(int distortionBits)
-
usesChromaticDistortion
public static boolean usesChromaticDistortion(int distortionBits)
-
usesVignetteDistortion
public static boolean usesVignetteDistortion(int distortionBits)
-
distortionBitsToString
public static String distortionBitsToString(int distortionBits)
-
usesOrientationSensor
public static boolean usesOrientationSensor(int sensorBits)
-
usesYawCorrectionSensor
public static boolean usesYawCorrectionSensor(int sensorBits)
-
usesPositionSensor
public static boolean usesPositionSensor(int sensorBits)
-
sensorBitsToString
public static String sensorBitsToString(int sensorBits)
-
getSBSUpstreamPMV
public static void getSBSUpstreamPMV(ViewerPose viewerPose, StereoDeviceRenderer.Eye eye, float zNear, float zFar, com.jogamp.math.Matrix4f mat4Projection, com.jogamp.math.Matrix4f mat4Modelview)
Calculates the Side By Side, SBS, projection- and modelview matrix for one eye.#updateViewerPose(int)must be called upfront.This method merely exist as an example implementation to compute the matrices, which shall be adopted by the
upstream client code.- Parameters:
viewerPose-eye-zNear- frustum near valuezFar- frustum far valuemat4Projection- projection matrix resultmat4Modelview- modelview matrix result
-
-