reckfellENGINE

GltfCamera

Represents a glTF camera.

On this page
class GltfCameraReckfellSharpInherits Resource

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
# GltfCamera
C#
public GltfCamera();

Properties5

DepthFarProperty
# DepthFar
C#
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
# DepthNear
C#
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
# Fov
C#
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
# Perspective
C#
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
# SizeMag
C#
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
# FromDictionary
C#
public static GltfCamera FromDictionary(Reckfell.Collections.Dictionary dictionary);

Creates a new GLTFCamera instance by parsing the given Reckfell.Collections.Dictionary.

Parameters
NameTypeDefault
dictionaryReckfell.Collections.Dictionary—
Returns GltfCamera
FromNodeGltfCamera
# FromNode
C#
public static GltfCamera FromNode(Camera3D cameraNode);

Create a new GLTFCamera instance from the given Reckfell Camera3D node.

Parameters
NameTypeDefault
cameraNodeCamera3D—
Returns GltfCamera
GetDepthFarfloat
# GetDepthFar
C#
public float GetDepthFar();
Returns float
GetDepthNearfloat
# GetDepthNear
C#
public float GetDepthNear();
Returns float
GetFovfloat
# GetFov
C#
public float GetFov();
Returns float
GetPerspectivebool
# GetPerspective
C#
public bool GetPerspective();
Returns bool
GetSizeMagfloat
# GetSizeMag
C#
public float GetSizeMag();
Returns float
SetDepthFarvoid
# SetDepthFar
C#
public void SetDepthFar(float zdepthFar);
Parameters
NameTypeDefault
zdepthFarfloat—
SetDepthNearvoid
# SetDepthNear
C#
public void SetDepthNear(float zdepthNear);
Parameters
NameTypeDefault
zdepthNearfloat—
SetFovvoid
# SetFov
C#
public void SetFov(float fov);
Parameters
NameTypeDefault
fovfloat—
SetPerspectivevoid
# SetPerspective
C#
public void SetPerspective(bool perspective);
Parameters
NameTypeDefault
perspectivebool—
SetSizeMagvoid
# SetSizeMag
C#
public void SetSizeMag(float sizeMag);
Parameters
NameTypeDefault
sizeMagfloat—
ToDictionaryReckfell.Collections.Dictionary
# ToDictionary
C#
public Reckfell.Collections.Dictionary ToDictionary();

Serializes this GLTFCamera instance into a Reckfell.Collections.Dictionary.

Returns Reckfell.Collections.Dictionary
ToNodeCamera3D
# ToNode
C#
public Camera3D ToNode();

Converts this GLTFCamera instance into a Reckfell Camera3D node.

Returns Camera3D
Reckfell Engine documentationBack to top ↑
QUICK LINKSGetting startedEntity hierarchyC# & .NET 10Scenes and prefabs
Reckfell guides and full API K
reckfellENGINE
RECKFELL ACCOUNT

Sign in

Sign in to your Reckfell account.

One account for the entire Reckfell platform.