Skip to main content

Post-processing tools 2023 R2

ANSYS::Nexus::GLTFWriter::Node Class Reference

Last update: 17.04.2023

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

#include <GLTFWriter.h>

Inheritance diagram for ANSYS::Nexus::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 NodeCreateMesh (GLTF *gltf, const char *name=0, bool visible=true, const double *matrix=0)
 
static NodeCreateCamera (GLTF *gltf, Camera *camera, const char *name=0, const double *matrix=0)
 
static NodeCreateLegend (GLTF *gltf, Legend *legend, const char *name=0, bool visible=true)
 
static NodeCreateLight (GLTF *gltf)
 
static NodeCreateProxyImage (GLTF *gltf, Image *image, const char *name=0)
 

Detailed Description

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

Definition at line 30 of file GLTFNode.h.

Member Function Documentation

◆ AppendChild()

virtual bool ANSYS::Nexus::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.

◆ AppendLight()

virtual bool ANSYS::Nexus::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.

◆ AppendMesh()

virtual bool ANSYS::Nexus::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.

◆ CreateCamera()

static Node* ANSYS::Nexus::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.
Examples
Test001.cpp, Test004.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test012.cpp, Test013.cpp, and Test014.cpp.

◆ CreateLegend()

static Node* ANSYS::Nexus::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.
Examples
Test013.cpp.

◆ CreateLight()

static Node* ANSYS::Nexus::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.
Examples
Test001.cpp, Test004.cpp, Test005.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test012.cpp, and Test014.cpp.

◆ CreateMesh()

static Node* ANSYS::Nexus::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.
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.

◆ CreateProxyImage()

static Node* ANSYS::Nexus::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.
Examples
Test014.cpp.

◆ NumChildren()

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

Returns number of child nodes

Returns
Number of child nodes.

◆ NumMeshes()

virtual unsigned int ANSYS::Nexus::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:/ANSYSDev/NoBackup/branches/EnSight-Second-Coming/webgl_viewer/gltfwriterlib/include/GLTFNode.h