Table of Contents

Class TuringCamera

Namespace
Turing.Core.StereoCore
Assembly
Turing.Core.dll
[ExecuteInEditMode]
[DefaultExecutionOrder(-980)]
[RequireComponent(typeof(Camera))]
public class TuringCamera : MonoBehaviour
Inheritance
Object
Component
Behaviour
MonoBehaviour
TuringCamera
Derived
Inherited Members
MonoBehaviour.IsInvoking()
MonoBehaviour.CancelInvoke()
MonoBehaviour.StopCoroutine(Coroutine)
MonoBehaviour.StopAllCoroutines()
MonoBehaviour.useGUILayout
MonoBehaviour.runInEditMode
Behaviour.enabled
Behaviour.isActiveAndEnabled
Component.GetComponent<T>()
Component.TryGetComponent<T>(out T)
Component.GetComponentInChildren<T>()
Component.GetComponentsInChildren<T>()
Component.GetComponentInParent<T>()
Component.GetComponentsInParent<T>()
Component.GetComponents<T>()
Component.transform
Component.gameObject
Component.tag
Object.GetInstanceID()
Object.GetHashCode()
Object.Instantiate(Object, Vector3, Quaternion)
Object.Instantiate(Object, Vector3, Quaternion, Transform)
Object.Instantiate(Object)
Object.Instantiate(Object, Transform)
Object.Instantiate<T>(T)
Object.Instantiate<T>(T, Vector3, Quaternion)
Object.Instantiate<T>(T, Vector3, Quaternion, Transform)
Object.Instantiate<T>(T, Transform)
Object.Destroy(Object)
Object.DestroyImmediate(Object)
Object.DontDestroyOnLoad(Object)
Object.DestroyObject(Object)
Object.FindObjectsOfType<T>()
Object.FindObjectsByType<T>(FindObjectsSortMode)
Object.FindObjectsByType<T>(FindObjectsInactive, FindObjectsSortMode)
Object.FindObjectOfType<T>()
Object.FindFirstObjectByType<T>()
Object.FindAnyObjectByType<T>()
Object.FindFirstObjectByType<T>(FindObjectsInactive)
Object.FindAnyObjectByType<T>(FindObjectsInactive)
Object.ToString()
Object.name
Object.hideFlags
Extension Methods

Fields

Instance

public static TuringCamera Instance

Field Value

TuringCamera

NearClamp

[Range(0.01, 1)]
[Tooltip("Adjust the near plane cutoff position to your eyes, in order to get rid of the unconfortable view experience when game object might poping out too much")]
public float NearClamp

Field Value

float

ScriptPriority

public const int ScriptPriority = -980

Field Value

int

ThisCam

public static Camera ThisCam

Field Value

Camera

_isFocused

protected bool _isFocused

Field Value

bool

_myProcessId

protected int _myProcessId

Field Value

int

allDisplays

protected List<WindowHandler.DisplayInfo> allDisplays

Field Value

List<WindowHandler.DisplayInfo>

allScreens

protected List<WindowHandler.MyMonitor> allScreens

Field Value

List<WindowHandler.MyMonitor>

cameraMaskLayers

public LayerMask cameraMaskLayers

Field Value

LayerMask

compensationParam

[Space]
[Header("Advance")]
[HideInInspector]
[Tooltip(" 0-5 the larger the more smoother, set to smaller value if eye tracking speed is higher; also has impact on Gray Screen timing if used")]
public float compensationParam

Field Value

float

currentPlatform

public DevicePlatform currentPlatform

Field Value

DevicePlatform

debugMode

[SerializeField]
[Header("Editor")]
[Tooltip("If checked, Turing SDK will display the output and interact with related logs")]
public bool debugMode

Field Value

bool

defaultDistance

public static float defaultDistance

Field Value

float

depthRenderIndex

[SerializeField]
protected int depthRenderIndex

Field Value

int

depthmat

[Space]
[Header("U Series")]
[Header("U1")]
[SerializeField]
protected Material depthmat

Field Value

Material

detectedEDID

protected static string detectedEDID

Field Value

string

enableStereo

[SerializeField]
protected bool enableStereo

Field Value

bool

eyeTrackFOVHor

[HideInInspector]
[Range(10, 60)]
[Tooltip("horizontal for safe tracking region")]
public float eyeTrackFOVHor

Field Value

float

eyeTrackFOVVer

[HideInInspector]
[Range(20, 80)]
[Tooltip("vertical for safe tracking region")]
public float eyeTrackFOVVer

Field Value

float

farDistance

[SerializeField]
protected float farDistance

Field Value

float

fovScaleFactor

[Range(0.5, 3)]
public float fovScaleFactor

Field Value

float

height_m

public static float height_m

Field Value

float

iP

[HideInInspector]
[Space]
[Tooltip("IP of the eye tracking data provider")]
[Header("Device")]
public string iP

Field Value

string

ignoreHeadRotation

[HideInInspector]
[Tooltip("virtual stereo camera's z value is always the same")]
public float ignoreHeadRotation

Field Value

float

leftCamera

public Camera leftCamera

Field Value

Camera

monoToStereoDuration

public float monoToStereoDuration

Field Value

float

nearClipPlaneAdj

protected float nearClipPlaneAdj

Field Value

float

nearDistance

[SerializeField]
protected float nearDistance

Field Value

float

pixelsize_m

protected float pixelsize_m

Field Value

float

port

[HideInInspector]
protected int port

Field Value

int

rig

protected TuringCameraRig rig

Field Value

TuringCameraRig

rightCamera

public Camera rightCamera

Field Value

Camera

showGizmos

[Tooltip("Whether to draw virtual screen and comfort zone in scene view")]
public bool showGizmos

Field Value

bool

stereoBasis

protected static float stereoBasis

Field Value

float

stereoMode

[HideInInspector]
[Tooltip("SideBySide,Mono")]
public TuringCamera.StereoMode stereoMode

Field Value

TuringCamera.StereoMode

stereoScaleFactor

public static float stereoScaleFactor

Field Value

float

stereoStrength

protected float stereoStrength

Field Value

float

stereoToMonoDelay

public float stereoToMonoDelay

Field Value

float

stereoToMonoDuration

public float stereoToMonoDuration

Field Value

float

supportedEDID

protected static List<string> supportedEDID

Field Value

List<string>

thisCam

[Obsolete("this field is Obsolete,use \"ThisCam\" replace it")]
public static Camera thisCam

Field Value

Camera

trackingMethod

[HideInInspector]
[Tooltip("EEServerThread,None")]
public TuringCamera.TrackingMethod trackingMethod

Field Value

TuringCamera.TrackingMethod

trueScreenSize

[HideInInspector]
public float trueScreenSize

Field Value

float

turingCameraU1ExPre

public GameObject turingCameraU1ExPre

Field Value

GameObject

turingCameraU3ExPre

[Header("U3")]
public GameObject turingCameraU3ExPre

Field Value

GameObject

u3ComputeShader

[SerializeField]
protected ComputeShader u3ComputeShader

Field Value

ComputeShader

useStereobasis

[HideInInspector]
[Tooltip("use the following default IPD as the most trustful and stable ipd value")]
public float useStereobasis

Field Value

float

viewDefault

protected Vector3 viewDefault

Field Value

Vector3

viewDistance

[HideInInspector]
[Tooltip("in meter; eg. 0.4m for 16inch; 0.6m for 27inch; 0.8m for 32 inch 1.6m for 65inch")]
public float viewDistance

Field Value

float

width_m

public static float width_m

Field Value

float

winDisplayIdx

protected int winDisplayIdx

Field Value

int

Properties

Camera

Gets the associated Unity Camera.

public Camera Camera { get; }

Property Value

Camera

CameraOffset

Gets the camera's offset in meters.

public Vector3 CameraOffset { get; }

Property Value

Vector3

CameraToWorldMatrix

The transformation matrix from camera to world space.

public Matrix4x4 CameraToWorldMatrix { get; }

Property Value

Matrix4x4

Remarks

This is useful in scenarios such as transforming a 6-DOF trackable target's pose from camera space to world space.

EnableStereo

public bool EnableStereo { get; set; }

Property Value

bool

FarDistance

public float FarDistance { get; }

Property Value

float

NearClipPlaneAdj

public float NearClipPlaneAdj { get; set; }

Property Value

float

NearDistance

public float NearDistance { get; }

Property Value

float

StereoWeight

public float StereoWeight { get; set; }

Property Value

float

WorldScale

The current scale of the world.

public Vector3 WorldScale { get; }

Property Value

Vector3

Remarks

The world scale is computed as the product of the parent camera rig's viewer scale multiplied by the current display scale factor accessible via Turing.DisplayScaleFactor.

ZeroParallaxLocalToWorldMatrix

The world space transformation matrix of the zero parallax (screen) plane.

public Matrix4x4 ZeroParallaxLocalToWorldMatrix { get; }

Property Value

Matrix4x4

ZeroParallaxPlane

The Unity Plane in world space representing the zero parallax (screen) plane.

public Plane ZeroParallaxPlane { get; }

Property Value

Plane

ZeroParallaxPose

The world space pose of the zero parallax (screen) plane.

public Pose ZeroParallaxPose { get; }

Property Value

Pose

Methods

AdjustCameraPosition()

public static void AdjustCameraPosition()

AdjustFOVScale(float)

public virtual void AdjustFOVScale(float fov)

Parameters

fov float

CheckMultiScreen()

protected List<TuringCamera.DetectedScreen> CheckMultiScreen()

Returns

List<TuringCamera.DetectedScreen>

CopyPropertiesToChild(TuringCamera)

protected void CopyPropertiesToChild(TuringCamera child)

Parameters

child TuringCamera

HasFocus()

public bool HasFocus()

Returns

bool

PerspectiveOffCenter(float, float, float, float, float, float)

protected Matrix4x4 PerspectiveOffCenter(float left, float right, float bottom, float top, float near, float far)

Parameters

left float
right float
bottom float
top float
near float
far float

Returns

Matrix4x4

Quit()

public virtual void Quit()

SetFov(float)

public void SetFov(float fov)

Parameters

fov float

SwitchScreen3D(bool)

public virtual void SwitchScreen3D(bool focus)

Parameters

focus bool

SwitchScreenTuring(int)

public void SwitchScreenTuring(int screenIdx)

Parameters

screenIdx int

UpdateEyeProjection(MonoOrStereoscopicEye, Vector3, Vector3, Vector3, Vector3, float, float)

protected void UpdateEyeProjection(Camera.MonoOrStereoscopicEye eye, Vector3 EyePos, Vector3 pa, Vector3 pb, Vector3 pc, float NearClipPlane, float FarClipPlane)

Parameters

eye Camera.MonoOrStereoscopicEye
EyePos Vector3
pa Vector3
pb Vector3
pc Vector3
NearClipPlane float
FarClipPlane float