Skip to main content

Post-processing tools 2025 R1

GLTFLight

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_GLTFLIGHT__
14#define __INCLUDED_GLTF_GLTFLIGHT__
15
16#include "GLTFCommon.h"
17#include "GLTFObject.h"
18
19namespace ANSYS { namespace AVZ { namespace GLTFWriter {
20 class GLTF;
21
30 class Light : public Object
31 {
32 protected:
33 virtual ~Light() {}
34
35 public:
38 static GLTFWRITERSPEC Light *CreateDirectional(GLTF *gltf,
39 float colR = 1,
40 float colG = 1,
41 float colB = 1,
42 float dirX = 0,
43 float dirY = 0,
44 float dirZ = -1,
45 float specColR = 1,
46 float specColG = 1,
47 float specColB = 1,
48 float shininess = 100
49 );
52 static GLTFWRITERSPEC Light *CreateAmbient(GLTF *gltf,
53 float colR = 0.3,
54 float colG = 0.3,
55 float colB = 0.3
56 );
57 };
58
59} } }
60
61#endif
This is the main class of the GLTFWriter.
Definition GLTFGLTF.h:32
Lights define the light objects that can be added to a light node.
Definition GLTFLight.h:31
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)
static Light * CreateAmbient(GLTF *gltf, float colR=0.3, float colG=0.3, float colB=0.3)
GLTFWriter API Documentation.

Connect with Ansys