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 and Description
    `StereoUtil()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static String` | `distortionBitsToString(int distortionBits)` See `StereoDeviceRenderer.getDistortionBits()`.
    `static void` | `getSBSUpstreamPMV(StereoDeviceRenderer.Eye eye, float zNear, float zFar, float[] mat4Projection, float[] mat4Modelview)` Calculates the Side By Side, SBS, projection- and modelview matrix for one eye.
    `static boolean` | `usesBarrelDistortion(int distortionBits)` See `StereoDeviceRenderer.getDistortionBits()`.
    `static boolean` | `usesChromaticDistortion(int distortionBits)` See `StereoDeviceRenderer.getDistortionBits()`.
    `static boolean` | `usesTimewarpDistortion(int distortionBits)` See `StereoDeviceRenderer.getDistortionBits()`.
    `static boolean` | `usesVignetteDistortion(int distortionBits)` See `StereoDeviceRenderer.getDistortionBits()`.

    - ### Methods inherited from class java.lang.Object

      `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### StereoUtil

          public StereoUtil()

  - ### Method Detail

    - #### usesBarrelDistortion

          public static boolean usesBarrelDistortion(int distortionBits)

      See `StereoDeviceRenderer.getDistortionBits()`.

    - #### usesTimewarpDistortion

          public static boolean usesTimewarpDistortion(int distortionBits)

      See `StereoDeviceRenderer.getDistortionBits()`.

    - #### usesChromaticDistortion

          public static boolean usesChromaticDistortion(int distortionBits)

      See `StereoDeviceRenderer.getDistortionBits()`.

    - #### usesVignetteDistortion

          public static boolean usesVignetteDistortion(int distortionBits)

      See `StereoDeviceRenderer.getDistortionBits()`.

    - #### distortionBitsToString

          public static String distortionBitsToString(int distortionBits)

      See `StereoDeviceRenderer.getDistortionBits()`.

    - #### getSBSUpstreamPMV

          public static void getSBSUpstreamPMV(StereoDeviceRenderer.Eye eye,
                               float zNear,
                               float zFar,
                               float[] mat4Projection,
                               float[] mat4Modelview)

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

      `#updateEyePose(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:
        `eyeNum` - eye denominator
        `zNear` - frustum near value
        `zFar` - frustum far value
        `mat4Projection` - float[16] projection matrix result
        `mat4Modelview` - float[16] modelview matrix result

Copyright 2010 JogAmp Community.