Unigine::VRMixedReality Class
Header: | #include <UnigineVRMixedReality.h> |
VRMixedReality Class
Enums
BLEND_MASKING_MODE#
CAMERA_PROPERTY_MODE#
CAMERA_PROPERTY_TYPE#
CAMERA_EXPOSURE_TIME#
CAMERA_WHITE_BALANCE#
CAMERA_ISO#
CAMERA_FLICKER_COMPENSATION#
CUBEMAP_MODE#
Name | Description |
---|---|
CUBEMAP_MODE_BEGIN = 0 | The first element to be used for iteration. |
CUBEMAP_MODE_DISABLED = 0 | The cubemap streaming from AR cameras is disabled. |
CUBEMAP_MODE_ENVIRONMENT_OVERLAP = 1 | The environment texture substitutes the sky. |
CUBEMAP_MODE_ENVIRONMENT_PRESET_0 = 2 | The first environment preset defines the way the AR texture is set for the environment. |
CUBEMAP_MODE_ENVIRONMENT_PRESET_1 = 3 | The second environment preset defines the way the AR texture is set for the environment. |
CUBEMAP_MODE_ENVIRONMENT_PRESET_2 = 4 | The third environment preset defines the way the AR texture is set for the environment. |
CUBEMAP_MODE_END = 4 | The last element to be used for iteration. |
OVERRIDE_COLOR_CORRECTION_MODE#
EVENT_TYPE#
Members
void setChromaKeyEnabled ( bool enabled ) #
Console: vr_mixed_reality_chroma_key_enabled
Sets a new value indicating if chroma keying is enabled.
Arguments
- bool enabled - Set true to enable chroma keying; false - to disable it. The default value is false.
bool isChromaKeyEnabled() const#
Console: vr_mixed_reality_chroma_key_enabled
Returns the current value indicating if chroma keying is enabled.
Return value
true if chroma keying is enabled; otherwise false. The default value is false.void setDepthTestEnabled ( bool enabled ) #
Console: vr_mixed_reality_depth_test_enabled
Sets a new value indicating if depth testing is enabled.
Arguments
- bool enabled - Set true to enable depth testing; false - to disable it. The default value is false.
bool isDepthTestEnabled() const#
Console: vr_mixed_reality_depth_test_enabled
Returns the current value indicating if depth testing is enabled.
Return value
true if depth testing is enabled; otherwise false. The default value is false.void setAlphaBlendEnabled ( bool enabled ) #
Console: vr_mixed_reality_alpha_blend_enabled
Sets a new value indicating if alpha blending is enabled. This option is used for blending VR and AR images using the alpha channel.
Arguments
- bool enabled - Set true to enable alpha blending; false - to disable it. The default value is false.
bool isAlphaBlendEnabled() const#
Console: vr_mixed_reality_alpha_blend_enabled
Returns the current value indicating if alpha blending is enabled. This option is used for blending VR and AR images using the alpha channel.
Return value
true if alpha blending is enabled; otherwise false. The default value is false.void setVideoEnabled ( bool enabled ) #
Console: vr_mixed_reality_video_enabled
Sets a new value indicating if the video signal from the real-world view from the front-facing HMD-mounted cameras is enabled. The real-world view is used for combining virtual and real-world elements to create an immersive experience in mixed reality.
Arguments
- bool enabled - Set true to enable the real-world view from the front-facing HMD-mounted cameras; false - to disable it. The default value is false.
bool isVideoEnabled() const#
Console: vr_mixed_reality_video_enabled
Returns the current value indicating if the video signal from the real-world view from the front-facing HMD-mounted cameras is enabled. The real-world view is used for combining virtual and real-world elements to create an immersive experience in mixed reality.
Return value
true if the real-world view from the front-facing HMD-mounted cameras is enabled; otherwise false. The default value is false.void setDepthTestRangeEnabled ( bool enabled ) #
Sets a new value indicating if the depth testing range is enabled. Use the depth test range (Depth Test Near Z, Depth Test Far Z) to control the range for which the depth test is evaluated.
Arguments
- bool enabled - Set true to enable the depth testing range; false - to disable it. The default value is false.
bool isDepthTestRangeEnabled() const#
Returns the current value indicating if the depth testing range is enabled. Use the depth test range (Depth Test Near Z, Depth Test Far Z) to control the range for which the depth test is evaluated.
Return value
true if the depth testing range is enabled; otherwise false. The default value is false.void setDepthTestRange ( const Math::vec2& range ) #
Console: vr_mixed_reality_depth_test_range
Sets a new depth testing range as a two-component vector.
Arguments
- const
Math::vec2& range - The depth testing range.
vec2(0.0f, 1.0f) - default value
Math::vec2 getDepthTestRange() const#
Console: vr_mixed_reality_depth_test_range
Returns the current depth testing range as a two-component vector.
Return value
Current depth testing range.vec2(0.0f, 1.0f) - default value
getChromaKeyConfigNum() const#
Returns the current number of chroma key config indices supported. The maximum index will be count-1.
Return value
Current number of chroma key config indices.void setBlendMaskingMode ( VRMixedReality::BLEND_MASKING_MODE mode ) #
Console: vr_mixed_reality_blend_masking_mode
Sets a new mode of the Blend Control Mask that can be used to extend or restrict the chroma key mask or to control the depth testing against the estimated video depth.
Arguments
- VRMixedReality::BLEND_MASKING_MODE mode - The masking mode. One of the following values:
- 0 - masking mode is disabled. (by default)
- 1 - show the video pass-through image (VST) in the mask. Can be used with chroma key.
- 2 - show VR in the mask. Can be used with chroma key.
- 3 - show VR in the mask and chroma elsewhere. Requires chroma key.
VRMixedReality::BLEND_MASKING_MODE getBlendMaskingMode() const#
Console: vr_mixed_reality_blend_masking_mode
Returns the current mode of the Blend Control Mask that can be used to extend or restrict the chroma key mask or to control the depth testing against the estimated video depth.
Return value
Current masking mode. One of the following values:- 0 - masking mode is disabled. (by default)
- 1 - show the video pass-through image (VST) in the mask. Can be used with chroma key.
- 2 - show VR in the mask. Can be used with chroma key.
- 3 - show VR in the mask and chroma elsewhere. Requires chroma key.
void setBlendMaskingDebugEnabled ( bool enabled ) #
Sets a new value indicating if blend masking debug visualization is enabled.
Arguments
- bool enabled - Set true to enable blend masking debug visualization; false - to disable it. The default value is false.
bool isBlendMaskingDebugEnabled() const#
Returns the current value indicating if blend masking debug visualization is enabled.
Return value
true if blend masking debug visualization is enabled; otherwise false. The default value is false.bool isBlendMaskingUsed() const#
Returns the current value indicating if the Blend Control Mask is used to extend or restrict the chroma key mask or to control the depth testing against the estimated video depth.
Return value
true if the blend mask is used; otherwise false.Ptr<Texture> getCurrentBlendMaskColorBuffer() const#
Returns the current image representing the current color buffer of the Blend Control Mask.
Return value
Current color buffer.void setCameraExposureTimeRaw ( ) #
Sets a new exposure time value for the camera.
Arguments
- raw - The exposure time, in frames per second (e.g. 90.0 -> ~11ms).
getCameraExposureTimeRaw() const#
Returns the current exposure time value for the camera.
Return value
Current exposure time, in frames per second (e.g. 90.0 -> ~11ms).void setCameraExposureTime ( VRMixedReality::CAMERA_EXPOSURE_TIME time ) #
Sets a new exposure time value that is valid for the connected device.
Arguments
- VRMixedReality::CAMERA_EXPOSURE_TIME time - The valid exposure time value for the connected device. One of the following values:
- 0 - exposure time is not specified
- 1 - exposure time value equal to 91 K
- 2 - exposure time value equal to 125 K
- 3 - exposure time value equal to 250 K
- 4 - exposure time value equal to 500 K
- 5 - exposure time value equal to 1000 K (by default)
- 6 - exposure time value equal to 2000 K
- 7 - exposure time value equal to 4000 K
- 8 - exposure time value equal to 8000 K
VRMixedReality::CAMERA_EXPOSURE_TIME getCameraExposureTime() const#
Returns the current exposure time value that is valid for the connected device.
Return value
Current valid exposure time value for the connected device. One of the following values:- 0 - exposure time is not specified
- 1 - exposure time value equal to 91 K
- 2 - exposure time value equal to 125 K
- 3 - exposure time value equal to 250 K
- 4 - exposure time value equal to 500 K
- 5 - exposure time value equal to 1000 K (by default)
- 6 - exposure time value equal to 2000 K
- 7 - exposure time value equal to 4000 K
- 8 - exposure time value equal to 8000 K
void setCameraExposureTimeMode ( VRMixedReality::CAMERA_PROPERTY_MODE mode ) #
Sets a new exposure adjustment mode for the camera.
Arguments
- VRMixedReality::CAMERA_PROPERTY_MODE mode - The exposure adjustment mode. One of the following values:
- 0 - exposure adjustment is disabled
- 1 - automatic exposure adjustment (by default)
- 2 - manual exposure adjustment
VRMixedReality::CAMERA_PROPERTY_MODE getCameraExposureTimeMode() const#
Returns the current exposure adjustment mode for the camera.
Return value
Current exposure adjustment mode. One of the following values:- 0 - exposure adjustment is disabled
- 1 - automatic exposure adjustment (by default)
- 2 - manual exposure adjustment
void setCameraWhiteBalanceRaw ( ) #
Sets a new white balance correction value that is valid for the connected device.
Arguments
- raw - The color temperature value.
getCameraWhiteBalanceRaw() const#
Returns the current white balance correction value that is valid for the connected device.
Return value
Current color temperature value.void setCameraWhiteBalance ( VRMixedReality::CAMERA_WHITE_BALANCE balance ) #
Sets a new white balance correction value that is valid for the connected device.
Arguments
- VRMixedReality::CAMERA_WHITE_BALANCE balance - The color temperature value. One of the following values:
- 0 - value is not specified.
- 1 - white balance value equal to 2000 K
- 2 - white balance value equal to 3000 K
- 3 - white balance value equal to 3500 K
- 4 - white balance value equal to 4200 K
- 5 - white balance value equal to 5000 K
- 6 - white balance value equal to 5400 K
- 7 - white balance value equal to 6500 K (by default)
- 8 - white balance value equal to 8000 K
- 9 - white balance value equal to 12000 K
VRMixedReality::CAMERA_WHITE_BALANCE getCameraWhiteBalance() const#
Returns the current white balance correction value that is valid for the connected device.
Return value
Current color temperature value. One of the following values:- 0 - value is not specified.
- 1 - white balance value equal to 2000 K
- 2 - white balance value equal to 3000 K
- 3 - white balance value equal to 3500 K
- 4 - white balance value equal to 4200 K
- 5 - white balance value equal to 5000 K
- 6 - white balance value equal to 5400 K
- 7 - white balance value equal to 6500 K (by default)
- 8 - white balance value equal to 8000 K
- 9 - white balance value equal to 12000 K
void setCameraWhiteBalanceMode ( VRMixedReality::CAMERA_PROPERTY_MODE mode ) #
Sets a new white balance adjustment mode for the camera.
Arguments
- VRMixedReality::CAMERA_PROPERTY_MODE mode - The white balance adjustment mode. One of the following values:
- 0 - white balance adjustment is disabled
- 1 - automatic white balance adjustment (by default)
- 2 - manual white balance adjustment
VRMixedReality::CAMERA_PROPERTY_MODE getCameraWhiteBalanceMode() const#
Returns the current white balance adjustment mode for the camera.
Return value
Current white balance adjustment mode. One of the following values:- 0 - white balance adjustment is disabled
- 1 - automatic white balance adjustment (by default)
- 2 - manual white balance adjustment
void setCameraISORaw ( ) #
Sets a new ISO value that is valid for the connected device.
Arguments
- isoraw - The ISO value (e.g., "200" -> ISO200).
getCameraISORaw() const#
Returns the current ISO value that is valid for the connected device.
Return value
Current ISO value (e.g., "200" -> ISO200).void setCameraISO ( VRMixedReality::CAMERA_ISO iso ) #
Console: vr_mixed_reality_camera_iso
Sets a new ISO value for the camera.
Arguments
- VRMixedReality::CAMERA_ISO iso - The ISO value. One of the following values:
- 0 - value is not specified
- 1 - ISO value equal to 100
- 2 - ISO value equal to 200
- 3 - ISO value equal to 400
- 4 - ISO value equal to 800 (by default)
- 5 - ISO value equal to 1600
- 6 - ISO value equal to 3200
- 7 - ISO value equal to 6400
VRMixedReality::CAMERA_ISO getCameraISO() const#
Console: vr_mixed_reality_camera_iso
Returns the current ISO value for the camera.
Return value
Current ISO value. One of the following values:- 0 - value is not specified
- 1 - ISO value equal to 100
- 2 - ISO value equal to 200
- 3 - ISO value equal to 400
- 4 - ISO value equal to 800 (by default)
- 5 - ISO value equal to 1600
- 6 - ISO value equal to 3200
- 7 - ISO value equal to 6400
void setCameraISOMode ( VRMixedReality::CAMERA_PROPERTY_MODE isomode ) #
Console: vr_mixed_reality_camera_iso_mode
Sets a new ISO adjustment mode for the camera.
Arguments
- VRMixedReality::CAMERA_PROPERTY_MODE isomode - The ISO adjustment mode. One of the following values:
- 0 - ISO adjustment is disabled
- 1 - automatic ISO adjustment (by default)
- 2 - manual ISO adjustment
VRMixedReality::CAMERA_PROPERTY_MODE getCameraISOMode() const#
Console: vr_mixed_reality_camera_iso_mode
Returns the current ISO adjustment mode for the camera.
Return value
Current ISO adjustment mode. One of the following values:- 0 - ISO adjustment is disabled
- 1 - automatic ISO adjustment (by default)
- 2 - manual ISO adjustment
void setCameraFlickerCompensationRaw ( ) #
Sets a new flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. For example, in most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.
Arguments
- raw - The flicker compensation, in Hz.
getCameraFlickerCompensationRaw() const#
Returns the current flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. For example, in most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.
Return value
Current flicker compensation, in Hz.void setCameraFlickerCompensation ( VRMixedReality::CAMERA_FLICKER_COMPENSATION compensation ) #
Sets a new flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. Fo example, in most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.
Arguments
- VRMixedReality::CAMERA_FLICKER_COMPENSATION compensation - The flicker compensation. One of the following values:
- 0 - flicker compensation value is not specified.
- 1 - flicker compensation value equal to 50 Hz. (by default)
- 2 - flicker compensation value equal to 60 Hz.
VRMixedReality::CAMERA_FLICKER_COMPENSATION getCameraFlickerCompensation() const#
Returns the current flicker compensation value for the camera. This is useful when using the HMD indoors with mostly artificial light bulbs, which flicker at the frequency of 50Hz or 60Hz and can cause visual flicker artifacts on the video see through image. The correct setting depends on the underlying power grid's frequency. Fo example, in most parts of Africa/Asia/Australia/Europe the frequency is 50 Hz and in most parts of North and South America 60 Hz.
Return value
Current flicker compensation. One of the following values:- 0 - flicker compensation value is not specified.
- 1 - flicker compensation value equal to 50 Hz. (by default)
- 2 - flicker compensation value equal to 60 Hz.
getCameraMinSharpness() const#
Returns the current minimum possible value for the camera sharpness.
Return value
Current minimum possible value for the camera sharpness.getCameraMaxSharpness() const#
Returns the current maximum possible value for the camera sharpness.
Return value
Current maximum possible value for the camera sharpness.void setCameraSharpness ( ) #
Console: vr_mixed_reality_camera_sharpness
Sets a new sharpness filter power value for the camera.
Arguments
- sharpness - The sharpness filter power value: lowest value corresponds to small amount of filtering and the highest value corresponds to the largest amount of filtering.
Range of values: [0, 10]. The default value is : 0.
getCameraSharpness() const#
Console: vr_mixed_reality_camera_sharpness
Returns the current sharpness filter power value for the camera.
Return value
Current sharpness filter power value: lowest value corresponds to small amount of filtering and the highest value corresponds to the largest amount of filtering.Range of values: [0, 10]. The default value is : 0.
void setViewOffset ( ) #
Console: vr_mixed_reality_view_offset
Sets a new eyes view offset.
Arguments
- offset - The view offset.
Range of values: [0.0, 1.0]. The default value is : 0.0.
getViewOffset() const#
Console: vr_mixed_reality_view_offset
Returns the current eyes view offset.
Return value
Current view offset.Range of values: [0.0, 1.0]. The default value is : 0.0.
void setMarkerTrackingEnabled ( bool enabled ) #
Sets a new value indicating if marker tracking is enabled.
Arguments
- bool enabled - Set true to enable marker tracking; false - to disable it. The default value is false.
bool isMarkerTrackingEnabled() const#
Returns the current value indicating if marker tracking is enabled.
Return value
true if marker tracking is enabled; otherwise false. The default value is false.getNumMarkerObjectVisible() const#
Returns the current number of visible marker objects.
Return value
Current number of visible marker objects.void setCubemapMode ( VRMixedReality::CUBEMAP_MODE mode ) #
Console: vr_mixed_reality_cubemap_mode
Sets a new mode defining the way the AR texture is set for the environment.
Arguments
- VRMixedReality::CUBEMAP_MODE mode - The cubemap mode. One of the following values:
- 0 - cubemap streaming from AR cameras is disabled.
- 1 - environment texture substitutes the sky.
- 2 - the first environment preset defines the way the AR texture is set for the environment. (by default)
- 3 - the second environment preset defines the way the AR texture is set for the environment.
- 4 - the third environment preset defines the way the AR texture is set for the environment.
VRMixedReality::CUBEMAP_MODE getCubemapMode() const#
Console: vr_mixed_reality_cubemap_mode
Returns the current mode defining the way the AR texture is set for the environment.
Return value
Current cubemap mode. One of the following values:- 0 - cubemap streaming from AR cameras is disabled.
- 1 - environment texture substitutes the sky.
- 2 - the first environment preset defines the way the AR texture is set for the environment. (by default)
- 3 - the second environment preset defines the way the AR texture is set for the environment.
- 4 - the third environment preset defines the way the AR texture is set for the environment.
void setCubemapGGXQuality ( Render::GGX_MIPMAPS_QUALITY ggxquality ) #
Console: vr_mixed_reality_cubemap_ggx_quality
Sets a new quality of the generated GGX mips for the AR cubemap.
Arguments
- Render::GGX_MIPMAPS_QUALITY ggxquality - The quality of the GGX mipmaps. One of the following values:
- 0 - low
- 1 - medium (by default)
- 2 - high
- 3 - ultra
Render::GGX_MIPMAPS_QUALITY getCubemapGGXQuality() const#
Console: vr_mixed_reality_cubemap_ggx_quality
Returns the current quality of the generated GGX mips for the AR cubemap.
Return value
Current quality of the GGX mipmaps. One of the following values:- 0 - low
- 1 - medium (by default)
- 2 - high
- 3 - ultra
void setOverrideColorCorrectionMode ( VRMixedReality::OVERRIDE_COLOR_CORRECTION_MODE mode ) #
Sets a new color correction mode for the stream from the AR cameras.
Arguments
- VRMixedReality::OVERRIDE_COLOR_CORRECTION_MODE mode - The color correction mode. One of the following values:
- 0 - correction is disabled. (by default)
- 1 - exposure correction for the stream from the AR cameras.
- 2 - exposure and white balance correction for the stream.
VRMixedReality::OVERRIDE_COLOR_CORRECTION_MODE getOverrideColorCorrectionMode() const#
Returns the current color correction mode for the stream from the AR cameras.
Return value
Current color correction mode. One of the following values:- 0 - correction is disabled. (by default)
- 1 - exposure correction for the stream from the AR cameras.
- 2 - exposure and white balance correction for the stream.
void applySettings ( ) #
Updates the mixed reality settings to the current settings.bool isChromaKeyConfigEnabled ( int index ) const#
Returns the current value indicating if the chroma key configuration with the specified index is enabled.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
Return value
1 the chroma key configuration is enabled; otherwise, 0.void setChromaKeyConfigEnabled ( int index, bool enabled ) #
Sets a new value indicating if the chroma key configuration with the specified index is enabled.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
- bool enabled - 1 to enable the chroma key configuration; 0 to disable it.
Math::vec3 getChromaKeyConfigFalloff ( int index ) const#
Returns the current tolerance falloff values for HSV components of the chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
Return value
Current tolerance falloff values for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].void setChromaKeyConfigFalloff ( int index, const Math::vec3 & falloff ) #
Sets new tolerance falloff values for HSV components of the chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
- const Math::vec3 & falloff - New tolerance falloff values to be set for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].
Math::vec3 getChromaKeyConfigTargetColor ( int index ) const#
Returns the current chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
Return value
Current chroma key target color in HSV colorspace. The range for each component is [0.0; 1.0].void setChromaKeyConfigTargetColor ( int index, const Math::vec3 & target_color ) #
Sets a new chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
- const Math::vec3 & target_color - New chroma key target color to be set in HSV colorspace. The range for each component is [0.0; 1.0].
Math::vec3 getChromaKeyConfigTolerance ( int index ) const#
Returns the current tolerance values for HSV components of the chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
Return value
Current tolerance values for HSV components of the chroma key target color. The range for each component is [0.0; 1.0].void setChromaKeyConfigTolerance ( int index, const Math::vec3 & tolerance ) #
Sets new tolerance values for HSV components of the chroma key target color.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
- const Math::vec3 & tolerance - New tolerance values for HSV components of the chroma key target color to be set. The range for each component is [0.0; 1.0].
void applyChromaKeySettings ( int index ) const#
Updates the settings of the chroma key configuration with the specified index to the current settings.Arguments
- int index - Chroma key config index in the range from 0 to config count - 1.
Vector<int> getCameraSupportedRawExposureTimes ( ) const#
Returns a vector containing the exposure time values that are set as valid for the connected device.Return value
The vector containing the exposure time values.Vector<int> getCameraSupportedRawWhiteBalances ( ) const#
Returns a vector containing the white balance values that are set as valid for the connected device.Return value
The vector containing the white balance values.Vector<int> getCameraSupportedRawISO ( ) const#
Returns a vector containing the ISO values that are set as valid for the connected device.Return value
The vector containing the ISO values.Vector<int> getCameraSupportedRawFlickerCompensations ( ) const#
Returns a vector containing the flicker compensation values that are set as valid for the connected device.Return value
The vector containing the flicker compensation values.Ptr<VRMarkerObject> getMarkerObject ( short index ) const#
Returns the marker object with the specified index.Arguments
- short index - Marker object index.
Return value
Marker object.Ptr<VRMarkerObject> getMarkerObjectByID ( short marker_id ) const#
Returns the marker object with the specified ID.Arguments
- short marker_id - Marker object ID.
Return value
Marker object.Last update:
2023-11-08
Help improve this article
Was this article helpful?
(or select a word/phrase and press Ctrl+Enter)