|
Toast Engine
|
Voxel shapes built from an ordered list of volumes. More...
#include "voxel_bucket.hpp"#include "voxel_group.hpp"#include "voxel_node.hpp"#include "voxel_piece.hpp"#include "voxel_volume.hpp"#include <cstdint>#include <future>#include <memory>#include <optional>#include <span>#include <toast/voxel/stamp.hpp>#include <toast/voxel/voxel_edit.hpp>#include <unordered_map>#include <vector>
Go to the source code of this file.
Classes | |
| class | toast::ProceduralVoxel |
| struct | toast::ProceduralVoxel::PieceLayout |
| struct | toast::ProceduralVoxel::Composed |
Functions | |
| auto | toast::insideProceduralVoxel (Node &node) -> bool |
| auto | toast::owningProceduralVoxel (Node &node) -> ProceduralVoxel * |
| auto | toast::parentToShape (Node &node) -> glm::mat4 |
| auto | toast::piecePlacement (VoxelPiece &piece) -> voxel::LatticePlacement |
| auto | toast::pieceBounds (VoxelPiece &piece) -> voxel::EditBounds |
| void | toast::placePiece (VoxelPiece &piece, const voxel::LatticeOrientation &orientation, glm::ivec3 min, glm::ivec3 max) |
| auto | toast::planeToShape (glm::vec4 plane, const voxel::LatticePlacement &placement) noexcept -> glm::vec4 |
| auto | toast::planeToPiece (glm::vec4 plane, const voxel::LatticePlacement &placement) noexcept -> glm::vec4 |
Voxel shapes built from an ordered list of volumes.
A ProceduralVoxel rebuilds its shape from its children, top to bottom Groups are walked depth first and disabled children are skipped
Every piece draws into its own grid with its first script's editShape The grid is cached so moving, rotating or reordering pieces never runs a script again
|
nodiscard |
|
nodiscard |
The ProceduralVoxel node is built into, through any groups, null when there is none
|
nodiscard |
The transform from node's parent to its ProceduralVoxel, in metres
|
nodiscard |
The box the piece covers on the shape, its size and not the brick rounded grid
|
nodiscard |
Where the piece grid lands on the shape, snapped to the lattice
| TOAST_API void toast::placePiece | ( | VoxelPiece & | piece, |
| const voxel::LatticeOrientation & | orientation, | ||
| glm::ivec3 | min, | ||
| glm::ivec3 | max ) |
Moves and resizes piece so it covers min..max with orientation
|
nodiscardnoexcept |
A clip plane from shape voxels to piece voxels
|
nodiscardnoexcept |
A clip plane from piece voxels to shape voxels