Public Member Functions | |
void | Initialize (GameObject headPoseRoot, GlassesSettings glassesSettings, SpectatorSettings spectatorSettings) |
Public Attributes | |
GameObject | headPose = null |
The head pose GameObject property. More... | |
bool | showCameras = true |
In-editor toggle for displaying the eye cameras in the runtime Hierarchy. More... | |
Vector3 | posUGBD_UWRLD = Vector3.zero |
The position of the game board reference frame w.r.t. the Unity world-space reference frame. More... | |
Quaternion | rotToUGBD_UWRLD = Quaternion.identity |
The rotation taking points from the Unity world-space reference frame to the game board reference frame. More... | |
float | scaleToUGBD_UWRLD = 1.0f |
The uniform scale factor that takes points from the Unity world-space to the game board reference frame. More... | |
Properties | |
Camera | spectatorCamera [get] |
Camera | cameraTemplate [get] |
The Camera used as a template when creating the eye cameras. More... | |
Camera | leftEyeCamera [get] |
The left eye Camera property. More... | |
Camera | rightEyeCamera [get] |
The right eye Camera property. More... | |
GlassesMirrorMode | glassesMirrorMode [get] |
float | fieldOfView [get, set] |
The Cameras' field of view property. More... | |
float | nearClipPlane [get, set] |
The Cameras' near clip plane property. More... | |
float | farClipPlane [get, set] |
The Cameras' far clip plane property. More... | |
float | aspectRatio [get, set] |
The Cameras' aspect ratio property. More... | |
Private Member Functions | |
void | Awake () |
Awake this instance. More... | |
void | InstantiateEyeCameras (out GameObject leftEye, out GameObject rightEye) |
void | GenerateEyeCameras (out GameObject leftEye, out GameObject rightEye) |
void | ConfigureEyeCameras () |
void | SyncTransform () |
EDITOR-ONLY: Syncs the eye Cameras' transform to the Head Pose when tracking is not available. More... | |
void | OnEnable () |
void | OnDisable () |
void | OnPreRender () |
Configure rendering parameters for the upcoming frame. More... | |
void | OnRenderImage (RenderTexture src, RenderTexture dst) |
Apply post-processing effects to the final image before it is presented. More... | |
IEnumerator | PresentStereoImagesCoroutine () |
void | PresentStereoImages () |
void | SyncFields () |
Syncs the Cameras' fields to the settings. More... | |
void | OnValidate () |
EDITOR-ONLY More... | |
void | ShowHideCameras () |
Show/hide to the eye camerasin the hierarchy. More... | |
Private Attributes | |
bool | useSpectatorCamera |
bool | startedMirroringToOnscreenPreview = false |
IEnumerator | presentStereoImagesCoroutine |
GameObject | leftEye |
The left eye camera GameObject. More... | |
GameObject | rightEye |
The right eye camera GameObject. More... | |
Dictionary< AREyes, Camera > | eyeCameras |
The Camera objects. More... | |
Material | displayBlitShader |
The Material used to store/reference the shader. More... | |
GlassesMirrorMode | previousMirrorMode = GlassesMirrorMode.LeftEye |
SplitStereoTextures | splitStereoTextures = new SplitStereoTextures() |
Static Private Attributes | |
const string | LEFT_EYE_CAMERA_NAME = "Left Eye Camera" |
The name assigned to the dynamically created camera used for rendering the left eye. More... | |
const string | RIGHT_EYE_CAMERA_NAME = "Right Eye Camera" |
The name assigned to the dynamically created camera used for rendering the right eye. More... | |
const string | SHADER_DISPLAY_BLIT = "Tilt Five/Simple Blend Shader" |
The name of the custom shader that blits the rendertextures to the backbuffer. More... | |
Definition at line 80 of file SplitStereoCamera.cs.
|
private |
Awake this instance.
Definition at line 200 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.startedMirroringToOnscreenPreview, and TiltFive.SplitStereoCamera.useSpectatorCamera.
|
private |
Definition at line 320 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoTextures.Initialize(), TiltFive.SplitStereoCamera.leftEyeCamera, TiltFive.SplitStereoTextures.LeftTexture_GLS, TiltFive.SplitStereoTextures.MonoPreviewTex, TiltFive.SplitStereoCamera.rightEyeCamera, TiltFive.SplitStereoTextures.RightTexture_GLS, TiltFive.SplitStereoCamera.spectatorCamera, TiltFive.SplitStereoCamera.splitStereoTextures, and TiltFive.SplitStereoTextures.StereoPreviewTex.
Referenced by TiltFive.SplitStereoCamera.Initialize().
|
private |
Definition at line 305 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.eyeCameras, TiltFive.SplitStereoCamera.headPose, TiltFive.SplitStereoCamera.LEFT_EYE_CAMERA_NAME, TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.RIGHT_EYE_CAMERA_NAME, and TiltFive.SplitStereoCamera.rightEye.
Referenced by TiltFive.SplitStereoCamera.Initialize().
void TiltFive.SplitStereoCamera.Initialize | ( | GameObject | headPoseRoot, |
GlassesSettings | glassesSettings, | ||
SpectatorSettings | spectatorSettings | ||
) |
Definition at line 207 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.cameraTemplate, TiltFive.SplitStereoCamera.ConfigureEyeCameras(), TiltFive.SplitStereoCamera.displayBlitShader, TiltFive.Logging.Log.Error(), TiltFive.SplitStereoCamera.GenerateEyeCameras(), TiltFive.SplitStereoCamera.headPose, TiltFive.SplitStereoCamera.InstantiateEyeCameras(), TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.rightEye, TiltFive.SplitStereoCamera.SHADER_DISPLAY_BLIT, TiltFive.SplitStereoCamera.ShowHideCameras(), TiltFive.SplitStereoCamera.spectatorCamera, TiltFive.SplitStereoCamera.SyncFields(), and TiltFive.SplitStereoCamera.SyncTransform().
Referenced by TiltFive.Glasses.GlassesCore.Reset().
|
private |
Definition at line 256 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.cameraTemplate, TiltFive.GlassesSettings.cloneCameraTemplateChildren, TiltFive.SplitStereoCamera.eyeCameras, TiltFive.SplitStereoCamera.headPose, TiltFive.SplitStereoCamera.LEFT_EYE_CAMERA_NAME, TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.RIGHT_EYE_CAMERA_NAME, and TiltFive.SplitStereoCamera.rightEye.
Referenced by TiltFive.SplitStereoCamera.Initialize().
|
private |
Definition at line 406 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.leftEyeCamera, TiltFive.SplitStereoCamera.presentStereoImagesCoroutine, TiltFive.SplitStereoCamera.rightEye, TiltFive.SplitStereoCamera.rightEyeCamera, and TiltFive.SplitStereoCamera.startedMirroringToOnscreenPreview.
|
private |
Definition at line 388 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.leftEyeCamera, TiltFive.SplitStereoCamera.presentStereoImagesCoroutine, TiltFive.SplitStereoCamera.PresentStereoImagesCoroutine(), TiltFive.SplitStereoCamera.rightEye, and TiltFive.SplitStereoCamera.rightEyeCamera.
|
private |
Configure rendering parameters for the upcoming frame.
Definition at line 456 of file SplitStereoCamera.cs.
References TiltFive.GlassesSettings.farClipPlane, TiltFive.GlassesSettings.fieldOfView, TiltFive.SplitStereoCamera.glassesMirrorMode, TiltFive.DisplaySettings.monoWidthToHeightRatio, TiltFive.GlassesSettings.nearClipPlane, TiltFive.SplitStereoCamera.previousMirrorMode, TiltFive.SplitStereoCamera.scaleToUGBD_UWRLD, TiltFive.SplitStereoCamera.spectatorCamera, TiltFive.SplitStereoCamera.splitStereoTextures, TiltFive.SplitStereoCamera.startedMirroringToOnscreenPreview, TiltFive.DisplaySettings.stereoWidthToHeightRatio, and TiltFive.SplitStereoTextures.ValidateNativeTexturePointers().
|
private |
Apply post-processing effects to the final image before it is presented.
src | The source render texture. |
dst | The destination render texture. |
Definition at line 587 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.glassesMirrorMode, TiltFive.Player.IsConnected(), TiltFive.SplitStereoTextures.MonoPreviewTex, TiltFive.SpectatorSettings.spectatedPlayer, TiltFive.SplitStereoCamera.spectatorCamera, TiltFive.SplitStereoCamera.splitStereoTextures, TiltFive.SplitStereoTextures.StereoPreviewTex, and TiltFive.SplitStereoTextures.SubmitPreviewTextures().
|
private |
EDITOR-ONLY
Definition at line 711 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.rightEye, TiltFive.SplitStereoCamera.ShowHideCameras(), TiltFive.SplitStereoCamera.spectatorCamera, TiltFive.SplitStereoCamera.SyncFields(), and TiltFive.SplitStereoCamera.SyncTransform().
|
private |
Definition at line 650 of file SplitStereoCamera.cs.
References TiltFive.GlassesSettings.fieldOfView, TiltFive.SplitStereoTextures.GetNativeTexturePointers(), TiltFive.SplitStereoCamera.leftEyeCamera, TiltFive.SplitStereoTextures.LeftTexture_GLS, TiltFive.DisplaySettings.monoWidthToHeightRatio, TiltFive.SplitStereoCamera.posUGBD_UWRLD, TiltFive.Display.PresentStereoImages(), TiltFive.SplitStereoCamera.rightEyeCamera, TiltFive.SplitStereoTextures.RightTexture_GLS, TiltFive.SplitStereoCamera.rotToUGBD_UWRLD, TiltFive.SplitStereoCamera.scaleToUGBD_UWRLD, and TiltFive.SplitStereoCamera.splitStereoTextures.
Referenced by TiltFive.SplitStereoCamera.PresentStereoImagesCoroutine().
|
private |
Definition at line 636 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.PresentStereoImages().
Referenced by TiltFive.SplitStereoCamera.OnEnable().
|
private |
Show/hide to the eye camerasin the hierarchy.
Definition at line 731 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.leftEye, TiltFive.SplitStereoCamera.rightEye, and TiltFive.SplitStereoCamera.showCameras.
Referenced by TiltFive.SplitStereoCamera.Initialize(), and TiltFive.SplitStereoCamera.OnValidate().
|
private |
Syncs the Cameras' fields to the settings.
Definition at line 686 of file SplitStereoCamera.cs.
References TiltFive.GlassesSettings.farClipPlane, TiltFive.GlassesSettings.fieldOfView, TiltFive.SplitStereoCamera.leftEyeCamera, TiltFive.DisplaySettings.monoWidthToHeightRatio, TiltFive.GlassesSettings.nearClipPlane, and TiltFive.SplitStereoCamera.rightEyeCamera.
Referenced by TiltFive.SplitStereoCamera.Initialize(), and TiltFive.SplitStereoCamera.OnValidate().
|
private |
EDITOR-ONLY: Syncs the eye Cameras' transform to the Head Pose when tracking is not available.
Definition at line 356 of file SplitStereoCamera.cs.
References TiltFive.SplitStereoCamera.cameraTemplate, TiltFive.SplitStereoCamera.headPose, TiltFive.Glasses.IsTracked(), TiltFive.SplitStereoCamera.leftEye, and TiltFive.SplitStereoCamera.rightEye.
Referenced by TiltFive.SplitStereoCamera.Initialize(), and TiltFive.SplitStereoCamera.OnValidate().
|
private |
The Material used to store/reference the shader.
Definition at line 155 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.Initialize().
|
private |
The Camera objects.
Definition at line 128 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), and TiltFive.SplitStereoCamera.InstantiateEyeCameras().
GameObject TiltFive.SplitStereoCamera.headPose = null |
The head pose GameObject property.
Definition at line 92 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), TiltFive.SplitStereoCamera.Initialize(), TiltFive.SplitStereoCamera.InstantiateEyeCameras(), and TiltFive.SplitStereoCamera.SyncTransform().
|
staticprivate |
The name assigned to the dynamically created camera used for rendering the left eye.
Definition at line 112 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), and TiltFive.SplitStereoCamera.InstantiateEyeCameras().
|
private |
The left eye camera GameObject.
Definition at line 114 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), TiltFive.SplitStereoCamera.Initialize(), TiltFive.SplitStereoCamera.InstantiateEyeCameras(), TiltFive.SplitStereoCamera.OnDisable(), TiltFive.SplitStereoCamera.OnEnable(), TiltFive.SplitStereoCamera.OnValidate(), TiltFive.SplitStereoCamera.ShowHideCameras(), and TiltFive.SplitStereoCamera.SyncTransform().
Vector3 TiltFive.SplitStereoCamera.posUGBD_UWRLD = Vector3.zero |
The position of the game board reference frame w.r.t. the Unity world-space reference frame.
Definition at line 138 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.PresentStereoImages(), and TiltFive.Glasses.GlassesCore.Update().
|
private |
Definition at line 109 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.OnDisable(), and TiltFive.SplitStereoCamera.OnEnable().
|
private |
Definition at line 158 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.OnPreRender().
|
staticprivate |
The name assigned to the dynamically created camera used for rendering the right eye.
Definition at line 119 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), and TiltFive.SplitStereoCamera.InstantiateEyeCameras().
|
private |
The right eye camera GameObject.
Definition at line 121 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.GenerateEyeCameras(), TiltFive.SplitStereoCamera.Initialize(), TiltFive.SplitStereoCamera.InstantiateEyeCameras(), TiltFive.SplitStereoCamera.OnDisable(), TiltFive.SplitStereoCamera.OnEnable(), TiltFive.SplitStereoCamera.OnValidate(), TiltFive.SplitStereoCamera.ShowHideCameras(), and TiltFive.SplitStereoCamera.SyncTransform().
Quaternion TiltFive.SplitStereoCamera.rotToUGBD_UWRLD = Quaternion.identity |
The rotation taking points from the Unity world-space reference frame to the game board reference frame.
Definition at line 144 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.PresentStereoImages(), and TiltFive.Glasses.GlassesCore.Update().
float TiltFive.SplitStereoCamera.scaleToUGBD_UWRLD = 1.0f |
The uniform scale factor that takes points from the Unity world-space to the game board reference frame.
Definition at line 150 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.OnPreRender(), TiltFive.SplitStereoCamera.PresentStereoImages(), and TiltFive.Glasses.GlassesCore.Update().
|
staticprivate |
The name of the custom shader that blits the rendertextures to the backbuffer.
Definition at line 153 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.Initialize().
bool TiltFive.SplitStereoCamera.showCameras = true |
In-editor toggle for displaying the eye cameras in the runtime Hierarchy.
Definition at line 126 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.ShowHideCameras().
|
private |
Definition at line 159 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.ConfigureEyeCameras(), TiltFive.SplitStereoCamera.OnPreRender(), TiltFive.SplitStereoCamera.OnRenderImage(), and TiltFive.SplitStereoCamera.PresentStereoImages().
|
private |
Definition at line 107 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.Awake(), TiltFive.SplitStereoCamera.OnDisable(), and TiltFive.SplitStereoCamera.OnPreRender().
|
private |
Definition at line 93 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.Awake().
|
getset |
The Cameras' aspect ratio property.
Definition at line 191 of file SplitStereoCamera.cs.
|
get |
The Camera used as a template when creating the eye cameras.
Definition at line 90 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.Initialize(), TiltFive.SplitStereoCamera.InstantiateEyeCameras(), TiltFive.SplitStereoCamera.SyncTransform(), TiltFive.Glasses.GlassesCore.Update(), and TiltFive.Glasses.GlassesCore.Validate().
|
getset |
The Cameras' far clip plane property.
Definition at line 183 of file SplitStereoCamera.cs.
|
getset |
The Cameras' field of view property.
Definition at line 167 of file SplitStereoCamera.cs.
|
getprivate |
Definition at line 157 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.OnPreRender(), and TiltFive.SplitStereoCamera.OnRenderImage().
|
get |
The left eye Camera property.
Definition at line 116 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.ConfigureEyeCameras(), TiltFive.SplitStereoCamera.OnDisable(), TiltFive.SplitStereoCamera.OnEnable(), TiltFive.SplitStereoCamera.PresentStereoImages(), TiltFive.SplitStereoCamera.SyncFields(), and TiltFive.Glasses.GlassesCore.Update().
|
getset |
The Cameras' near clip plane property.
Definition at line 175 of file SplitStereoCamera.cs.
|
get |
The right eye Camera property.
Definition at line 123 of file SplitStereoCamera.cs.
Referenced by TiltFive.SplitStereoCamera.ConfigureEyeCameras(), TiltFive.SplitStereoCamera.OnDisable(), TiltFive.SplitStereoCamera.OnEnable(), TiltFive.SplitStereoCamera.PresentStereoImages(), TiltFive.SplitStereoCamera.SyncFields(), and TiltFive.Glasses.GlassesCore.Update().
|
getprivate |