GLTFCamera
继承: Resource
< RefCounted
< Object
Represents a glTF camera.
描述
Represents a camera as defined by the base glTF spec.
属性
方法
GLTFCamera | from_dictionary ( dictionary: Dictionary ) static1 |
GLTFCamera | from_node ( camera_node: Camera3D ) static1 |
Dictionary | to_dictionary ( ) const2 |
Camera3D | to_node ( ) const2 |
属性说明
float
depth_far = 4000.0
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
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
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
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
.
Converts this GLTFCamera instance into a Godot Camera3D
node.
本方法通常需要用户覆盖才能生效。
本方法无副作用,不会修改该实例的任何成员变量。
本方法除了能接受在此处描述的参数外,还能够继续接受任意数量的参数。
本方法用于构造某个类型。
调用本方法无需实例,可直接使用类名进行调用。
本方法描述的是使用本类型作为左操作数的有效运算符。
这个值是由下列位标志构成位掩码的整数。
无返回值。