|
Toast Engine
|
#include <cstdint>#include <glm/glm.hpp>#include <optional>#include <span>#include <string>#include <toast/export.hpp>#include <toast/voxel/brick_pool.hpp>#include <toast/voxel/palette.hpp>#include <toast/voxel/stamp.hpp>#include <toast/voxel/voxel_volume.hpp>#include <vector>

Go to the source code of this file.
Classes | |
| struct | assets::VoxVoxel |
| struct | assets::VoxModel |
| struct | assets::VoxTransform |
| Translation positions the node centre not its corner. More... | |
| struct | assets::VoxNode |
| struct | assets::VoxScene |
| struct | assets::VoxPlacement |
Functions | |
| auto | assets::voxOrientationFromByte (uint8_t rotation) -> std::optional< voxel::LatticeOrientation > |
| Bits 0-1 source axis of x bits 2-3 source axis of y bits 4-6 negate x y z so the identity is 4 not 0. | |
| auto | assets::voxOrientationToByte (const LatticeOrientation &orientation) -> uint8_t |
| auto | assets::composeVoxTransforms (const VoxTransform &parent, const VoxTransform &local) -> VoxTransform |
| auto | assets::voxPlacementOf (const VoxTransform &world, glm::uvec3 model_dims) -> voxel::LatticePlacement |
| Half the size moves into the offset floored on unflipped axes and rounded up on flipped ones. | |
| auto | assets::flattenVoxScene (const VoxScene &scene) -> std::vector< VoxPlacement > |
| auto | assets::buildVoxVolume (const VoxModel &model, BrickPool &pool) -> std::optional< Volume > |
| auto | assets::importVox (std::span< const uint8_t > data) -> VoxScene |
Variables | |
| constexpr uint32_t | assets::k_vox_max_dim = 256 |
|
nodiscard |
| std::runtime_error | on anything unrepresentable |