Skip to main content

Post-processing tools 2025 R1

GLTFNode

Last update: 16.07.2025
1/*
2 * Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.
3 *
4 * Restricted Rights Legend
5 *
6 * Use, duplication, or disclosure of this
7 * software and its documentation by the
8 * Government is subject to restrictions as
9 * set forth in subdivision [(b)(3)(ii)] of
10 * the Rights in Technical Data and Computer
11 * Software clause at 52.227-7013.
12 */
13#ifndef __INCLUDED_GLTF_GLTFNODE__
14#define __INCLUDED_GLTF_GLTFNODE__
15
16#include "GLTFCommon.h"
17#include "GLTFObject.h"
18
19namespace ANSYS { namespace AVZ { namespace GLTFWriter {
20 class GLTF;
21 class Camera;
22 class Legend;
23 class Light;
24 class Mesh;
25 class Image;
26
30 class Node : public Object
31 {
32 protected:
33 virtual ~Node() {}
34
35 public:
42 static GLTFWRITERSPEC Node *CreateMesh(GLTF *gltf,
43 const char *name = 0,
44 bool visible = true,
45 const double *matrix = 0
46 );
51 static GLTFWRITERSPEC Node *CreateCamera(GLTF *gltf,
52 Camera *camera,
53 const char *name = 0,
54 const double *matrix = 0
55 );
57 static GLTFWRITERSPEC Node *CreateLegend(GLTF *gltf,
58 Legend *legend,
59 const char *name = 0,
60 bool visible = true
61 );
68 static GLTFWRITERSPEC Node *CreateLight(GLTF *gltf
69 );
73 static GLTFWRITERSPEC Node* CreateProxyImage(GLTF* gltf,
74 Image* image,
75 const char* name = 0
76 );
77
80 GLTFWRITERSPEC virtual bool AppendChild(Node *node
81 ) = 0;
84 GLTFWRITERSPEC virtual unsigned int NumChildren() const = 0;
87 GLTFWRITERSPEC virtual bool AppendMesh(Mesh *mesh
88 ) = 0;
91 GLTFWRITERSPEC virtual unsigned int NumMeshes() const = 0;
96 GLTFWRITERSPEC virtual bool AppendLight(Light *light
97 ) = 0;
98 };
99
100} } }
101
102#endif
Cameras define an orthographic or perspective projection of the scene.
Definition GLTFCamera.h:28
This is the main class of the GLTFWriter.
Definition GLTFGLTF.h:32
Images define texture data.
Definition GLTFImage.h:27
Legends are colored bars with numbers at intervals along bar.
Definition GLTFLegend.h:27
Lights define the light objects that can be added to a light node.
Definition GLTFLight.h:31
Meshes define the renderable objects that can be added to a node.
Definition GLTFMesh.h:104
Nodes are the GLTFWriter class that contain the data that is defined in the GLTF file.
Definition GLTFNode.h:31
static Node * CreateLight(GLTF *gltf)
static Node * CreateCamera(GLTF *gltf, Camera *camera, const char *name=0, const double *matrix=0)
virtual unsigned int NumMeshes() const =0
static Node * CreateMesh(GLTF *gltf, const char *name=0, bool visible=true, const double *matrix=0)
static Node * CreateProxyImage(GLTF *gltf, Image *image, const char *name=0)
virtual bool AppendLight(Light *light)=0
virtual unsigned int NumChildren() const =0
virtual bool AppendMesh(Mesh *mesh)=0
virtual bool AppendChild(Node *node)=0
static Node * CreateLegend(GLTF *gltf, Legend *legend, const char *name=0, bool visible=true)
GLTFWriter API Documentation.

Connect with Ansys