ANSYS::Nexus::GLTFWriter::Light Class Reference
Last update: 17.04.2023Lights define the light objects that can be added to a light node. More...
#include <GLTFWriter.h>
Inheritance diagram for ANSYS::Nexus::GLTFWriter::Light:
Static Public Member Functions | |
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) |
Detailed Description
Lights define the light objects that can be added to a light node.
Lights are only required for techniques that have auto-generated programs. For auto-generated programs, the programs contain lighting code for each light. Currently only Ambient and Directional lights are supported.
For non-auto-generated programs, it is the responsibility of the program writer to generate a program that performs lighting calculations.
Definition at line 30 of file GLTFLight.h.
Member Function Documentation
◆ CreateAmbient()
|
static |
Creates an Ambient light.
- Returns
- Light object. Do not delete this pointer.
- Parameters
-
[in] gltf GLTF object. [in] colR Optional, red component. Ranges from 0 to 1. [in] colG Optional, green component. Ranges from 0 to 1. [in] colB Optional, blue component. Ranges from 0 to 1.
- Examples
- Test001.cpp, Test004.cpp, Test005.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test012.cpp, and Test014.cpp.
◆ CreateDirectional()
|
static |
Creates a Directional light.
- Returns
- Light object. Do not delete this pointer.
- Parameters
-
[in] gltf GLTF object. [in] colR Optional, red component. Ranges from 0 to 1. [in] colG Optional, green component. Ranges from 0 to 1. [in] colB Optional, blue component. Ranges from 0 to 1. [in] dirX Optional, X component of direction. [in] dirY Optional, Y component of direction. [in] dirZ Optional, Z component of direction. [in] specColR Optional, red component of specular reflection. Ranges from 0 to 1. [in] specColG Optional, green component of specular reflection. Ranges from 0 to 1. [in] specColB Optional, blue component of specular reflection. Ranges from 0 to 1. [in] shininess Optional, shininess of specular reflection. Ranges from 0 to 128.
- Examples
- Test001.cpp, Test004.cpp, Test005.cpp, Test006.cpp, Test007.cpp, Test008.cpp, Test009.cpp, Test010.cpp, Test012.cpp, and Test014.cpp.
The documentation for this class was generated from the following file:
- D:/ANSYSDev/NoBackup/branches/EnSight-Second-Coming/webgl_viewer/gltfwriterlib/include/GLTFLight.h