    

 ## On this page

  

 

 # GLTFLight

 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\_GLTFLIGHT\_\_

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

<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 Nexus { namespace GLTFWriter {

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

<a id="l00021" name="l00021"></a> 21 

<a id="l00030" name="l00030"></a>[ 30](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml) class [Light](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.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 [~Light](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml)() {}

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

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

<a id="l00038" name="l00038"></a>[ 38](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a242c05a2270b54511cd45ab4eb4c0bee) static GLTFWRITERSPEC [Light](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml) *[CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a242c05a2270b54511cd45ab4eb4c0bee)([GLTF](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00039" name="l00039"></a> 39 float colR = 1, 

<a id="l00040" name="l00040"></a> 40 float colG = 1, 

<a id="l00041" name="l00041"></a> 41 float colB = 1, 

<a id="l00042" name="l00042"></a> 42 float dirX = 0, 

<a id="l00043" name="l00043"></a> 43 float dirY = 0, 

<a id="l00044" name="l00044"></a> 44 float dirZ = -1, 

<a id="l00045" name="l00045"></a> 45 float specColR = 1, 

<a id="l00046" name="l00046"></a> 46 float specColG = 1, 

<a id="l00047" name="l00047"></a> 47 float specColB = 1, 

<a id="l00048" name="l00048"></a> 48 float shininess = 100 

<a id="l00049" name="l00049"></a> 49 );

<a id="l00052" name="l00052"></a>[ 52](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a8e58f0f1593a80aaa57dcbdf0a0cfaee) static GLTFWRITERSPEC [Light](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml) *[CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a8e58f0f1593a80aaa57dcbdf0a0cfaee)([GLTF](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_g_l_t_f.xhtml) *gltf, 

<a id="l00053" name="l00053"></a> 53 float colR = 0.3, 

<a id="l00054" name="l00054"></a> 54 float colG = 0.3, 

<a id="l00055" name="l00055"></a> 55 float colB = 0.3 

<a id="l00056" name="l00056"></a> 56 );

<a id="l00057" name="l00057"></a> 57 };

<a id="l00058" name="l00058"></a> 58 

<a id="l00059" name="l00059"></a> 59} } } 

<a id="l00060" name="l00060"></a> 60 

<a id="l00061" name="l00061"></a> 61\#endif

[ANSYS::Nexus::GLTFWriter::GLTF](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::Light](class_a_n_s_y_s_1_1_nexus_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::Nexus::GLTFWriter::Light::CreateDirectional](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a242c05a2270b54511cd45ab4eb4c0bee)

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::Light::CreateAmbient](class_a_n_s_y_s_1_1_nexus_1_1_g_l_t_f_writer_1_1_light.xhtml#a8e58f0f1593a80aaa57dcbdf0a0cfaee)

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



[ANSYS](namespace_a_n_s_y_s.xhtml)

GLTFWriter API Documentation.

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