    

 ## On this page

  

 

 # GLTFNode

 Last update: 16.07.2025 

<a id="l00001" name="l00001"></a> 1/\*

<a id="l00002" name="l00002"></a> 2 \* Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

<a id="l00003" name="l00003"></a> 3 \* 

<a id="l00004" name="l00004"></a> 4 \* Restricted Rights Legend

<a id="l00005" name="l00005"></a> 5 \*

<a id="l00006" name="l00006"></a> 6 \* Use, duplication, or disclosure of this

<a id="l00007" name="l00007"></a> 7 \* software and its documentation by the

<a id="l00008" name="l00008"></a> 8 \* Government is subject to restrictions as

<a id="l00009" name="l00009"></a> 9 \* set forth in subdivision \[(b)(3)(ii)\] of

<a id="l00010" name="l00010"></a> 10 \* the Rights in Technical Data and Computer

<a id="l00011" name="l00011"></a> 11 \* Software clause at 52.227-7013.

<a id="l00012" name="l00012"></a> 12 \*/

<a id="l00013" name="l00013"></a> 13\#ifndef \_\_INCLUDED\_GLTF\_GLTFNODE\_\_

<a id="l00014" name="l00014"></a> 14\#define \_\_INCLUDED\_GLTF\_GLTFNODE\_\_

<a id="l00015" name="l00015"></a> 15 

<a id="l00016" name="l00016"></a> 16\#include "GLTFCommon.h"

<a id="l00017" name="l00017"></a> 17\#include "GLTFObject.h"

<a id="l00018" name="l00018"></a> 18 

<a id="l00019" name="l00019"></a> 19namespace [ANSYS](namespace_a_n_s_y_s.xhtml) { namespace AVZ { namespace GLTFWriter {

<a id="l00020" name="l00020"></a> 20 class GLTF;

<a id="l00021" name="l00021"></a> 21 class Camera;

<a id="l00022" name="l00022"></a> 22 class Legend;

<a id="l00023" name="l00023"></a> 23 class Light;

<a id="l00024" name="l00024"></a> 24 class Mesh;

<a id="l00025" name="l00025"></a> 25 class Image;

<a id="l00026" name="l00026"></a> 26 

<a id="l00030" name="l00030"></a>[ 30](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) class [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) : public Object

<a id="l00031" name="l00031"></a> 31 {

<a id="l00032" name="l00032"></a> 32 protected:

<a id="l00033" name="l00033"></a> 33 virtual [~Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml)() {}

<a id="l00034" name="l00034"></a> 34 

<a id="l00035" name="l00035"></a> 35 public:

<a id="l00042" name="l00042"></a>[ 42](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a535949949764a2fad5dd1510573a84f1) static GLTFWRITERSPEC [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) *[CreateMesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a535949949764a2fad5dd1510573a84f1)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00043" name="l00043"></a> 43 const char *name = 0, 

<a id="l00044" name="l00044"></a> 44 bool visible = true, 

<a id="l00045" name="l00045"></a> 45 const double *matrix = 0 

<a id="l00046" name="l00046"></a> 46 );

<a id="l00051" name="l00051"></a>[ 51](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3d876d261492ffc7f4142dbd07733f95) static GLTFWRITERSPEC [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) *[CreateCamera](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3d876d261492ffc7f4142dbd07733f95)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00052" name="l00052"></a> 52 [Camera](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_camera.xhtml) *camera, 

<a id="l00053" name="l00053"></a> 53 const char *name = 0, 

<a id="l00054" name="l00054"></a> 54 const double *matrix = 0 

<a id="l00055" name="l00055"></a> 55 );

<a id="l00057" name="l00057"></a>[ 57](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#acfd04847660f8c8612261f8bf42de199) static GLTFWRITERSPEC [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) *[CreateLegend](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#acfd04847660f8c8612261f8bf42de199)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00058" name="l00058"></a> 58 [Legend](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_legend.xhtml) *legend, 

<a id="l00059" name="l00059"></a> 59 const char *name = 0, 

<a id="l00060" name="l00060"></a> 60 bool visible = true 

<a id="l00061" name="l00061"></a> 61 );

<a id="l00068" name="l00068"></a>[ 68](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a0032c074a6e6be7d1a0e8654e3f8a442) static GLTFWRITERSPEC [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) *[CreateLight](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a0032c074a6e6be7d1a0e8654e3f8a442)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf 

<a id="l00069" name="l00069"></a> 69 );

<a id="l00073" name="l00073"></a>[ 73](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5665172c9048e5f1afc989bb654d8e76) static GLTFWRITERSPEC [Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml)* [CreateProxyImage](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5665172c9048e5f1afc989bb654d8e76)([GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml)* gltf, 

<a id="l00074" name="l00074"></a> 74 [Image](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_image.xhtml)* image, 

<a id="l00075" name="l00075"></a> 75 const char* name = 0 

<a id="l00076" name="l00076"></a> 76 );

<a id="l00077" name="l00077"></a> 77 

<a id="l00080" name="l00080"></a>[ 80](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a86b91dc1bac027fd7a8e59f4d5f0ea05) GLTFWRITERSPEC virtual bool [AppendChild](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a86b91dc1bac027fd7a8e59f4d5f0ea05)([Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml) *node 

<a id="l00081" name="l00081"></a> 81 ) = 0;

<a id="l00084" name="l00084"></a>[ 84](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5be2d73f430ae18fbff5ac28d6b6d9a3) GLTFWRITERSPEC virtual unsigned int [NumChildren](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5be2d73f430ae18fbff5ac28d6b6d9a3)() const = 0;

<a id="l00087" name="l00087"></a>[ 87](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a68c9eec5fe03405e52b3558a62f8faec) GLTFWRITERSPEC virtual bool [AppendMesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a68c9eec5fe03405e52b3558a62f8faec)([Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml) *mesh 

<a id="l00088" name="l00088"></a> 88 ) = 0;

<a id="l00091" name="l00091"></a>[ 91](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3fe39104e9dff5d2de47cd3674df96a6) GLTFWRITERSPEC virtual unsigned int [NumMeshes](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3fe39104e9dff5d2de47cd3674df96a6)() const = 0;

<a id="l00096" name="l00096"></a>[ 96](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a576db36280a02127b5eb662f0566543b) GLTFWRITERSPEC virtual bool [AppendLight](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a576db36280a02127b5eb662f0566543b)([Light](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_light.xhtml) *light 

<a id="l00097" name="l00097"></a> 97 ) = 0;

<a id="l00098" name="l00098"></a> 98 };

<a id="l00099" name="l00099"></a> 99 

<a id="l00100" name="l00100"></a> 100} } }

<a id="l00101" name="l00101"></a> 101 

<a id="l00102" name="l00102"></a> 102\#endif

[ANSYS::AVZ::GLTFWriter::Camera](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_camera.xhtml)

Cameras define an orthographic or perspective projection of the scene.

**Definition:** [GLTFCamera.h:28](_g_l_t_f_camera_8h_source.xhtml#l00027)



[ANSYS::AVZ::GLTFWriter::GLTF](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml)

This is the main class of the GLTFWriter.

**Definition:** [GLTFGLTF.h:32](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00031)



[ANSYS::AVZ::GLTFWriter::Image](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_image.xhtml)

Images define texture data.

**Definition:** [GLTFImage.h:27](_g_l_t_f_image_8h_source.xhtml#l00026)



[ANSYS::AVZ::GLTFWriter::Legend](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_legend.xhtml)

Legends are colored bars with numbers at intervals along bar.

**Definition:** [GLTFLegend.h:27](_g_l_t_f_legend_8h_source.xhtml#l00026)



[ANSYS::AVZ::GLTFWriter::Light](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_light.xhtml)

Lights define the light objects that can be added to a light node.

**Definition:** [GLTFLight.h:31](_g_l_t_f_light_8h_source.xhtml#l00030)



[ANSYS::AVZ::GLTFWriter::Mesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_mesh.xhtml)

Meshes define the renderable objects that can be added to a node.

**Definition:** [GLTFMesh.h:104](_g_l_t_f_mesh_8h_source.xhtml#l00103)



[ANSYS::AVZ::GLTFWriter::Node](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml)

Nodes are the GLTFWriter class that contain the data that is defined in the GLTF file.

**Definition:** [GLTFNode.h:31](_g_l_t_f_node_8h_source.xhtml#l00030)



[ANSYS::AVZ::GLTFWriter::Node::CreateLight](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a0032c074a6e6be7d1a0e8654e3f8a442)

static Node * CreateLight(GLTF *gltf)



[ANSYS::AVZ::GLTFWriter::Node::CreateCamera](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3d876d261492ffc7f4142dbd07733f95)

static Node * CreateCamera(GLTF *gltf, Camera *camera, const char *name=0, const double *matrix=0)



[ANSYS::AVZ::GLTFWriter::Node::NumMeshes](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a3fe39104e9dff5d2de47cd3674df96a6)

virtual unsigned int NumMeshes() const =0



[ANSYS::AVZ::GLTFWriter::Node::CreateMesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a535949949764a2fad5dd1510573a84f1)

static Node * CreateMesh(GLTF *gltf, const char *name=0, bool visible=true, const double *matrix=0)



[ANSYS::AVZ::GLTFWriter::Node::CreateProxyImage](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5665172c9048e5f1afc989bb654d8e76)

static Node * CreateProxyImage(GLTF *gltf, Image *image, const char *name=0)



[ANSYS::AVZ::GLTFWriter::Node::AppendLight](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a576db36280a02127b5eb662f0566543b)

virtual bool AppendLight(Light *light)=0



[ANSYS::AVZ::GLTFWriter::Node::NumChildren](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a5be2d73f430ae18fbff5ac28d6b6d9a3)

virtual unsigned int NumChildren() const =0



[ANSYS::AVZ::GLTFWriter::Node::AppendMesh](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a68c9eec5fe03405e52b3558a62f8faec)

virtual bool AppendMesh(Mesh *mesh)=0



[ANSYS::AVZ::GLTFWriter::Node::AppendChild](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#a86b91dc1bac027fd7a8e59f4d5f0ea05)

virtual bool AppendChild(Node *node)=0



[ANSYS::AVZ::GLTFWriter::Node::CreateLegend](class_a_n_s_y_s_1_1_a_v_z_1_1_g_l_t_f_writer_1_1_node.xhtml#acfd04847660f8c8612261f8bf42de199)

static Node * CreateLegend(GLTF *gltf, Legend *legend, const char *name=0, bool visible=true)



[ANSYS](namespace_a_n_s_y_s.xhtml)

GLTFWriter API Documentation.

**Definition:** [GLTFAnimation.h:19](_g_l_t_f_animation_8h_source.xhtml#l00019)