CVR Camera API¶
Provides wrapped access to the active player camera and portable camera, along with full control over camera rendering settings.
CVR Camera¶
CVR.CVRCamera
Base class for CVR Player Camera and CVR Portable Camera, providing access to common camera settings and functionality.
Static Members¶
Static Properties¶
| Signature | Description |
|---|---|
| CVRPlayerCamera PlayerCamera { get; } | Returns the player camera wrapper |
| CVRPortableCamera PortableCamera { get; } | Returns the portable camera wrapper |
Instance Members¶
Instance Methods¶
| Signature | Description |
|---|---|
| Camera GetCamera(); | Returns the underlying Unity Camera component. Note: The CVRPlayerCamera wraps multiple cameras, so the returned camera can change. Do not cache it. |
| float GetNearClipPlane(); | Gets the near clip plane |
| void SetNearClipPlane(float v); | Sets the near clip plane |
| float GetFarClipPlane(); | Gets the far clip plane |
| void SetFarClipPlane(float v); | Sets the far clip plane |
| bool GetAllowHDR(); | Gets HDR usage |
| void SetAllowHDR(bool v); | Sets HDR usage |
| DepthTextureMode GetDepthTextureMode(); | Gets the depth texture mode |
| void SetDepthTextureMode(DepthTextureMode v); | Sets the depth texture mode |
| bool GetUseOcclusionCulling(); | Gets occlusion culling state |
| void SetUseOcclusionCulling(bool v); | Sets occlusion culling state |
| bool GetAllowMSAA(); | Gets MSAA allowance |
| void SetAllowMSAA(bool v); | Sets MSAA allowance |
| LayerMask GetCullingMask(); | Gets the culling mask |
| void SetCullingMask(LayerMask v); | Sets the culling mask |
| CameraClearFlags GetClearFlags(); | Gets clear flags |
| void SetClearFlags(CameraClearFlags v); | Sets clear flags |
| Color GetBackgroundColor(); | Gets the background color |
| void SetBackgroundColor(Color v); | Sets the background color |
| bool GetLayerCullSpherical(); | Gets spherical layer culling |
| void SetLayerCullSpherical(bool v); | Sets spherical layer culling |
| float[] GetLayerCullDistances(); | Gets layer cull distances |
| void SetLayerCullDistances(float[] arr); | Sets layer cull distances |
| void CopyFrom(Camera source); | Copies camera settings from another Camera |
| ResetToDefault(); | Resets camera settings to default |
| CopyPostProcessing(Camera sourceCamera); | Copies post-processing settings from another camera |
| ClearPostProcessing(); | Clears post-processing settings |
| Vector3 GetEyePosition(Camera.StereoscopicEye eye); | Gets the per-eye world position |
| Quaternion GetEyeRotation(Camera.StereoscopicEye eye); | Gets the per-eye world rotation |
CVR Player Camera¶
CVR.CVRPlayerCamera : CVR.CVRCamera
Provides wrapped access to the active player camera.
Instance Methods¶
| Signature | Description |
|---|---|
| CVRCameraRenderingMode GetRenderingMode(); | Returns the active rendering mode for the player camera. (0:Normal, 1:FakeMultiPass, 2:MockHMD) |
CVR Portable Camera¶
CVR.CVRPortableCamera : CVR.CVRCamera
Provides wrapped access to the portable camera.
Instance Methods¶
| Signature | Description |
|---|---|
| bool IsActive(); | Returns true if the portable camera is open and active |