|
MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
|
Uniform grid parameters shared by every stage of the hash build. More...
#include <SpatialHashProcessor.hpp>
Collaboration diagram for MayaFlux::Buffers::SpatialHashConfig:Public Member Functions | |
| uint32_t | cell_count () const |
| Total cell count, grid_dims.x * grid_dims.y * grid_dims.z. | |
| void | declare_fields (const std::shared_ptr< NetworkGeometryBuffer > &buffer) const |
| Declare the four state fields the hash build stages read and write, sized from this config. | |
Static Public Member Functions | |
| static std::optional< SpatialHashConfig > | from_network (const std::shared_ptr< NetworkGeometryBuffer > &buffer, float cell_size) |
| Build hash grid parameters from a NetworkGeometryBuffer's network and its primary operator. | |
Public Attributes | |
| float | cell_size |
| glm::uvec3 | grid_dims |
| glm::vec3 | grid_min |
| uint32_t | particle_count |
| uint32_t | position_word_offset |
| uint32_t | stride_words |
Uniform grid parameters shared by every stage of the hash build.
Cell size is ordinarily the owning ParticleNetwork's interaction radius: a neighbour query at that radius only needs to visit the 27 cells around the query particle's own cell. grid_min/grid_dims describe an axis-aligned box of grid_dims.x * grid_dims.y * grid_dims.z cells covering the network's bounds; a particle outside the box clamps to the nearest edge cell rather than being dropped.
particle_count, stride_words and position_word_offset describe the vertex record layout the same way GpuFieldOperator does: word offset of the position attribute within one record, and the record stride in words. Fixed at construction, matching NetworkGeometryBuffer::declare_state's own documented limitation: none of this tracks later growth of the network.
Definition at line 30 of file SpatialHashProcessor.hpp.