|
Toast Engine
|
TODO: Brief description of the file's purpose. More...
#include <algorithm>#include <array>#include <cmath>#include <cstdint>#include <glm/glm.hpp>#include <limits>#include <span>#include <toast/physics/aabb.hpp>#include <toast/voxel/palette.hpp>#include <toast/voxel/surface.hpp>#include <toast/voxel/voxel_volume.hpp>#include <type_traits>
Go to the source code of this file.
Classes | |
| struct | physics::VoxelQueryContext |
| struct | physics::VoxelCandidate |
| struct | physics::VoxelRayEntry |
Functions | |
| template<typename Callback> | |
| auto | physics::_detail::invokeVoxelCallback (Callback &callback, const VoxelCandidate &candidate) -> bool |
| template<typename Callback> | |
| void | physics::queryVoxelSurface (const VoxelQueryContext &context, const AABB &aabb, Callback &&callback) |
| auto | physics::_detail::rayTieSlack (float t) -> float |
| template<typename OnEntry> | |
| void | physics::queryVoxelRay (const VoxelQueryContext &context, const AABB &bounds, glm::vec3 origin, glm::vec3 direction, float max_distance, bool hit_passable, OnEntry &&on_entry) |
Variables | |
| constexpr float | physics::_detail::k_ray_tie_epsilon = 1.0e-6f |
TODO: Brief description of the file's purpose.
| void physics::queryVoxelRay | ( | const VoxelQueryContext & | context, |
| const AABB & | bounds, | ||
| glm::vec3 | origin, | ||
| glm::vec3 | direction, | ||
| float | max_distance, | ||
| bool | hit_passable, | ||
| OnEntry && | on_entry ) |
| bounds | Where the voxels are |
| hit_passable | whether voxels of passable materials count as solid |
| on_entry | is given each VoxelRayEntry and returns how far the walk may go on in metres |