Class CameraExtensions
Extension methods for the Unity's Camera class
Inherited Members
Namespace: Microsoft.MixedReality.Toolkit
Assembly: cs.temp.dll.dll
Syntax
public static class CameraExtensions
Methods
GetDistanceForFrustumHeight(Camera, Single)
Gets the distance to the camera that a specific frustum height would be at.
Declaration
public static float GetDistanceForFrustumHeight(this Camera camera, float frustumHeight)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The camera to get the distance from |
Single | frustumHeight | The frustum height |
Returns
Type | Description |
---|---|
Single |
GetFrustumSizeForDistance(Camera, Single)
Gets the frustum size at a given distance from the camera.
Declaration
public static Vector2 GetFrustumSizeForDistance(this Camera camera, float distanceFromCamera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The camera to get the frustum size for |
Single | distanceFromCamera | The distance from the camera to get the frustum size at |
Returns
Type | Description |
---|---|
Vector2 |
GetHorizontalFieldOfViewRadians(Camera)
Get the horizontal FOV from the stereo camera
Declaration
public static float GetHorizontalFieldOfViewRadians(this Camera camera)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera |
Returns
Type | Description |
---|---|
Single |
IsInFOV(Camera, Vector3)
Returns if a point will be rendered on the screen in either eye
Declaration
public static bool IsInFOV(this Camera camera, Vector3 position)
Parameters
Type | Name | Description |
---|---|---|
Camera | camera | The camera to check the point against |
Vector3 | position |
Returns
Type | Description |
---|---|
Boolean |