Varjo Native SDK
Varjo_mr.h
Go to the documentation of this file.
1 // Copyright 2019-2022 Varjo Technologies Oy. All rights reserved.
2 
3 #ifndef VARJO_MR_H
4 #define VARJO_MR_H
5 
6 #include "Varjo_export.h"
7 #include "Varjo_types.h"
8 #include "Varjo_types_mr.h"
9 
10 #if defined __cplusplus
11 extern "C" {
12 #endif
13 
39 VARJO_API varjo_Bool varjo_Lock(struct varjo_Session* session, varjo_LockType lockType);
40 
58 VARJO_API void varjo_Unlock(struct varjo_Session* session, varjo_LockType lockType);
59 
71 VARJO_API void varjo_MRSetVideoRender(struct varjo_Session* session, varjo_Bool enabled);
72 
91 VARJO_API void varjo_MRSetVideoDepthEstimation(struct varjo_Session* session, varjo_Bool enabled);
92 
118 VARJO_API void varjo_MRSetVRViewOffset(struct varjo_Session* session, double percentage);
119 
131 VARJO_API void varjo_MRSetChromaKey(struct varjo_Session* session, varjo_Bool enabled);
132 
143 VARJO_API void varjo_MRSetChromaKeyGlobal(struct varjo_Session* session, varjo_Bool enabled);
144 
167 
180 VARJO_DEPRECATED_API void varjo_MRUnlockChromaKeyConfig(struct varjo_Session* session);
181 
191 VARJO_API int32_t varjo_MRGetChromaKeyConfigCount(struct varjo_Session* session);
192 
208 VARJO_API void varjo_MRSetChromaKeyConfig(struct varjo_Session* session, int32_t index, const struct varjo_ChromaKeyConfig* config);
209 
221 VARJO_API struct varjo_ChromaKeyConfig varjo_MRGetChromaKeyConfig(struct varjo_Session* session, int32_t index);
222 
235 VARJO_API void varjo_MRSetEnvironmentCubemapConfig(struct varjo_Session* session, const struct varjo_EnvironmentCubemapConfig* config);
236 
246 VARJO_API struct varjo_EnvironmentCubemapConfig varjo_MRGetEnvironmentCubemapConfig(struct varjo_Session* session);
247 
274 
287 VARJO_DEPRECATED_API void varjo_MRUnlockCameraConfig(struct varjo_Session* session);
288 
299 VARJO_API int32_t varjo_MRGetCameraPropertyModeCount(struct varjo_Session* session, varjo_CameraPropertyType prop);
300 
317 VARJO_API void varjo_MRGetCameraPropertyModes(struct varjo_Session* session, varjo_CameraPropertyType prop, varjo_CameraPropertyMode* modes, int32_t maxSize);
318 
331 
347 VARJO_API void varjo_MRSetCameraPropertyMode(struct varjo_Session* session, varjo_CameraPropertyType type, varjo_CameraPropertyMode mode);
348 
364 
375 VARJO_API int32_t varjo_MRGetCameraPropertyValueCount(struct varjo_Session* session, varjo_CameraPropertyType prop);
376 
422  struct varjo_Session* session, varjo_CameraPropertyType prop, struct varjo_CameraPropertyValue* values, int32_t maxSize);
423 
435 VARJO_API struct varjo_CameraPropertyValue varjo_MRGetCameraPropertyValue(struct varjo_Session* session, varjo_CameraPropertyType type);
436 
453 VARJO_API void varjo_MRSetCameraPropertyValue(struct varjo_Session* session, varjo_CameraPropertyType type, const struct varjo_CameraPropertyValue* value);
454 
467 VARJO_API void varjo_MRResetCameraProperty(struct varjo_Session* session, varjo_CameraPropertyType type);
468 
480 VARJO_API void varjo_MRResetCameraProperties(struct varjo_Session* session);
481 
482 #if defined __cplusplus
483 }
484 #endif
485 #endif // VARJO_MR_H
varjo_MRGetChromaKeyConfigCount
int32_t varjo_MRGetChromaKeyConfigCount(struct varjo_Session *session)
Get number of chroma key config indices supported.
varjo_MRGetCameraPropertyValues
void varjo_MRGetCameraPropertyValues(struct varjo_Session *session, varjo_CameraPropertyType prop, struct varjo_CameraPropertyValue *values, int32_t maxSize)
Get possible manual property values.
varjo_MRSetCameraPropertyValue
void varjo_MRSetCameraPropertyValue(struct varjo_Session *session, varjo_CameraPropertyType type, const struct varjo_CameraPropertyValue *value)
Sets manual property value.
varjo_CameraPropertyValue::value
union varjo_CameraValue value
Value union. Determine from 'type' which element to access.
Definition: Varjo_types_mr.h:140
Varjo_export.h
varjo_MRGetCameraPropertyValueCount
int32_t varjo_MRGetCameraPropertyValueCount(struct varjo_Session *session, varjo_CameraPropertyType prop)
Get amount of possible manual camera property values.
varjo_EnvironmentCubemapConfig::mode
varjo_EnvironmentCubemapMode mode
Cubemap mode.
Definition: Varjo_types_mr.h:70
varjo_CameraPropertyType
int64_t varjo_CameraPropertyType
Camera property types that can be accessed to control video pass through cameras.
Definition: Varjo_types_mr.h:97
varjo_MRGetCameraPropertyValue
struct varjo_CameraPropertyValue varjo_MRGetCameraPropertyValue(struct varjo_Session *session, varjo_CameraPropertyType type)
Returns the latest manual property value set with varjo_MRSetCameraPropertyValue for the given proper...
varjo_MRSetVideoDepthEstimation
void varjo_MRSetVideoDepthEstimation(struct varjo_Session *session, varjo_Bool enabled)
Start depth estimation for the video pass through image.
varjo_MRLockChromaKeyConfig
VARJO_DEPRECATED_API varjo_Bool varjo_MRLockChromaKeyConfig(struct varjo_Session *session)
Try to lock the chroma key configuration.
varjo_Bool
int32_t varjo_Bool
Definition: Varjo_types.h:140
varjo_CameraPropertyConfigType
int64_t varjo_CameraPropertyConfigType
Camera property config type.
Definition: Varjo_types_mr.h:80
varjo_MRSetEnvironmentCubemapConfig
void varjo_MRSetEnvironmentCubemapConfig(struct varjo_Session *session, const struct varjo_EnvironmentCubemapConfig *config)
Set environment cubemap configuration to select parameters for it.
varjo_MRGetChromaKeyConfig
struct varjo_ChromaKeyConfig varjo_MRGetChromaKeyConfig(struct varjo_Session *session, int32_t index)
Get currently applied chroma keying configuration for given index.
varjo_MRGetCameraPropertyModeCount
int32_t varjo_MRGetCameraPropertyModeCount(struct varjo_Session *session, varjo_CameraPropertyType prop)
Get amount of camera property modes.
varjo_CameraPropertyValue::type
varjo_CameraPropertyDataType type
Data type for this value.
Definition: Varjo_types_mr.h:139
varjo_MRUnlockCameraConfig
VARJO_DEPRECATED_API void varjo_MRUnlockCameraConfig(struct varjo_Session *session)
Unlock previously locked camera configuration.
varjo_EnvironmentCubemapConfig
Environment cubemap config structure.
Definition: Varjo_types_mr.h:69
varjo_MRGetCameraPropertyModes
void varjo_MRGetCameraPropertyModes(struct varjo_Session *session, varjo_CameraPropertyType prop, varjo_CameraPropertyMode *modes, int32_t maxSize)
Get available property modes.
Varjo_types_mr.h
varjo_MRSetChromaKeyGlobal
void varjo_MRSetChromaKeyGlobal(struct varjo_Session *session, varjo_Bool enabled)
Enables video pass through and starts chroma keying for all application layers regardless if they hav...
varjo_Lock
varjo_Bool varjo_Lock(struct varjo_Session *session, varjo_LockType lockType)
Try to lock the given lock type.
varjo_MRGetCameraPropertyMode
varjo_CameraPropertyMode varjo_MRGetCameraPropertyMode(struct varjo_Session *session, varjo_CameraPropertyType type)
Returns currently set mode for given property type.
varjo_MRGetEnvironmentCubemapConfig
struct varjo_EnvironmentCubemapConfig varjo_MRGetEnvironmentCubemapConfig(struct varjo_Session *session)
Get current environment cubemap configuration.
Varjo_types.h
varjo_MRSetChromaKey
void varjo_MRSetChromaKey(struct varjo_Session *session, varjo_Bool enabled)
Start chroma keying for the video pass through image.
varjo_MRLockCameraConfig
VARJO_DEPRECATED_API varjo_Bool varjo_MRLockCameraConfig(struct varjo_Session *session)
Try to lock the camera configuration.
varjo_MRSetChromaKeyConfig
void varjo_MRSetChromaKeyConfig(struct varjo_Session *session, int32_t index, const struct varjo_ChromaKeyConfig *config)
Set video chroma keying configuration to select color matcher and setting parameters for it.
varjo_ChromaKeyConfig
Chroma key config structure including type info and actual parameters.
Definition: Varjo_types_mr.h:51
varjo_MRSetVideoRender
void varjo_MRSetVideoRender(struct varjo_Session *session, varjo_Bool enabled)
Start video pass through rendering on the HMD displays.
varjo_MRSetCameraPropertyMode
void varjo_MRSetCameraPropertyMode(struct varjo_Session *session, varjo_CameraPropertyType type, varjo_CameraPropertyMode mode)
Sets property mode.
varjo_MRResetCameraProperty
void varjo_MRResetCameraProperty(struct varjo_Session *session, varjo_CameraPropertyType type)
Resets the camera property mode and manual mode value to defaults.
varjo_MRResetCameraProperties
void varjo_MRResetCameraProperties(struct varjo_Session *session)
Resets all camera properties to the default mode and value.
varjo_MRSetVRViewOffset
void varjo_MRSetVRViewOffset(struct varjo_Session *session, double percentage)
Change virtual camera rendering position between user's eyes and video pass through cameras.
varjo_Unlock
void varjo_Unlock(struct varjo_Session *session, varjo_LockType lockType)
Unlock a previously locked lock.
VARJO_DEPRECATED_API
#define VARJO_DEPRECATED_API
Definition: Varjo_export.h:46
varjo_CameraPropertyMode
int64_t varjo_CameraPropertyMode
Camera property modes that can be set to control video pass through cameras.
Definition: Varjo_types_mr.h:121
varjo_CameraPropertyValue
Camera property value structure including type info and actual value.
Definition: Varjo_types_mr.h:138
varjo_MRUnlockChromaKeyConfig
VARJO_DEPRECATED_API void varjo_MRUnlockChromaKeyConfig(struct varjo_Session *session)
Unlock previously locked chroma key configuration.
varjo_MRGetCameraPropertyConfigType
varjo_CameraPropertyConfigType varjo_MRGetCameraPropertyConfigType(struct varjo_Session *session, varjo_CameraPropertyType prop)
Get manual property config type for given property.
varjo_LockType
int64_t varjo_LockType
Mixed reality lock types.
Definition: Varjo_types_mr.h:17