Package com.jogamp.opengl.util.stereo
Interface StereoDevice
-
public interface StereoDeviceInterface describing a native stereoscopic device
-
-
Field Summary
Fields Modifier and Type Field Description static booleanDEBUGstatic booleanDUMP_DATAstatic intSENSOR_ORIENTATIONSensor Bit: Orientation trackingstatic intSENSOR_POSITIONSensor Bit: Positional trackingstatic intSENSOR_YAW_CORRECTIONSensor Bit: Yaw correction
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description StereoDeviceRenderercreateRenderer(int distortionBits, int textureCount, com.jogamp.math.Vec3f eyePositionOffset, com.jogamp.math.FovHVHalves[] eyeFov, float pixelsPerDisplayPixel, int textureUnit)Create a newStereoDeviceRendererinstance.voiddispose()Disposes thisStereoDevice, ifvalid.com.jogamp.math.Vec3fgetDefaultEyePositionOffset()Return the device default eye position offset for#createRenderer(int, int, Vec3f, FovHVHalves[], float).com.jogamp.math.FovHVHalves[]getDefaultFOV()Returns the device defaultFovHVHalvesfor all supported eyes in natural order, i.e.intgetEnabledSensorBits()Returns the actual used sensor capability bits, e.g.int[]getEyeRenderOrder()Returns an array of the preferred eye rendering order.StereoDeviceFactorygetFactory()Return the factory used to create this device.LocationSensorParametergetLocationSensorParams()Returns theLocationSensorParameterof the device ifSENSOR_POSITIONissupported, otherwise returnsnull.intgetMinimumDistortionBits()Returns the minimum distortion compensation bits as required by theStereoDeviceRenderer, e.g.PointImmutablegetPosition()If operation within a device spanning virtual desktop, returns the device position.intgetRecommendedDistortionBits()Returns the recommended distortion compensation bits for theStereoDeviceRenderer, e.g.intgetRequiredRotation()Returns the CCW rotation as required by this display device.booleangetSensorsStarted()Return true if sensors have been started, false otherwise.intgetSupportedDistortionBits()Returns the supported distortion compensation of theStereoDeviceRenderer, e.g.intgetSupportedSensorBits()Returns the supported sensor capability bits, e.g.DimensionImmutablegetSurfaceSize()Returns the required surface size in pixel in target space.booleanisValid()voidresetLocationSensorOrigin()Sets the location sensor's origin of this device to the current position.booleanstartSensors(int desiredSensorBits, int requiredSensorBits)Start desired and required sensors.booleanstopSensors()Stop sensors.
-
-
-
Field Detail
-
DEBUG
static final boolean DEBUG
-
DUMP_DATA
static final boolean DUMP_DATA
-
SENSOR_ORIENTATION
static final int SENSOR_ORIENTATION
Sensor Bit: Orientation tracking- See Also:
- Constant Field Values
-
SENSOR_YAW_CORRECTION
static final int SENSOR_YAW_CORRECTION
Sensor Bit: Yaw correction- See Also:
- Constant Field Values
-
SENSOR_POSITION
static final int SENSOR_POSITION
Sensor Bit: Positional tracking- See Also:
- Constant Field Values
-
-
Method Detail
-
getFactory
StereoDeviceFactory getFactory()
Return the factory used to create this device.
-
dispose
void dispose()
-
isValid
boolean isValid()
-
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 in target space.
-
getRequiredRotation
int getRequiredRotation()
Returns the CCW rotation as required by this display device.
-
getDefaultEyePositionOffset
com.jogamp.math.Vec3f getDefaultEyePositionOffset()
Return the device default eye position offset for#createRenderer(int, int, Vec3f, FovHVHalves[], float).Result is an array of float values for
- right (positive)
- up (positive)
- forward (negative)
- Returns:
-
getDefaultFOV
com.jogamp.math.FovHVHalves[] getDefaultFOV()
Returns the device defaultFovHVHalvesfor 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!
-
getLocationSensorParams
LocationSensorParameter getLocationSensorParams()
Returns theLocationSensorParameterof the device ifSENSOR_POSITIONissupported, otherwise returnsnull.
-
resetLocationSensorOrigin
void resetLocationSensorOrigin()
Sets the location sensor's origin of this device to the current position.In case
SENSOR_POSITIONis notsupported, this method is a no-op.
-
startSensors
boolean startSensors(int desiredSensorBits, int requiredSensorBits)Start desired and required sensors. Returns true if action was successful, otherwise false.Method fails if required sensors are not
supported.- Parameters:
desiredSensorBits- the desired optional sensorsrequiredSensorBits- the required sensors- See Also:
stopSensors(),getSensorsStarted(),getSupportedSensorBits(),getEnabledSensorBits()
-
stopSensors
boolean stopSensors()
Stop sensors. Returns true if action was successful, otherwise false.
-
getSensorsStarted
boolean getSensorsStarted()
Return true if sensors have been started, false otherwise.
-
getSupportedSensorBits
int getSupportedSensorBits()
Returns the supported sensor capability bits, e.g.SENSOR_ORIENTATION,SENSOR_POSITIONof theStereoDevice.
-
getEnabledSensorBits
int getEnabledSensorBits()
Returns the actual used sensor capability bits, e.g.SENSOR_ORIENTATION,SENSOR_POSITIONin case thedevice supportsthem and if they are enabled.
-
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 of theStereoDeviceRenderer, e.g.StereoDeviceRenderer.DISTORTION_BARREL,StereoDeviceRenderer.DISTORTION_CHROMATIC, etc.
-
getRecommendedDistortionBits
int getRecommendedDistortionBits()
Returns the recommended distortion compensation bits for theStereoDeviceRenderer, e.g.StereoDeviceRenderer.DISTORTION_BARREL,StereoDeviceRenderer.DISTORTION_CHROMATICStereoDeviceRenderer.DISTORTION_VIGNETTE.User shall use the recommended distortion compensation to achieve a distortion free view.
-
getMinimumDistortionBits
int getMinimumDistortionBits()
Returns the minimum distortion compensation bits as required by theStereoDeviceRenderer, e.g.StereoDeviceRenderer.DISTORTION_BARRELin case the stereoscopic display uses [a]spherical lenses.Minimum distortion compensation bits are being enforced by the
StereoDeviceRenderer.
-
createRenderer
StereoDeviceRenderer createRenderer(int distortionBits, int textureCount, com.jogamp.math.Vec3f eyePositionOffset, com.jogamp.math.FovHVHalves[] eyeFov, float pixelsPerDisplayPixel, int textureUnit)
Create a newStereoDeviceRendererinstance.- Parameters:
distortionBits-StereoDeviceRendererdistortion bits, e.g.StereoDeviceRenderer.DISTORTION_BARREL, etc, seegetRecommendedDistortionBits().textureCount- desired texture count for post-processing, seeStereoDeviceRenderer.getTextureCount()andStereoDeviceRenderer.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, seegetEyeRenderOrder().pixelsPerDisplayPixel-textureUnit-- Returns:
-
-