NSUNI/NSLAR Library a250670
Loading...
Searching...
No Matches

Classes

struct  nnl::fog::Fog
 Defines settings for depth-based environmental fog. More...

Functions

bool nnl::fog::IsOfType (BufferView buffer)
 Tests if the provided file is a fog config.
Fog nnl::fog::Import (BufferView buffer)
 Parses a binary file and converts it to a Fog struct.
Buffer nnl::fog::Export (const Fog &fog)
 Converts a fog config to a binary file representation.

Detailed Description


Class Documentation

◆ nnl::fog::Fog

struct nnl::fog::Fog

Defines settings for depth-based environmental fog.

Note
This type of config is used only by NSLAR! While it can be found in NSUNI, it has no functional impact there.
See also
nnl::render::RenderConfig

Public Attributes

f32 near_ = 0.0f
 Distance where the fog starts to cover objects.
f32 far_ = 0.0f
 Distance where the fog fully covers objects.
u32 color = 0xFF'00'00'00

Member Data Documentation

◆ color

u32 nnl::fog::Fog::color = 0xFF'00'00'00

Color of the fog in the ABGR format (alpha is ignored)

◆ far_

f32 nnl::fog::Fog::far_ = 0.0f

Distance where the fog fully covers objects.

◆ near_

f32 nnl::fog::Fog::near_ = 0.0f

Distance where the fog starts to cover objects.

Function Documentation

◆ Export()

Buffer nnl::fog::Export ( const Fog & fog)
nodiscard

Converts a fog config to a binary file representation.

This function takes a Fog object and converts it into a Buffer, which represents the binary format of the fog config.

Parameters
fogThe Fog object to be converted into a binary format.
Returns
A Buffer containing the binary representation of the config.

◆ Import()

Fog nnl::fog::Import ( BufferView buffer)

Parses a binary file and converts it to a Fog struct.

This function takes a binary representation of a fog config, parses its contents, and converts them into a Fog struct for easier access and manipulation.

Parameters
bufferThe binary data to be processed.
Returns
A Fog object representing the converted data.
See also
nnl::fog::IsOfType
nnl::fog::Export

◆ IsOfType()

bool nnl::fog::IsOfType ( BufferView buffer)

Tests if the provided file is a fog config.

This function takes data representing a file and checks whether it corresponds to the in-game fog config format.

Parameters
bufferThe data to be tested.
Returns
Returns true if the file is identified as a fog config;
See also
nnl::fog::Import