|
NSUNI/NSLAR Library a250670
|
Classes | |
| struct | nnl::lit::Light |
| Represents a directional light in the scene. This structure represents a directional light source that affects dynamically lit materials. More... | |
| struct | nnl::lit::Lit |
| Represents a lighting configuration for a scene. More... | |
Functions | |
| std::vector< nnl::SLight > | nnl::lit::Convert (const Lit &lit) |
| Converts a light config to a more generic representation that is more suitable for exporting into other formats. | |
| Lit | nnl::lit::Convert (const std::vector< nnl::SLight > &slights, glm::vec3 ambient=glm::vec3(0), bool enable_specular=true, float character_brightness=1.0f) |
| Converts a vector of lights to a light config. | |
| bool | nnl::lit::IsOfType (BufferView buffer) |
| Tests if the provided file is a light source config. | |
| Lit | nnl::lit::Import (BufferView buffer) |
| Parses a binary file and converts it to a Lit struct. | |
| Buffer | nnl::lit::Export (const Lit &lit) |
| Converts a light config to a binary file representation. | |
| struct nnl::lit::Light |
Represents a directional light in the scene. This structure represents a directional light source that affects dynamically lit materials.
Public Attributes | |
| bool | active = false |
| Indicates if the light is used. | |
| glm::vec3 | direction = {0, 1.0f, 0} |
| Direction to the light source. | |
| u32 | diffuse = 0xFF'FF'FF'FF |
| u32 | specular = 0xFF'00'00'00 |
| bool nnl::lit::Light::active = false |
Indicates if the light is used.
| u32 nnl::lit::Light::diffuse = 0xFF'FF'FF'FF |
Diffuse color of the light in ABGR format (alpha is ignored)
| glm::vec3 nnl::lit::Light::direction = {0, 1.0f, 0} |
Direction to the light source.
| u32 nnl::lit::Light::specular = 0xFF'00'00'00 |
Specular color of the light in ABGR format (alpha is ignored)
| struct nnl::lit::Lit |
Represents a lighting configuration for a scene.
Public Attributes | |
| std::array< Light, 3 > | lights |
| glm::vec3 | cel_shadow_light_direction = {0, 1.0f, 0} |
| u8 | character_brightness = 0xFF |
| u32 | global_ambient = 0xFF'7F'7F'7F |
| glm::vec3 nnl::lit::Lit::cel_shadow_light_direction = {0, 1.0f, 0} |
Controls the direction of the environmental "light".
| u8 nnl::lit::Lit::character_brightness = 0xFF |
A multiplier for characters' ambient, diffuse, specular colors.
| u32 nnl::lit::Lit::global_ambient = 0xFF'7F'7F'7F |
Global ambient light in ABGR format (alpha is ignored)
| std::vector< nnl::SLight > nnl::lit::Convert | ( | const Lit & | lit | ) |
Converts a light config to a more generic representation that is more suitable for exporting into other formats.
| lit | The light config to be converted. |
| Lit nnl::lit::Convert | ( | const std::vector< nnl::SLight > & | slights, |
| glm::vec3 | ambient = glm::vec3(0), | ||
| bool | enable_specular = true, | ||
| float | character_brightness = 1.0f ) |
Converts a vector of lights to a light config.
| slights | A vector of lights to be converted. |
| ambient | The color of the ambient light. If set to (0,0,0), it's computed automatically. |
| enable_specular | If the specular component should be enabled. |
| character_brightness | A multiplier that affects materials of characters. |
Converts a light config to a binary file representation.
This function takes a Lit object and converts it into a Buffer, which represents the binary format of the light config.
| lit | The Lit object to be converted into a binary format. |
| Lit nnl::lit::Import | ( | BufferView | buffer | ) |
Parses a binary file and converts it to a Lit struct.
This function takes a binary representation of a light config, parses its contents, and converts them into a Lit struct for easier access and manipulation.
| buffer | The binary data to be processed. |
| bool nnl::lit::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is a light source config.
This function takes data representing a file and checks whether it corresponds to the in-game light source config format.
| buffer | The data to be tested. |