12#include <nlohmann/json.hpp>
36 nlohmann::ordered_json
json;
94std::expected<std::vector<std::uint8_t>,
std::string>
Definition assetimport.h:11
std::expected< GltfModel, std::string > CarModelToGltf(std::span< const std::uint8_t > bytes, std::size_t imageOffset, std::string_view bufferUri)
Describe the model of a car as glTF.
std::expected< GltfModel, std::string > FrontEndModelToGltf(std::span< const std::uint8_t > bytes, std::string_view bufferUri)
Describe a model of the front end, such as a logo of the splash screens, as glTF.
std::expected< std::vector< std::uint8_t >, std::string > ModelFromGltf(const nlohmann::ordered_json &json, std::span< const std::uint8_t > buffer)
Build the file of a model or a track from its glTF, the inverse of CarModelToGltf(),...
std::expected< GltfModel, std::string > TrackToGltf(std::span< const std::uint8_t > bytes, std::string_view bufferUri)
Describe a track as glTF.
A texture of a glTF document, as the RDP samples it.
Definition n64model.h:17
std::vector< std::uint8_t > rgba
Definition n64model.h:21
std::vector< std::uint8_t > indices
The 4-bit texels of an image the colour of a car paints, two to a byte with the first in the high fou...
Definition n64model.h:24
std::string uri
Definition n64model.h:18
std::size_t address
The offset of the texels in the image of the model.
Definition n64model.h:31
int width
Definition n64model.h:19
int paintMaterial
The material of the car, a VEHICLE_MATERIAL_ value, whose entry of the palette gives the alpha of the...
Definition n64model.h:29
int height
Definition n64model.h:20
std::vector< std::uint8_t > palette
The 16 colours of the texels of indices, each a big-endian RGBA5551 half.
Definition n64model.h:26
A glTF document, the bytes of its one buffer, and its images.
Definition n64model.h:35
std::vector< std::uint8_t > buffer
Definition n64model.h:37
nlohmann::ordered_json json
Definition n64model.h:36
std::vector< GltfImage > images
Definition n64model.h:38