|
NSUNI/NSLAR Library a250670
|
Classes | |
| struct | nnl::posd::Position |
| Represents a spawn position in the world. More... | |
Typedefs | |
| using | nnl::posd::PositionData = std::vector<Position> |
| A vector of Position structs. | |
Functions | |
| std::vector< SPosition > | nnl::posd::Convert (const PositionData &posd) |
| Converts a spawn position config into a format that is more suitable for further exporting into other formats. | |
| PositionData | nnl::posd::Convert (const std::vector< SPosition > &positions) |
| Converts a vector of spawn positions to a spawn position config. | |
| bool | nnl::posd::IsOfType (BufferView buffer) |
| Tests if the provided file is a spawn position config. | |
| PositionData | nnl::posd::Import (BufferView buffer) |
| Parses a binary file and converts it to PositionData. | |
| Buffer | nnl::posd::Export (const PositionData &posd) |
| Converts a spawn position config to a binary file representation. | |
| struct nnl::posd::Position |
Represents a spawn position in the world.
This struct is used to set spawn positions of objects, NPC's, and mission circles.
Public Attributes | |
| u32 | id = 0 |
| glm::vec3 | position {0.0f} |
| The 3D coordinates (x, y, z) of the position. | |
| f32 | radius = 80.0f |
| May affect the size of a mission circle. | |
| f32 | rotation = 0.0f |
| Rotation angle around the Y axis in degrees [-180.0, 180.0f]. | |
| u32 nnl::posd::Position::id = 0 |
Unique identifier for the position. The game may look for this id when spawning an entity.
| glm::vec3 nnl::posd::Position::position {0.0f} |
The 3D coordinates (x, y, z) of the position.
| f32 nnl::posd::Position::radius = 80.0f |
May affect the size of a mission circle.
| f32 nnl::posd::Position::rotation = 0.0f |
Rotation angle around the Y axis in degrees [-180.0, 180.0f].
| using nnl::posd::PositionData = std::vector<Position> |
A vector of Position structs.
This alias represents a collection of Position objects that set spawn positions of various objects in a scene.
| std::vector< SPosition > nnl::posd::Convert | ( | const PositionData & | posd | ) |
Converts a spawn position config into a format that is more suitable for further exporting into other formats.
| posd | The spawn position config to be converted. |
| PositionData nnl::posd::Convert | ( | const std::vector< SPosition > & | positions | ) |
Converts a vector of spawn positions to a spawn position config.
| positions | A vector of spawn positions to be converted. |
|
nodiscard |
Converts a spawn position config to a binary file representation.
This function takes a PositionData object and converts it into a Buffer, which represents the binary format of the spawn position config.
| posd | The PositionData object to be converted into a binary format. |
| PositionData nnl::posd::Import | ( | BufferView | buffer | ) |
Parses a binary file and converts it to PositionData.
This function takes a binary representation of a spawn position config, parses its contents, and converts them into a PositionData object for easier access and manipulation.
| buffer | The binary data to be processed. |
| bool nnl::posd::IsOfType | ( | BufferView | buffer | ) |
Tests if the provided file is a spawn position config.
This function takes data representing a file and checks whether it corresponds to the in-game spawn position config.
| buffer | The data to be tested. |