Attention: Here be dragons
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Godot.
Checking the stable version of the documentation...
GLTFNode¶
Inherits: Resource < RefCounted < Object
GLTF 节点类。
Description¶
代表 GLTF 节点。GLTF 节点中可以包含名称、变换、子节点(GLTF 节点)以及其他专门的属性(由各自不同的类表示)。
GLTF 节点通常存在于表示 GLTF 文件中的所有数据的 GLTFState 内部。大多数 GLTFNode 的属性都是 GLTF 文件中其他数据的索引。你可以使用 get_additional_data 和 set_additional_data 来添加额外的属性,扩展 GLTF 节点。
Tutorials¶
Properties¶
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
Methods¶
get_additional_data ( StringName extension_name ) |
|
void |
set_additional_data ( StringName extension_name, Variant additional_data ) |
Property Descriptions¶
int camera = -1
如果该 GLTF 节点是一个相机,则 GLTFState 中 GLTFCamera 的索引将描述该相机的属性。如果为 -1,则该节点不是相机。
PackedInt32Array children = PackedInt32Array()
void set_children ( PackedInt32Array value )
PackedInt32Array get_children ( )
GLTFState 中子节点的索引。如果该 GLTF 节点没有子节点,则这将是一个空数组。
int height = -1
该节点在节点层次结构中的深度。根节点的高度为 0,其子节点的高度为 1,依此类推。如果为 -1,则尚未计算高度。
int light = -1
如果该 GLTF 节点是一盏灯,则 GLTFState 中 GLTFLight 的索引将描述该灯的属性。如果为 -1,则该节点不是灯。
int mesh = -1
如果该 GLTF 节点是网格,则 GLTFState 中 GLTFMesh 的索引将描述该网格的属性。如果为 -1,则该节点不是网格。
int parent = -1
GLTFState 中父节点的索引。如果为 -1,则该节点为根节点。
Vector3 position = Vector3(0, 0, 0)
该 GLTF 节点相对于其父节点的位置。
Quaternion rotation = Quaternion(0, 0, 0, 1)
void set_rotation ( Quaternion value )
Quaternion get_rotation ( )
该 GLTF 节点相对于其父节点的旋转。
Vector3 scale = Vector3(1, 1, 1)
该 GLTF 节点相对于其父节点的缩放。
int skeleton = -1
如果该 GLTF 节点具有骨架,则 GLTFState 中的 GLTFSkeleton 的索引将描述骨架的属性。如果为 -1,则该节点没有骨架。
int skin = -1
如果该 GLTF 节点有皮肤,则 GLTFState 中的 GLTFSkin 的索引将描述皮肤的属性。如果为 -1,则该节点没有皮肤。