GLTFCamera

继承: Resource < RefCounted < Object

Represents a glTF camera.

描述

Represents a camera as defined by the base glTF spec.

属性

方法

GLTFCamerafrom_dictionary ( dictionary: Dictionary ) static1
GLTFCamerafrom_node ( camera_node: Camera3D ) static1
Dictionaryto_dictionary ( ) const2
Camera3Dto_node ( ) const2

属性说明

float depth_far = 4000.0

  • void set_depth_far ( value: float )
  • float get_depth_far ( )

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.


float depth_near = 0.05

  • void set_depth_near ( value: float )
  • float get_depth_near ( )

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.


float fov = 1.309

The FOV of the camera. This class and glTF define the camera FOV in radians, while Godot uses degrees. This maps to glTF's yfov property. This value is only used for perspective cameras, when perspective is true.


bool perspective = true

  • void set_perspective ( value: bool )
  • bool get_perspective ( )

Whether or not the camera is in perspective mode. If false, 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.


float size_mag = 0.5

  • void set_size_mag ( value: float )
  • float get_size_mag ( )

The size of the camera. This class and glTF define the camera size magnitude as a radius in meters, while Godot defines it as a diameter in meters. This maps to glTF's ymag property. This value is only used for orthographic/orthogonal cameras, when perspective is false.


方法说明

GLTFCamera from_dictionary ( dictionary: Dictionary ) static1

Creates a new GLTFCamera instance by parsing the given Dictionary.


GLTFCamera from_node ( camera_node: Camera3D ) static1

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


Dictionary to_dictionary ( ) const2

Serializes this GLTFCamera instance into a Dictionary.


Camera3D to_node ( ) const2

Converts this GLTFCamera instance into a Godot Camera3D node.

3

本方法通常需要用户覆盖才能生效。

2

本方法无副作用,不会修改该实例的任何成员变量。

4

本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。

5

本方法用于构造某个类型。

1

调用本方法无需实例,可直接使用类名进行调用。

6

本方法描述的是使用本类型作为左操作数的有效运算符。

7

这个值是由下列位标志构成位掩码的整数。

8

无返回值。