Top Constructors Methods
com.jogamp.opengl.util.stereo

public Class StereoUtil

extends Object
Class Inheritance
Imports
com.jogamp.opengl.math.FloatUtil, .Quaternion, .VectorUtil, com.jogamp.opengl.util.CustomGLEventListener, com.jogamp.opengl.util.stereo.StereoDeviceRenderer.Eye

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String
public static float[]
getHorizPupilCenterFromLeft(final float screenWidthInMeters, final float interpupillaryDistanceInMeters)

Return the horizontal pupil center from the left side for both eyes in the range [0..1].

public static void
getSBSUpstreamPMV(final ViewerPose viewerPose, final StereoDeviceRenderer.Eye eye, final float
frustum near value
zNear
,
final float
frustum far value
zFar
,
final float[]
float[16] projection matrix result
mat4Projection
,
final float[]
float[16] modelview matrix result
mat4Modelview
)

Calculates the Side By Side, SBS, projection- and modelview matrix for one eye.

public static float
getVertPupilCenterFromTop(final float screenHeightInMeters, final float pupilCenterFromScreenTopInMeters)

Return the vertical pupil center from the screen top in the range [0..1].

public static String
public static boolean
public static boolean
public static boolean
public static boolean
public static boolean
public static boolean
public static boolean
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StereoUtilback to summary
public StereoUtil()

Method Detail

distortionBitsToStringback to summary
public static String distortionBitsToString(final int distortionBits)

See StereoDeviceRenderer#getDistortionBits().

getHorizPupilCenterFromLeftback to summary
public static float[] getHorizPupilCenterFromLeft(final float screenWidthInMeters, final 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
getSBSUpstreamPMVback to summary
public static void getSBSUpstreamPMV(final ViewerPose viewerPose, final StereoDeviceRenderer.Eye eye, final float zNear, final float zFar, final float[] mat4Projection, final float[] 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
zNear:float

frustum near value

zFar:float

frustum far value

mat4Projection:float[]

float[16] projection matrix result

mat4Modelview:float[]

float[16] modelview matrix result

getVertPupilCenterFromTopback to summary
public static float getVertPupilCenterFromTop(final float screenHeightInMeters, final float pupilCenterFromScreenTopInMeters)

Return the vertical pupil center from the screen top in the range [0..1].

sensorBitsToStringback to summary
public static String sensorBitsToString(final int sensorBits)

See StereoDevice#getSupportedSensorBits() and StereoDevice#getEnabledSensorBits().

usesBarrelDistortionback to summary
public static boolean usesBarrelDistortion(final int distortionBits)

See StereoDeviceRenderer#getDistortionBits().

usesChromaticDistortionback to summary
public static boolean usesChromaticDistortion(final int distortionBits)

See StereoDeviceRenderer#getDistortionBits().

usesOrientationSensorback to summary
public static boolean usesOrientationSensor(final int sensorBits)

See StereoDevice#getSupportedSensorBits() and StereoDevice#getEnabledSensorBits().

usesPositionSensorback to summary
public static boolean usesPositionSensor(final int sensorBits)

See StereoDevice#getSupportedSensorBits() and StereoDevice#getEnabledSensorBits().

usesTimewarpDistortionback to summary
public static boolean usesTimewarpDistortion(final int distortionBits)

See StereoDeviceRenderer#getDistortionBits().

usesVignetteDistortionback to summary
public static boolean usesVignetteDistortion(final int distortionBits)

See StereoDeviceRenderer#getDistortionBits().

usesYawCorrectionSensorback to summary
public static boolean usesYawCorrectionSensor(final int sensorBits)

See StereoDevice#getSupportedSensorBits() and StereoDevice#getEnabledSensorBits().