Top Fields Constructors Methods
jogamp.opengl.util.stereo

public Class GenericStereoDevice

extends Object
implements StereoDevice
Class Inheritance
All Implemented Interfaces
com.jogamp.opengl.util.stereo.StereoDevice
Imports
com.jogamp.nativewindow.util.Dimension, .DimensionImmutable, .Point, .PointImmutable, .Rectangle, .RectangleImmutable, com.jogamp.opengl.math.FovHVHalves, com.jogamp.opengl.util.stereo.StereoDeviceConfig, .EyeParameter, .LocationSensorParameter, .StereoDevice, .StereoDeviceFactory, .StereoDeviceRenderer, .StereoUtil, com.jogamp.opengl.util.stereo.generic.GenericStereoDeviceConfig, .GenericStereoDeviceFactory

Field Summary

Modifier and TypeField and Description
public final GenericStereoDeviceConfig
public static final GenericStereoDeviceConfig
config01Mono01

A mono view configuration DK1, only one eye is supported

public static final GenericStereoDeviceConfig
config01Mono02

A mono view configuration DK2, only one eye is supported

public static final GenericStereoDeviceConfig
config02StereoSBS01

A default stereo SBS view configuration DK1

public static final GenericStereoDeviceConfig
config02StereoSBS02

A default stereo SBS view configuration DK2

public static final GenericStereoDeviceConfig
config03StereoSBSLense01

A default stereo SBS lense view configuration DK1, utilizing similar settings as OculusVR DK1

public static final GenericStereoDeviceConfig
config03StereoSBSLense02

A default stereo SBS lense view configuration DK2, utilizing similar settings as OculusVR DK1

private static final GenericStereoDeviceConfig[]
private final FovHVHalves[]
public final int
private final StereoDeviceFactory
private boolean
public final Point
private int

Constructor Summary

AccessConstructor and Description
public
GenericStereoDevice(final StereoDeviceFactory factory, final int deviceIndex, final StereoDeviceConfig customConfig)

Method Summary

Modifier and TypeMethod and Description
public final StereoDeviceRenderer
createRenderer(final int distortionBits, final int
desired texture count for post-processing, see StereoDeviceRenderer#getTextureCount() and StereoDeviceRenderer#ppAvailable()
textureCount
,
final float[]
eye position offset, e.g. getDefaultEyePositionOffset().
eyePositionOffset
,
final FovHVHalves[]
FovHVHalves[] field-of-view per eye, e.g. getDefaultFOV(). May contain only one value for monoscopic devices, see getEyeRenderOrder().
eyeFov
,
final float pixelsPerDisplayPixel, final int textureUnit)

Implements com.jogamp.opengl.util.stereo.StereoDevice.createRenderer.

Create a new StereoDeviceRenderer instance.
public final void
public float[]
public final FovHVHalves[]
getDefaultFOV()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getDefaultFOV.

Returns the device default FovHVHalves for all supported eyes in natural order, i.e. left and right if supported.
public final int
getEnabledSensorBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getEnabledSensorBits.

Returns the actual used sensor capability bits, e.g. SENSOR_ORIENTATION, SENSOR_POSITION in case the device supports them and if they are enabled.
public int[]
getEyeRenderOrder()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getEyeRenderOrder.

Returns an array of the preferred eye rendering order.
public final StereoDeviceFactory
getFactory()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getFactory.

Return the factory used to create this device.
public final LocationSensorParameter
public int
getMinimumDistortionBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.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.
public final PointImmutable
getPosition()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getPosition.

If operation within a device spanning virtual desktop, returns the device position.
public int
public int
getRequiredRotation()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getRequiredRotation.

Returns the CCW rotation as required by this display device.
public boolean
getSensorsStarted()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSensorsStarted.

Return true if sensors have been started, false otherwise.
public int
public final int
public final DimensionImmutable
getSurfaceSize()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSurfaceSize.

Returns the required surface size in pixel in target space.
public boolean
isValid()

Implements com.jogamp.opengl.util.stereo.StereoDevice.isValid.

Returns true, if instance is created and not disposed, otherwise returns false.
public final void
resetLocationSensorOrigin()

Implements com.jogamp.opengl.util.stereo.StereoDevice.resetLocationSensorOrigin.

Sets the location sensor's origin of this device to the current position.
public void
setSurfacePosition(final int x, final int y)

public final boolean
startSensors(final int
the desired optional sensors
desiredSensorBits
,
final int
the required sensors
requiredSensorBits
)

Implements com.jogamp.opengl.util.stereo.StereoDevice.startSensors.

Start desired and required sensors.
protected boolean
startSensorsImpl(final boolean start, final int desiredSensorBits, final int requiredSensorBits)

public final boolean
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

configback to summary
public final GenericStereoDeviceConfig config
config01Mono01back to summary
public static final GenericStereoDeviceConfig config01Mono01

A mono view configuration DK1, only one eye is supported

config01Mono02back to summary
public static final GenericStereoDeviceConfig config01Mono02

A mono view configuration DK2, only one eye is supported

config02StereoSBS01back to summary
public static final GenericStereoDeviceConfig config02StereoSBS01

A default stereo SBS view configuration DK1

config02StereoSBS02back to summary
public static final GenericStereoDeviceConfig config02StereoSBS02

A default stereo SBS view configuration DK2

config03StereoSBSLense01back to summary
public static final GenericStereoDeviceConfig config03StereoSBSLense01

A default stereo SBS lense view configuration DK1, utilizing similar settings as OculusVR DK1

config03StereoSBSLense02back to summary
public static final GenericStereoDeviceConfig config03StereoSBSLense02

A default stereo SBS lense view configuration DK2, utilizing similar settings as OculusVR DK1

configsback to summary
private static final GenericStereoDeviceConfig[] configs
defaultEyeFovback to summary
private final FovHVHalves[] defaultEyeFov
deviceIndexback to summary
public final int deviceIndex
factoryback to summary
private final StereoDeviceFactory factory
sensorsStartedback to summary
private boolean sensorsStarted
surfacePosback to summary
public final Point surfacePos
usedSensorBitsback to summary
private int usedSensorBits

Constructor Detail

GenericStereoDeviceback to summary
public GenericStereoDevice(final StereoDeviceFactory factory, final int deviceIndex, final StereoDeviceConfig customConfig)

Method Detail

createRendererback to summary
public final StereoDeviceRenderer createRenderer(final int distortionBits, final int textureCount, final float[] eyePositionOffset, final FovHVHalves[] eyeFov, final float pixelsPerDisplayPixel, final int textureUnit)

Implements com.jogamp.opengl.util.stereo.StereoDevice.createRenderer.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.createRenderer.

Create a new StereoDeviceRenderer instance.

Parameters
distortionBits:int

StereoDeviceRenderer distortion bits, e.g. StereoDeviceRenderer#DISTORTION_BARREL, etc, see getRecommendedDistortionBits().

textureCount:int

desired texture count for post-processing, see StereoDeviceRenderer#getTextureCount() and StereoDeviceRenderer#ppAvailable()

eyePositionOffset:float[]

eye position offset, e.g. getDefaultEyePositionOffset().

eyeFov:FovHVHalves[]

FovHVHalves[] field-of-view per eye, e.g. getDefaultFOV(). May contain only one value for monoscopic devices, see getEyeRenderOrder().

Annotations
@Override
disposeback to summary
public final void dispose()

Implements com.jogamp.opengl.util.stereo.StereoDevice.dispose.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.dispose.

Disposes this StereoDevice, if valid.

Implementation shall stop sensors and free all resources.

Annotations
@Override
getDefaultEyePositionOffsetback to summary
public float[] getDefaultEyePositionOffset()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getDefaultEyePositionOffset.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.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)

Annotations
@Override
getDefaultFOVback to summary
public final FovHVHalves[] getDefaultFOV()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getDefaultFOV.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.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!

Annotations
@Override
getEnabledSensorBitsback to summary
public final int getEnabledSensorBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getEnabledSensorBits.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getEnabledSensorBits.

Returns the actual used sensor capability bits, e.g. SENSOR_ORIENTATION, SENSOR_POSITION in case the device supports them and if they are enabled.

Annotations
@Override
getEyeRenderOrderback to summary
public int[] getEyeRenderOrder()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getEyeRenderOrder.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.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.

Annotations
@Override
getFactoryback to summary
public final StereoDeviceFactory getFactory()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getFactory.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getFactory.

Return the factory used to create this device.

Annotations
@Override
getLocationSensorParamsback to summary
public final LocationSensorParameter getLocationSensorParams()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getLocationSensorParams.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getLocationSensorParams.

Returns the LocationSensorParameter of the device if SENSOR_POSITION is supported, otherwise returns null.

Annotations
@Override
getMinimumDistortionBitsback to summary
public int getMinimumDistortionBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getMinimumDistortionBits.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.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.

Annotations
@Override
getPositionback to summary
public final PointImmutable getPosition()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getPosition.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getPosition.

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

Otherwise simply 0/0.

Annotations
@Override
getRecommendedDistortionBitsback to summary
public int getRecommendedDistortionBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getRecommendedDistortionBits.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.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.

Annotations
@Override
getRequiredRotationback to summary
public int getRequiredRotation()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getRequiredRotation.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getRequiredRotation.

Returns the CCW rotation as required by this display device.

Annotations
@Override
getSensorsStartedback to summary
public boolean getSensorsStarted()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSensorsStarted.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getSensorsStarted.

Return true if sensors have been started, false otherwise.

Annotations
@Override
getSupportedDistortionBitsback to summary
public int getSupportedDistortionBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSupportedDistortionBits.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getSupportedDistortionBits.

Returns the supported distortion compensation of the StereoDeviceRenderer, e.g. StereoDeviceRenderer#DISTORTION_BARREL, StereoDeviceRenderer#DISTORTION_CHROMATIC, etc.

Annotations
@Override
getSupportedSensorBitsback to summary
public final int getSupportedSensorBits()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSupportedSensorBits.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getSupportedSensorBits.

Returns the supported sensor capability bits, e.g. SENSOR_ORIENTATION, SENSOR_POSITION of the StereoDevice.

Annotations
@Override
getSurfaceSizeback to summary
public final DimensionImmutable getSurfaceSize()

Implements com.jogamp.opengl.util.stereo.StereoDevice.getSurfaceSize.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.getSurfaceSize.

Returns the required surface size in pixel in target space.

Annotations
@Override
isValidback to summary
public boolean isValid()

Implements com.jogamp.opengl.util.stereo.StereoDevice.isValid.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.isValid.

Returns true, if instance is created and not disposed, otherwise returns false.

Annotations
@Override
resetLocationSensorOriginback to summary
public final void resetLocationSensorOrigin()

Implements com.jogamp.opengl.util.stereo.StereoDevice.resetLocationSensorOrigin.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.resetLocationSensorOrigin.

Sets the location sensor's origin of this device to the current position.

In case SENSOR_POSITION is not supported, this method is a no-op.

Annotations
@Override
setSurfacePositionback to summary
public void setSurfacePosition(final int x, final int y)
startSensorsback to summary
public final boolean startSensors(final int desiredSensorBits, final int requiredSensorBits)

Implements com.jogamp.opengl.util.stereo.StereoDevice.startSensors.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.startSensors.

Start desired and required sensors. Returns true if action was successful, otherwise false.

Method fails if required sensors are not supported.

Parameters
desiredSensorBits:int

the desired optional sensors

requiredSensorBits:int

the required sensors

Annotations
@Override
startSensorsImplback to summary
protected boolean startSensorsImpl(final boolean start, final int desiredSensorBits, final int requiredSensorBits)
stopSensorsback to summary
public final boolean stopSensors()

Implements com.jogamp.opengl.util.stereo.StereoDevice.stopSensors.

Doc from com.jogamp.opengl.util.stereo.StereoDevice.stopSensors.

Stop sensors. Returns true if action was successful, otherwise false.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override