com.jogamp.opengl.util.stereo

## Interface StereoDevice

-     public interface StereoDevice

  Interface describing a native stereoscopic device

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `StereoDevice.Config` Merely a class providing a type-tag for extensions

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static boolean` | `DEBUG`
    `static boolean` | `DUMP_DATA`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `StereoDeviceRenderer` | `createRenderer(int distortionBits, int textureCount, float[] eyePositionOffset, FovHVHalves[] eyeFov, float pixelsPerDisplayPixel, int textureUnit)` Create a new `StereoDeviceRenderer` instance.
    `void` | `dispose()` Disposes this `StereoDevice`.
    `float[]` | `getDefaultEyePositionOffset()` Return the device default eye position offset for `#createRenderer(int, int, float[], FovHVHalves[], float)`.
    `FovHVHalves[]` | `getDefaultFOV()` Returns the device default `FovHVHalves` for all supported eyes in natural order, i.e.
    `int[]` | `getEyeRenderOrder()` Returns an array of the preferred eye rendering order.
    `StereoDeviceFactory` | `getFactory()` Return the factory used to create this device.
    `int` | `getMinimumDistortionBits()` Returns the minimum distortion compensation bits as required by the `StereoDeviceRenderer`, e.g.
    `PointImmutable` | `getPosition()` If operation within a device spanning virtual desktop, returns the device position.
    `int` | `getRecommendedDistortionBits()` Returns the recommended distortion compensation bits for the `StereoDeviceRenderer`, e.g.
    `boolean` | `getSensorsStarted()` Return true if sensors have been started, false otherwise
    `int` | `getSupportedDistortionBits()` Returns the supported distortion compensation by the `StereoDeviceRenderer`, e.g.
    `DimensionImmutable` | `getSurfaceSize()` Returns the required surface size in pixel.
    `boolean` | `startSensors(boolean start)` Start or stop sensors.

- - ### Field Detail

    - #### DEBUG

          static final boolean DEBUG

    - #### DUMP_DATA

          static final boolean DUMP_DATA

  - ### Method Detail

    - #### getFactory

          StereoDeviceFactory getFactory()

      Return the factory used to create this device.

    - #### dispose

          void dispose()

      Disposes this `StereoDevice`.

    - #### getPosition

          PointImmutable getPosition()

      If operation within a device spanning virtual desktop, returns the device position.

      Otherwise simply 0/0.

    - #### getSurfaceSize

          DimensionImmutable getSurfaceSize()

      Returns the required surface size in pixel.

    - #### getDefaultEyePositionOffset

          float[] getDefaultEyePositionOffset()

      Return the device default eye position offset for `#createRenderer(int, int, float[], FovHVHalves[], float)`.

      Result is an array of float values for

      - right (positive)
      - up (positive)
      - forward (negative)
      Returns:

    - #### getDefaultFOV

          FovHVHalves[] getDefaultFOV()

      Returns the device default `FovHVHalves` for all supported eyes in natural order, i.e. left and right if supported.

      Monoscopic devices return an array length of one, without the value for the right-eye!

    - #### startSensors

          boolean startSensors(boolean start)

      Start or stop sensors. Returns true if action was successful, otherwise false.

    - #### getSensorsStarted

          boolean getSensorsStarted()

      Return true if sensors have been started, false otherwise

    - #### getEyeRenderOrder

          int[] getEyeRenderOrder()

      Returns an array of the preferred eye rendering order. The array length reflects the supported eye count.

      Monoscopic devices only support one eye, where stereoscopic device two eyes.

    - #### getSupportedDistortionBits

          int getSupportedDistortionBits()

      Returns the supported distortion compensation by the `StereoDeviceRenderer`, e.g. `StereoDeviceRenderer.DISTORTION_BARREL`, `StereoDeviceRenderer.DISTORTION_CHROMATIC`, etc.
      See Also:
        `StereoDeviceRenderer.getDistortionBits()`, `createRenderer(int, int, float[], FovHVHalves[], float, int)`, `getRecommendedDistortionBits()`, `getMinimumDistortionBits()`

    - #### getRecommendedDistortionBits

          int getRecommendedDistortionBits()

      Returns the recommended distortion compensation bits for the `StereoDeviceRenderer`, e.g. `StereoDeviceRenderer.DISTORTION_BARREL`, `StereoDeviceRenderer.DISTORTION_CHROMATIC` `StereoDeviceRenderer.DISTORTION_VIGNETTE`.

      User shall use the recommended distortion compensation to achieve a distortion free view.

      See Also:
        `StereoDeviceRenderer.getDistortionBits()`, `createRenderer(int, int, float[], FovHVHalves[], float, int)`, `getSupportedDistortionBits()`, `getMinimumDistortionBits()`

    - #### getMinimumDistortionBits

          int getMinimumDistortionBits()

      Returns the minimum distortion compensation bits as required by the `StereoDeviceRenderer`, e.g. `StereoDeviceRenderer.DISTORTION_BARREL` in case the stereoscopic display uses [a]spherical lenses.

      Minimum distortion compensation bits are being enforced by the `StereoDeviceRenderer`.

      See Also:
        `getSupportedDistortionBits()`, `getRecommendedDistortionBits()`, `StereoDeviceRenderer.getDistortionBits()`, `createRenderer(int, int, float[], FovHVHalves[], float, int)`

    - #### createRenderer

          StereoDeviceRenderer createRenderer(int distortionBits,
                                            int textureCount,
                                            float[] eyePositionOffset,
                                            FovHVHalves[] eyeFov,
                                            float pixelsPerDisplayPixel,
                                            int textureUnit)

      Create a new `StereoDeviceRenderer` instance.
      Parameters:
        `distortionBits` - `StereoDeviceRenderer` distortion bits, e.g. `StereoDeviceRenderer.DISTORTION_BARREL`, etc, see `getRecommendedDistortionBits()`.
        `textureCount` - desired texture count for post-processing, see `StereoDeviceRenderer.getTextureCount()` and `StereoDeviceRenderer.ppAvailable()`
        `eyePositionOffset` - eye position offset, e.g. `getDefaultEyePositionOffset()`.
        `eyeFov` - FovHVHalves[] field-of-view per eye, e.g. `getDefaultFOV()`. May contain only one value for monoscopic devices, see `getEyeRenderOrder()`.
        `pixelsPerDisplayPixel` -
        `textureUnit` -
      Returns:

Copyright 2010 JogAmp Community.