Class CameraDetails
Camera data for spatial attachment
Implements
Inherited Members
Namespace: Unity.Cloud.Collaboration.Models.Abstractions
Assembly: Unity.Cloud.Collaboration.dll
Syntax
[DataContract(Name = "assets.Camera")]
public class CameraDetails : ICameraDetails
Constructors
CameraDetails(SpatialPosition?, SpatialRotation?, float?, SpatialPosition?, CameraProjection?, float?)
Initializes a new instance of the CameraDetails class.
Declaration
public CameraDetails(SpatialPosition? position, SpatialRotation? rotation, float? fieldOfView = null, SpatialPosition? target = null, CameraProjection? projection = null, float? verticalSize = null)
Parameters
| Type | Name | Description |
|---|---|---|
| SpatialPosition? | position | The representation of a camera position (required). |
| SpatialRotation? | rotation | The representation of a camera rotation (required). |
| float? | fieldOfView | Field of view for the camera. |
| SpatialPosition? | target | Target position for the camera. |
| CameraProjection? | projection | Projection type for the camera. Possible values: "orthographic" | "perspective" |
| float? | verticalSize | Vertical viewing size for the camera. |
Properties
FieldOfView
Camera field of view.
Declaration
public float? FieldOfView { get; }
Property Value
| Type | Description |
|---|---|
| float? |
Position
The representation of a Camera position (3D).
Declaration
public SpatialPosition Position { get; }
Property Value
| Type | Description |
|---|---|
| SpatialPosition |
Projection
Projection type for the camera. Possible values: "orthographic" | "perspective".
Declaration
public CameraProjection? Projection { get; }
Property Value
| Type | Description |
|---|---|
| CameraProjection? |
Rotation
The representation of a Camera rotation (3D).
Declaration
public SpatialRotation Rotation { get; }
Property Value
| Type | Description |
|---|---|
| SpatialRotation |
Target
The representation of a target position (3D).
Declaration
public SpatialPosition? Target { get; }
Property Value
| Type | Description |
|---|---|
| SpatialPosition? |
VerticalSize
Vertical viewing size for the camera. Could be null if the camera is in a perspective projection.
Declaration
public float? VerticalSize { get; }
Property Value
| Type | Description |
|---|---|
| float? |