    

 ## On this page

  

 

 # Test014

 Last update: 16.07.2025 

Scaled and textured spheres

This example demonstrates the displacement and scaling pipeline.

A grid of spheres is created using proxy geometry consisting of a single quad. Quads are instanced via scaling and translation before being rendered using a billboard sphere shader.   
&lt;script src="/ansys/nexus/viewer-loader.js"&gt;&lt;/script&gt;

/\*

 \* Copyright 2018-2021 ANSYS, Inc. Unauthorized use, distribution, or duplication is prohibited.

 \* 

 \* Restricted Rights Legend

 \*

 \* Use, duplication, or disclosure of this

 \* software and its documentation by the

 \* Government is subject to restrictions as

 \* set forth in subdivision \[(b)(3)(ii)\] of

 \* the Rights in Technical Data and Computer

 \* Software clause at 52.227-7013.

 \*/

\#include &lt;vector&gt;

\#include &lt;cstdlib&gt;

 

\#include "GLTFWriter.h"

\#include "test.h"

 

using namespace ANSYS::Nexus;

 

// Size/textured points

TESTFUNC(ScaledPoints)

{

 GLTFWriter::GLTF *gltf = <a id="a0" name="a0"></a>[GLTFWriter::GLTF::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#ab7ba6d114c76cb60baf41aa6f13e9494)("MyApp", "1.0", functionName.c_str(), type);

 if (!gltf)

 throw std::runtime_error("Can't create GLTF");

 

 // TEXTURE

 std::vector&lt;unsigned char&gt; colors;

 colors.push_back(0); colors.push_back(0); colors.push_back(255); // blue

 colors.push_back(0); colors.push_back(255); colors.push_back(255); // cyan

 colors.push_back(0); colors.push_back(255); colors.push_back(0); // green

 colors.push_back(255); colors.push_back(255); colors.push_back(0); // yellow

 colors.push_back(255); colors.push_back(0); colors.push_back(0); // red

 GLTFWriter::Texture *rainbowGradientTexture = <a id="a1" name="a1"></a>[GLTFWriter::Texture::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#a3d15e0e6ad83cd7d50bb81ce2d0f30c8)(gltf, <a id="a2" name="a2"></a>[GLTFWriter::Texture::TF\_RGB](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#aba6db4f52b9f0a1a866bce302b6d8964aaa8ea9a0e6b83932a6a882b1655e8e59), 

 (unsigned int)colors.size() / 3, &amp;colors[0], false);

 

 // Use a quad proxy geometry for the spheres

 const std::vector&lt;float&gt; proxy_verts = { -1.f,1.f,0.f, 1.f,1.f,0.f, 1.f,-1.f,0.f, -1.f,-1.f,0.f };

 const std::vector&lt;unsigned short&gt; proxy_conn = { 0,3,2, 0,2,1 };

 

 // Build the various arrays

 const float tex_coord_min = 0.f;

 const float tex_coord_max = 10.f;

 std::vector&lt;float&gt; vertices;

 std::vector&lt;unsigned short&gt; triangles;

 std::vector&lt;float&gt; tex_coords;

 std::vector&lt;float&gt; point_disp_scale;

 

 // Test the scaled/textured/positioned spheres path

 // Uses the DisplacementScale attribute (dx,dy,dz,s) to scale 2D proxy

 // geometry, translate it by dx,dy,dz and render it with a sphere shader, 

 // colored and textured the same as other gltf geometry. The proxy geometry

 // should be 2D and centered about 0,0,0 with unity size \[-1,1\]. It will be

 // drawn using a billboard technique so the geometry should be in the x,y plane.

 for(size\_t j = 0; j &lt; 10; j++) {

 float y = (j * 0.1f) - 0.5f;

 for(size\_t i = 0; i &lt; 10; i++) {

 float x = (i * 0.1f) - 0.5f;

 float z = 0.f;

 float scale = j * 0.005;

 // make a copy of the quad and place it into the vertex/triangle arrays

 auto vertex_index = vertices.size() / 3;

 for(const auto idx : proxy_conn) triangles.push_back(idx + vertex_index);

 vertices.insert(vertices.end(), proxy_verts.begin(), proxy_verts.end());

 // Point location and size (applied to each proxy quad)

 for(size\_t vert = 0; vert &lt; proxy_verts.size() / 3; vert++) {

 point_disp_scale.push_back(x);

 point_disp_scale.push_back(y);

 point_disp_scale.push_back(z);

 point_disp_scale.push_back(scale);

 // texture mapping

 tex_coords.push_back(i);

 }

 }

 }

 

 // SCENE

 GLTFWriter::Scene *scene = <a id="a3" name="a3"></a>[GLTFWriter::Scene::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#aac8bcb85d4361abba99053b3c56eb08b)(gltf, "TestScene", "m", 1.0, 

 <a id="a4" name="a4"></a>[GLTFWriter::Scene::BT\_SOLID](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#ac17baf491cdba3613b0aa39719a3dbd8aeea551002921bb989b3ed35678ec982b), 0.5, 0.5, 0.5);

 if (!scene) {

 <a id="a5" name="a5"></a>[GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create scene");

 }

 

 // LIGHTS

 {

 // LIGHT NODE

 GLTFWriter::Node *lightNode = <a id="a6" name="a6"></a>[GLTFWriter::Node::CreateLight](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a7883624afdcaae45b6018944a040a01c)(gltf);

 if (!lightNode || !scene-&gt;SetLight(lightNode)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create light");

 }

 

 // LIGHTS

 GLTFWriter::Light *light1 = <a id="a7" name="a7"></a>[GLTFWriter::Light::CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a14a825d32570498d64b6a427fb4f8207)(gltf);

 lightNode-&gt;AppendLight(light1);

 

 GLTFWriter::Light *light2 = <a id="a8" name="a8"></a>[GLTFWriter::Light::CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#aa54e23609ac5f7a1a6808b62ee48163d)(gltf, 1, 1, 1, -1, -1, -3);

 lightNode-&gt;AppendLight(light2);

 }

 

 // CAMERA

 {

 // CAMERA

 GLTFWriter::Camera *camera = <a id="a9" name="a9"></a>[GLTFWriter::Camera::CreateOrthographic](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_camera.xhtml#acab0b8344a7bb8b65c9690d221705377)(gltf);

 // CAMERA NODE

 std::vector&lt;double&gt; mat(16);

 mat[0] = 1;

 mat[1] = 0;

 mat[2] = 0;

 mat[3] = 0;

 mat[4] = 0;

 mat[5] = 1;

 mat[6] = 0;

 mat[7] = 0;

 mat[8] = 0;

 mat[9] = 0;

 mat[10] = 1;

 mat[11] = 0;

 mat[12] = 0;

 mat[13] = 0;

 mat[14] = 0;

 mat[15] = 1;

 GLTFWriter::Node *cameraNode = <a id="a10" name="a10"></a>[GLTFWriter::Node::CreateCamera](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#af6c4767cc8271d9d39816d278538197a)(gltf, camera, "TestCamera", &amp;mat[0]);

 scene-&gt;SetCamera(cameraNode);

 }

 

 // PROXY IMAGE

 {

 // Using a PNG file from disk here, but could use in-memory PNG representation as well.

 GLTFWriter::Image* proxy_image = <a id="a11" name="a11"></a>[GLTFWriter::Image::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_image.xhtml#ad04a843016070a80bc8b18f4920abd47)(gltf, "earth.png", false, true);

 if (proxy_image) {

 GLTFWriter::Node* proxy_image_node = <a id="a12" name="a12"></a>[GLTFWriter::Node::CreateProxyImage](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a658b7d94873d5755526f32b0fb7d0d56)(gltf, proxy_image, "scene\_proxy");

 if (proxy_image_node) {

 scene-&gt;SetProxyImage(proxy_image_node);

 }

 }

 }

 

 // NODE

 {

 GLTFWriter::Node *node = <a id="a13" name="a13"></a>[GLTFWriter::Node::CreateMesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a4dd14791b2b9e65c115aa7a9e3f340e8)(gltf, "3D Points");

 if (!node || !scene-&gt;AppendMesh(node)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create mesh node");

 }

 

 // MESH

 GLTFWriter::Mesh *mesh = <a id="a14" name="a14"></a>[GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f7803b1b1eb72e4005665ca33f42788)(gltf);

 if (!mesh || !node-&gt;AppendMesh(mesh)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create mesh");

 }

 

 // TECHNIQUE

 GLTFWriter::Technique *technique = <a id="a15" name="a15"></a>[GLTFWriter::Technique::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_technique.xhtml#a13382537cb3622195e7cf0bf33e202c2)(gltf);

 if (!technique ||

 // TECHNIQUE STATES

 !technique-&gt;AppendState(<a id="a16" name="a16"></a>[GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)(gltf, <a id="a17" name="a17"></a>[GLTFWriter::State::ST\_BLENDENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a333b0ebeb6a896a3b0b973da1f1ce56a), 1)) ||

 !technique-&gt;AppendState([GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)(gltf, <a id="a18" name="a18"></a>[GLTFWriter::State::ST\_DEPTHTESTENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a5a304a50ef0c9a98124f4c998ec47f3b), 1))) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create technique");

 }

 

 // MATERIAL

 GLTFWriter::Material *material = <a id="a19" name="a19"></a>[GLTFWriter::Material::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_material.xhtml#a683cf8ee4a674e8e7a7b01c97797eecc)(gltf, technique);

 if (!material ||

 // MATERIAL UNIFORM VALUES

 !material-&gt;AppendValue(<a id="a20" name="a20"></a>[GLTFWriter::Value::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_value.xhtml#aee78dae95614f843f10d5e19f9d55d61)(gltf, "texture0", rainbowGradientTexture-&gt;GetID()))) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create material");

 }

 

 size\_t numVertices = vertices.size() / 3;

 

 // POSITION ATTRIBUTE

 GLTFWriter::Attribute *vertex = <a id="a21" name="a21"></a>[GLTFWriter::Attribute::CreatePosition](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a2490057f37890b1dd7debe04ddf1fd6f)(gltf, numVertices, vertices.data());

 

 // TEXCOORD ATTRIBUTE

 GLTFWriter::Attribute *texCoord = <a id="a22" name="a22"></a>[GLTFWriter::Attribute::CreateTextureCoord](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#af4bd5279c34932ef6afd15a858d39a6c)(gltf, 0, numVertices, tex_coords.data());

 if (!texCoord || !texCoord-&gt;SetMinMax(<a id="a23" name="a23"></a>[GLTFWriter::Attribute::AT\_FLOAT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#aa787c451052ac912fd9af91c4ff54ddba6d124c894e5bdc043eeebec0f852e857), &amp;tex_coord_min, &amp;tex_coord_max)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create textureCoord");

 }

 

 // DISPLACEMENTSCALE ATTRIBUTE

 // Specifies the displacement and scaling for each vertex in the proxy geometry

 // It also triggers "billboard" orientation.

 GLTFWriter::Attribute *displacement_scale = <a id="a24" name="a24"></a>[GLTFWriter::Attribute::CreateDisplacementScale](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#ab8a06a0c267a6e1dd895ca10e8c716eb)(gltf, numVertices, point_disp_scale.data());

 

 // INDEX ATTRIBUTE

 GLTFWriter::Index* index = <a id="a25" name="a25"></a>[GLTFWriter::Index::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_index.xhtml#ab4c4a14b880b4247257672358ad7ccfc)(gltf, triangles.size(), triangles.data());

 

 // PRIMITIVE

 GLTFWriter::Primitive *primitive = <a id="a26" name="a26"></a>[GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11dce37f59247e26bd6973ba5d7fefeb)(gltf, <a id="a27" name="a27"></a>[GLTFWriter::Primitive::PT\_TRIANGLES](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea85ba263ad510a4b423c5e1452fd5ca7d), material, index);

 if (!primitive ||

 !mesh-&gt;AppendPrimitive(primitive) ||

 !primitive-&gt;AppendAttribute(vertex) ||

 !primitive-&gt;AppendAttribute(texCoord) ||

 !primitive-&gt;AppendAttribute(displacement_scale)) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Can't create primitive");

 }

 }

 

 if (!gltf-&gt;Write()) {

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 throw std::runtime_error("Error creating file");

 }

 

 <a id="a28" name="a28"></a>[GLTFWriter::GLTF::GLTFError](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafe) error = gltf-&gt;GetError();

 

 [GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)(gltf);

 

 if (error != <a id="a29" name="a29"></a>[GLTFWriter::GLTF::GLTF\_ERROR\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafea049c3b804e69ae05c02f4c2dedf4e0ea))

 throw std::runtime_error("Error creating file");

}

[ANSYS::Nexus::GLTFWriter::Attribute::CreatePosition](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#a2490057f37890b1dd7debe04ddf1fd6f)

static Attribute * CreatePosition(GLTF *gltf, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Attribute::AT\_FLOAT](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#aa787c451052ac912fd9af91c4ff54ddba6d124c894e5bdc043eeebec0f852e857)

@ AT_FLOAT

4 byte float

**Definition:** [GLTFAttribute.h:42](_g_l_t_f_attribute_8h_source.xhtml#l00042)



[ANSYS::Nexus::GLTFWriter::Attribute::CreateDisplacementScale](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#ab8a06a0c267a6e1dd895ca10e8c716eb)

static Attribute * CreateDisplacementScale(GLTF *gltf, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Attribute::CreateTextureCoord](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_attribute.xhtml#af4bd5279c34932ef6afd15a858d39a6c)

static Attribute * CreateTextureCoord(GLTF *gltf, unsigned int num, unsigned int count, const float *data, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Camera::CreateOrthographic](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_camera.xhtml#acab0b8344a7bb8b65c9690d221705377)

static Camera * CreateOrthographic(GLTF *gltf, const char *name=0, float xmag=1, float ymag=1, float zfar=1000, float znear=-1000)



[ANSYS::Nexus::GLTFWriter::GLTF::Destroy](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#a586171eb8e873e909db02a7eb4d80f5c)

static void Destroy(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::GLTF::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#ab7ba6d114c76cb60baf41aa6f13e9494)

static GLTF * Create(const char *application, const char *applicationVersion, const char *filePath, OutputType fileType=OT_AVZ)



[ANSYS::Nexus::GLTFWriter::GLTF::GLTFError](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafe)

GLTFError

**Definition:** [GLTFGLTF.h:35](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00035)



[ANSYS::Nexus::GLTFWriter::GLTF::GLTF\_ERROR\_NONE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml#acf83a4d185d959503cb9f3f2c2e9fafea049c3b804e69ae05c02f4c2dedf4e0ea)

@ GLTF_ERROR_NONE

No Error.

**Definition:** [GLTFGLTF.h:36](_g_l_t_f_g_l_t_f_8h_source.xhtml#l00036)



[ANSYS::Nexus::GLTFWriter::Image::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_image.xhtml#ad04a843016070a80bc8b18f4920abd47)

static Image * Create(GLTF *gltf, const char *filePath, bool generateMipmap=false, bool isProxy=false)



[ANSYS::Nexus::GLTFWriter::Index::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_index.xhtml#ab4c4a14b880b4247257672358ad7ccfc)

static Index * Create(GLTF *gltf, unsigned int count, const unsigned short *indices, Buffer *buffer=0)



[ANSYS::Nexus::GLTFWriter::Light::CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a14a825d32570498d64b6a427fb4f8207)

static Light * CreateAmbient(GLTF *gltf, float colR=0.3, float colG=0.3, float colB=0.3)



[ANSYS::Nexus::GLTFWriter::Light::CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#aa54e23609ac5f7a1a6808b62ee48163d)

static Light * CreateDirectional(GLTF *gltf, float colR=1, float colG=1, float colB=1, float dirX=0, float dirY=0, float dirZ=-1, float specColR=1, float specColG=1, float specColB=1, float shininess=100)



[ANSYS::Nexus::GLTFWriter::Material::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_material.xhtml#a683cf8ee4a674e8e7a7b01c97797eecc)

static Material * Create(GLTF *gltf, Technique *technique)



[ANSYS::Nexus::GLTFWriter::Mesh::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_mesh.xhtml#a9f7803b1b1eb72e4005665ca33f42788)

static Mesh * Create(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::Node::CreateMesh](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a4dd14791b2b9e65c115aa7a9e3f340e8)

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



[ANSYS::Nexus::GLTFWriter::Node::CreateProxyImage](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a658b7d94873d5755526f32b0fb7d0d56)

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



[ANSYS::Nexus::GLTFWriter::Node::CreateLight](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#a7883624afdcaae45b6018944a040a01c)

static Node * CreateLight(GLTF *gltf)



[ANSYS::Nexus::GLTFWriter::Node::CreateCamera](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_node.xhtml#af6c4767cc8271d9d39816d278538197a)

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



[ANSYS::Nexus::GLTFWriter::Primitive::PT\_TRIANGLES](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a062b429c87d913e5adda11b381414c6ea85ba263ad510a4b423c5e1452fd5ca7d)

@ PT_TRIANGLES

Treats each triplet of vertices as an independent triangle.

**Definition:** [GLTFMesh.h:39](_g_l_t_f_mesh_8h_source.xhtml#l00039)



[ANSYS::Nexus::GLTFWriter::Primitive::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_primitive.xhtml#a11dce37f59247e26bd6973ba5d7fefeb)

static Primitive * Create(GLTF *gltf, PrimitiveType type, Material *material, Index *indices=0, bool isPickable=true)



[ANSYS::Nexus::GLTFWriter::Scene::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#aac8bcb85d4361abba99053b3c56eb08b)

static Scene * Create(GLTF *gltf, const char *name=0, const char *units=0, float scale=1, Scene::BackgroundType backgroundType=Scene::BT_NONE, float r1=0, float g1=0, float b1=0, float r2=0, float g2=0, float b2=0)



[ANSYS::Nexus::GLTFWriter::Scene::BT\_SOLID](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_scene.xhtml#ac17baf491cdba3613b0aa39719a3dbd8aeea551002921bb989b3ed35678ec982b)

@ BT_SOLID

Make solid color from color 1.

**Definition:** [GLTFScene.h:35](_g_l_t_f_scene_8h_source.xhtml#l00035)



[ANSYS::Nexus::GLTFWriter::State::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#a8cefd28a7477d1ab51809a51b21b8019)

static State * Create(GLTF *gltf, StateType type, double v1, double v2=0, double v3=0, double v4=0)



[ANSYS::Nexus::GLTFWriter::State::ST\_BLENDENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a333b0ebeb6a896a3b0b973da1f1ce56a)

@ ST_BLENDENABLE

Enables blending of fragment colors. Possible values are:

**Definition:** [GLTFTechnique.h:166](_g_l_t_f_technique_8h_source.xhtml#l00166)



[ANSYS::Nexus::GLTFWriter::State::ST\_DEPTHTESTENABLE](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_state.xhtml#affd67e37265c1883f760fd0c368ba718a5a304a50ef0c9a98124f4c998ec47f3b)

@ ST_DEPTHTESTENABLE

Enables testing of depth buffer. Possible values are:

**Definition:** [GLTFTechnique.h:186](_g_l_t_f_technique_8h_source.xhtml#l00186)



[ANSYS::Nexus::GLTFWriter::Technique::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_technique.xhtml#a13382537cb3622195e7cf0bf33e202c2)

static Technique * Create(GLTF *gltf, Program *program=0, bool is2D=false)



[ANSYS::Nexus::GLTFWriter::Texture::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#a3d15e0e6ad83cd7d50bb81ce2d0f30c8)

static Texture * Create(GLTF *gltf, TextureFormat format, TextureTarget target, Sampler *sampler, Image *image)



[ANSYS::Nexus::GLTFWriter::Texture::TF\_RGB](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_texture.xhtml#aba6db4f52b9f0a1a866bce302b6d8964aaa8ea9a0e6b83932a6a882b1655e8e59)

@ TF_RGB

3 unsigned chars per pixel.

**Definition:** [GLTFTexture.h:34](_g_l_t_f_texture_8h_source.xhtml#l00034)



[ANSYS::Nexus::GLTFWriter::Value::Create](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_value.xhtml#aee78dae95614f843f10d5e19f9d55d61)

static Value * Create(GLTF *gltf, const char *name, const Value *value=0)