41 int voxelCount()
const;
45 int index(
int x,
int y,
int z)
const;
49 bool inBounds(
const glm::ivec3&
c)
const;
56 float sample(
const glm::vec3&
p)
const;
71 glm::vec3 gradient(
const glm::vec3&
p)
const;
103 static MeshSdf makeFromTriangles(
const std::vector<glm::vec3>&
positions,
const std::vector<uint32_t>&
indices,
104 const glm::ivec3& dims);
#define EVENGINE_API_DOMAINS
std::vector< std::uint32_t > indices
std::vector< float > positions
Uniform signed-distance voxel field over a box.
std::vector< float > distances
Signed distances, dims.x * dims.y * dims.z floats.
GLSL compute kernels for the GPU surface-flow solver.
One trilinear SDF sample and its local-space analytic gradient.