Files
FluidSimCpp/include/FluidSim/ScenarioGeometry.hpp

18 lines
625 B
C++

#pragma once
#include "FluidSim/AudioProcessing.hpp"
#include <array>
namespace fluidsim::port {
struct ScenarioSnapshot;
// Fractions refer to simulated pipe length; positions are world metres.
// Both the pipe mesh and its acoustic mouths use these same routes.
struct PipeRoute {
std::array<Vec3, 64> points{};
std::array<float, 64> fractions{};
unsigned count{};
};
std::array<PipeRoute, 32> scenario_pipe_routes(const ScenarioSnapshot& state);
bool scenario_pipe_is_exhaust(const ScenarioSnapshot& state, std::size_t pipe_index);
std::array<Vec3, 3> scenario_sound_sources(const ScenarioSnapshot& state);
}