Class TuringCamera
- Namespace
- Turing.Core.StereoCore
- Assembly
- Turing.Core.dll
[ExecuteInEditMode]
[DefaultExecutionOrder(-980)]
[RequireComponent(typeof(Camera))]
public class TuringCamera : MonoBehaviour
- Inheritance
-
ObjectComponentBehaviourMonoBehaviourTuringCamera
- Derived
- Inherited Members
-
MonoBehaviour.IsInvoking()MonoBehaviour.CancelInvoke()MonoBehaviour.StopCoroutine(Coroutine)MonoBehaviour.StopAllCoroutines()MonoBehaviour.useGUILayoutMonoBehaviour.runInEditModeBehaviour.enabledBehaviour.isActiveAndEnabledComponent.GetComponent<T>()Component.TryGetComponent<T>(out T)Component.GetComponentInChildren<T>()Component.GetComponentsInChildren<T>()Component.GetComponentInParent<T>()Component.GetComponentsInParent<T>()Component.GetComponents<T>()Component.transformComponent.gameObjectComponent.tagObject.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.nameObject.hideFlags
- Extension Methods
Fields
Instance
public static TuringCamera Instance
Field Value
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
ScriptPriority
public const int ScriptPriority = -980
Field Value
ThisCam
public static Camera ThisCam
Field Value
- Camera
_isFocused
protected bool _isFocused
Field Value
_myProcessId
protected int _myProcessId
Field Value
allDisplays
protected List<WindowHandler.DisplayInfo> allDisplays
Field Value
allScreens
protected List<WindowHandler.MyMonitor> allScreens
Field Value
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
currentPlatform
public DevicePlatform currentPlatform
Field Value
debugMode
[SerializeField]
[Header("Editor")]
[Tooltip("If checked, Turing SDK will display the output and interact with related logs")]
public bool debugMode
Field Value
defaultDistance
public static float defaultDistance
Field Value
depthRenderIndex
[SerializeField]
protected int depthRenderIndex
Field Value
depthmat
[Space]
[Header("U Series")]
[Header("U1")]
[SerializeField]
protected Material depthmat
Field Value
- Material
detectedEDID
protected static string detectedEDID
Field Value
enableStereo
[SerializeField]
protected bool enableStereo
Field Value
eyeTrackFOVHor
[HideInInspector]
[Range(10, 60)]
[Tooltip("horizontal for safe tracking region")]
public float eyeTrackFOVHor
Field Value
eyeTrackFOVVer
[HideInInspector]
[Range(20, 80)]
[Tooltip("vertical for safe tracking region")]
public float eyeTrackFOVVer
Field Value
farDistance
[SerializeField]
protected float farDistance
Field Value
fovScaleFactor
[Range(0.5, 3)]
public float fovScaleFactor
Field Value
height_m
public static float height_m
Field Value
iP
[HideInInspector]
[Space]
[Tooltip("IP of the eye tracking data provider")]
[Header("Device")]
public string iP
Field Value
ignoreHeadRotation
[HideInInspector]
[Tooltip("virtual stereo camera's z value is always the same")]
public float ignoreHeadRotation
Field Value
leftCamera
public Camera leftCamera
Field Value
- Camera
monoToStereoDuration
public float monoToStereoDuration
Field Value
nearClipPlaneAdj
protected float nearClipPlaneAdj
Field Value
nearDistance
[SerializeField]
protected float nearDistance
Field Value
pixelsize_m
protected float pixelsize_m
Field Value
port
[HideInInspector]
protected int port
Field Value
rig
protected TuringCameraRig rig
Field Value
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
stereoBasis
protected static float stereoBasis
Field Value
stereoMode
[HideInInspector]
[Tooltip("SideBySide,Mono")]
public TuringCamera.StereoMode stereoMode
Field Value
stereoScaleFactor
public static float stereoScaleFactor
Field Value
stereoStrength
protected float stereoStrength
Field Value
stereoToMonoDelay
public float stereoToMonoDelay
Field Value
stereoToMonoDuration
public float stereoToMonoDuration
Field Value
supportedEDID
protected static List<string> supportedEDID
Field Value
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
trueScreenSize
[HideInInspector]
public float trueScreenSize
Field Value
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
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
width_m
public static float width_m
Field Value
winDisplayIdx
protected int winDisplayIdx
Field Value
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
FarDistance
public float FarDistance { get; }
Property Value
NearClipPlaneAdj
public float NearClipPlaneAdj { get; set; }
Property Value
NearDistance
public float NearDistance { get; }
Property Value
StereoWeight
public float StereoWeight { get; set; }
Property Value
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
CopyPropertiesToChild(TuringCamera)
protected void CopyPropertiesToChild(TuringCamera child)
Parameters
child
TuringCamera
HasFocus()
public bool HasFocus()
Returns
PerspectiveOffCenter(float, float, float, float, float, float)
protected Matrix4x4 PerspectiveOffCenter(float left, float right, float bottom, float top, float near, float far)
Parameters
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)