MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ BuoyancyProcessor() [1/2]

MayaFlux::Buffers::BuoyancyProcessor::BuoyancyProcessor ( std::string  temperature_field,
std::string  density_field,
std::string  velocity_field,
const glm::vec3 &  direction,
const std::string &  shader_path 
)

Construct a buoyancy stage.

Parameters
temperature_fieldName of the scalar field driving rise. Must have stride sizeof(float).
density_fieldName of the scalar field driving fall. Must have stride sizeof(float). May equal temperature_field.
velocity_fieldName of the field accumulated into. Must have stride sizeof(glm::vec4) and be double-buffered.
directionForce axis and magnitude in world units.
shader_pathPath to the compute shader.

Definition at line 40 of file BuoyancyProcessor.cpp.

47 make_bindings(temperature_field, density_field, velocity_field), shader_path)
48 , m_temperature_field(std::move(temperature_field))
49 , m_density_field(std::move(density_field))
50 , m_velocity_field(std::move(velocity_field))
51 , m_direction(direction)
52{
54}
static std::vector< FieldBinding > make_bindings(const std::string &temperature_field, const std::string &density_field, const std::string &velocity_field)
Build the binding table for the three field names.
VolumeFieldProcessor(std::vector< FieldBinding > bindings, const std::string &shader_path)
Construct from a shader path.
void add_swap_field(std::string field)
Register a field to swap after each dispatch.

References MayaFlux::Buffers::VolumeFieldProcessor::add_swap_field(), and m_velocity_field.

+ Here is the call graph for this function: