GltfCamera
Represents a glTF camera.
Represents a glTF camera.
Represents a camera as defined by the base glTF spec.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
GltfCameraConstructor
public GltfCamera();Properties5
DepthFarProperty
public float DepthFar { get; set; }The distance to the far culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's zfar property.
DepthNearProperty
public float DepthNear { get; set; }The distance to the near culling boundary for this camera relative to its local Z axis, in meters. This maps to glTF's znear property.
FovProperty
public float Fov { get; set; }The FOV of the camera. This class and glTF define the camera FOV in radians, while Reckfell uses degrees. This maps to glTF's yfov property. This value is only used for perspective cameras, when GltfCamera.Perspective is true.
PerspectiveProperty
public bool Perspective { get; set; }If true, the camera is in perspective mode. Otherwise, the camera is in orthographic/orthogonal mode. This maps to glTF's camera type property. See Camera3D.Projection and the glTF spec for more information.
SizeMagProperty
public float SizeMag { get; set; }The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Reckfell defines it as a diameter in meters. This maps to glTF's ymag property. This value is only used for orthographic/orthogonal cameras, when GltfCamera.Perspective is false.
Methods14
FromDictionaryGltfCamera
public static GltfCamera FromDictionary(Reckfell.Collections.Dictionary dictionary);Creates a new GLTFCamera instance by parsing the given Reckfell.Collections.Dictionary.
| Name | Type | Default |
|---|---|---|
dictionary | Reckfell.Collections.Dictionary | — |
GltfCameraFromNodeGltfCamera
public static GltfCamera FromNode(Camera3D cameraNode);Create a new GLTFCamera instance from the given Reckfell Camera3D node.
| Name | Type | Default |
|---|---|---|
cameraNode | Camera3D | — |
GltfCameraGetDepthFarfloat
public float GetDepthFar();floatGetDepthNearfloat
public float GetDepthNear();floatGetFovfloat
public float GetFov();floatGetPerspectivebool
public bool GetPerspective();boolGetSizeMagfloat
public float GetSizeMag();floatSetDepthFarvoid
public void SetDepthFar(float zdepthFar);| Name | Type | Default |
|---|---|---|
zdepthFar | float | — |
SetDepthNearvoid
public void SetDepthNear(float zdepthNear);| Name | Type | Default |
|---|---|---|
zdepthNear | float | — |
SetFovvoid
public void SetFov(float fov);| Name | Type | Default |
|---|---|---|
fov | float | — |
SetPerspectivevoid
public void SetPerspective(bool perspective);| Name | Type | Default |
|---|---|---|
perspective | bool | — |
SetSizeMagvoid
public void SetSizeMag(float sizeMag);| Name | Type | Default |
|---|---|---|
sizeMag | float | — |
ToDictionaryReckfell.Collections.Dictionary
public Reckfell.Collections.Dictionary ToDictionary();Serializes this GLTFCamera instance into a Reckfell.Collections.Dictionary.
Reckfell.Collections.Dictionary