Skip to main content

Post-processing tools 2024 R2

ANSYS::AVZ::GLTFWriter::Node Class Reference

Last update: 16.07.2025

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::AVZ::GLTFWriter::Node:

Public Member Functions

virtual bool AppendChild (Node *node)=0
 
virtual unsigned int NumChildren () const =0
 
virtual bool AppendMesh (Mesh *mesh)=0
 
virtual unsigned int NumMeshes () const =0
 
virtual bool AppendLight (Light *light)=0
 

Static Public Member Functions

static Node * CreateMesh (GLTF *gltf, const char *name=0, bool visible=true, const double *matrix=0)
 
static Node * CreateCamera (GLTF *gltf, Camera *camera, const char *name=0, const double *matrix=0)
 
static Node * CreateLegend (GLTF *gltf, Legend *legend, const char *name=0, bool visible=true)
 
static Node * CreateLight (GLTF *gltf)
 
static Node * CreateProxyImage (GLTF *gltf, Image *image, const char *name=0)
 

Detailed Description

Constructor & Destructor Documentation

◆ ~Node()

virtual ANSYS::AVZ::GLTFWriter::Node::~Node ( )
inlineprotectedvirtual

Definition at line 33 of file GLTFNode.h.

Member Function Documentation

◆ AppendChild()

virtual bool ANSYS::AVZ::GLTFWriter::Node::AppendChild ( Node *  node)
pure virtual

Adds a child mesh node to a mesh node. Multiple child nodes can be appended to a mesh node.

Returns
Status of AppendChild.
Parameters
[in]nodeMesh node.
Examples
Test002.cpp, Test006.cpp, Test007.cpp, and Test013.cpp.

◆ AppendLight()

virtual bool ANSYS::AVZ::GLTFWriter::Node::AppendLight ( Light *  light)
pure virtual

Adds a light to a light node. Multiple lights can be appended to a light node. Lights are only required for techniques that have auto-generated programs. All lighting calculations must be done in shader programs.

Returns
Status of AppendLight.
Parameters
[in]lightLight object.
Examples
Test001.cpp, Test004.cpp, Test005.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test012.cpp, and Test014.cpp.

◆ AppendMesh()

virtual bool ANSYS::AVZ::GLTFWriter::Node::AppendMesh ( Mesh *  mesh)
pure virtual

Adds a mesh to a mesh node. Multiple meshes can be appended to a mesh node.

Returns
Status of AppendMesh.
Parameters
[in]meshMesh object.
Examples
Test001.cpp, Test002.cpp, Test003.cpp, Test004.cpp, Test005.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test012.cpp, Test013.cpp, and Test014.cpp.

◆ CreateCamera()

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

Creates a camera node. The camera node contains an initial orientation that can be used to set an overall scene orientation. Only one camera node is allowed per scene.

Returns
Node object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]cameraCamera object.
[in]nameOptional, name of camera node.
[in]matrixOptional, 4x4 transformation matrix defining the initial scene orientation for this camera.

◆ CreateLegend()

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

Creates a legend node.

Parameters
[in]gltfGLTF object.
[in]legendLegend object.
[in]nameOptional, name of legend node.
[in]visibleOptional, initial legend visibility.

◆ CreateLight()

static Node * ANSYS::AVZ::GLTFWriter::Node::CreateLight ( GLTF *  gltf)
static

Creates a light node. The light node contains all of the lights for the scene. Lights are only required for techniques that have auto-generated programs. All lighting calculations must be done in shader programs. Only one light node is allowed per scene.

Returns
Node object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.

◆ CreateMesh()

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

Creates a mesh node. The mesh node can contain only mesh objects, for a pure mesh node that appears at a leaf node of the scene graph. It can contain only child nodes, for an interior grouping node in the scene graph. Or it can contain both, for an interior grouping node with a mesh object. Multiple mesh nodes can be added to a scene.

Returns
Node object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]nameOptional, name of mesh node. This is required for the mesh node to appear in the visibility selector.
[in]visibleOptional, initial node visibility.
[in]matrixOptional, 4x4 transformation matrix that is applied to all meshes and child nodes.

◆ CreateProxyImage()

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

Creates a proxy image node. The proxy image can be displayed in place of the scene, while loading, or for systems that do not support WebGL.

Returns
Node object. Do not delete this pointer.
Parameters
[in]gltfGLTF object.
[in]imageImage object.
[in]nameOptional, name of proxy image node.

◆ NumChildren()

virtual unsigned int ANSYS::AVZ::GLTFWriter::Node::NumChildren ( ) const
pure virtual

Returns number of child nodes

Returns
Number of child nodes.

◆ NumMeshes()

virtual unsigned int ANSYS::AVZ::GLTFWriter::Node::NumMeshes ( ) const
pure virtual

Returns number of meshes.

Returns
Number of meshes.

The documentation for this class was generated from the following file:
  • D:/Product-src/webgl_viewer/gltfwriterlib/include/GLTFNode.h

Connect with Ansys