Class SyncCamera
This class specifies information about a camera, that can be included in a SyncObject.
Inherited Members
Namespace: Unity.Reflect.Model
Syntax
public class SyncCamera
Properties
Aspect
The aspect ratio of the camera.
Declaration
public float Aspect { get; set; }
Property Value
Type | Description |
---|---|
Single |
Bottom
The bottom value of the camera.
Declaration
public float Bottom { get; set; }
Property Value
Type | Description |
---|---|
Single |
Far
The far plane value of the camera.
Declaration
public float Far { get; set; }
Property Value
Type | Description |
---|---|
Single |
Fov
The field of view of the camera.
Declaration
public float Fov { get; set; }
Property Value
Type | Description |
---|---|
Single |
Left
The left value of the camera.
Declaration
public float Left { get; set; }
Property Value
Type | Description |
---|---|
Single |
Name
The name of the camera.
Declaration
public string Name { get; set; }
Property Value
Type | Description |
---|---|
String |
Near
The near plane value of the camera.
Declaration
public float Near { get; set; }
Property Value
Type | Description |
---|---|
Single |
Orthographic
Whether the camera is orthographic or perspective.
Declaration
public bool Orthographic { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Right
The right value of the camera.
Declaration
public float Right { get; set; }
Property Value
Type | Description |
---|---|
Single |
Size
The size of the camera.
Declaration
public float Size { get; set; }
Property Value
Type | Description |
---|---|
Single |
Top
The top value of the camera.
Declaration
public float Top { get; set; }
Property Value
Type | Description |
---|---|
Single |
Methods
FromOrthographic(String, Single, Single, Single, Single)
Creates an orthographic camera.
Declaration
public static SyncCamera FromOrthographic(string name, float aspect, float size, float near, float far)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the camera |
Single | aspect | The aspect ratio of the camera |
Single | size | The size of the camera |
Single | near | The near plane of the camera |
Single | far | The far plane of the camera |
Returns
Type | Description |
---|---|
SyncCamera | A generated orthographic camera |
FromOrthographicFrustum(String, Single, Single, Single, Single, Single, Single)
Creates an orthographic frustum camera.
Declaration
public static SyncCamera FromOrthographicFrustum(string name, float left, float right, float bottom, float top, float near, float far)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the camera |
Single | left | The left value of the camera |
Single | right | The right value of the camera |
Single | bottom | The bottom value of the camera |
Single | top | The top value of the camera |
Single | near | The near plane of the camera |
Single | far | The far plane of the camera |
Returns
Type | Description |
---|---|
SyncCamera | A generated orthographic frustum camera |
FromPerspective(String, Single, Single, Single, Single)
Creates a perspective camera.
Declaration
public static SyncCamera FromPerspective(string name, float aspect, float fov, float near, float far)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the camera |
Single | aspect | The aspect ratio of the camera |
Single | fov | The field of view of the camera |
Single | near | The near plane of the camera |
Single | far | The far plane of the camera |
Returns
Type | Description |
---|---|
SyncCamera | A generated perspective camera |
FromPerspectiveFrustum(String, Single, Single, Single, Single, Single, Single)
Creates a perspective frustum camera.
Declaration
public static SyncCamera FromPerspectiveFrustum(string name, float left, float right, float bottom, float top, float near, float far)
Parameters
Type | Name | Description |
---|---|---|
String | name | The name of the camera |
Single | left | The left value of the camera |
Single | right | The right value of the camera |
Single | bottom | The bottom value of the camera |
Single | top | The top value of the camera |
Single | near | The near plane of the camera |
Single | far | The far plane of the camera |
Returns
Type | Description |
---|---|
SyncCamera | A generated perspective frustum camera |