Toast Engine
Loading...
Searching...
No Matches
voxel_query.hpp File Reference

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>
Include dependency graph for voxel_query.hpp:

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

Detailed Description

TODO: Brief description of the file's purpose.

Author
Xein
Date
17 Sep 2026

Function Documentation

◆ queryVoxelRay()

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 )
Parameters
boundsWhere the voxels are
hit_passablewhether voxels of passable materials count as solid
on_entryis given each VoxelRayEntry and returns how far the walk may go on in metres