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

◆ NetworkGeometryBuffer()

MayaFlux::Buffers::NetworkGeometryBuffer::NetworkGeometryBuffer ( std::shared_ptr< Nodes::Network::NodeNetwork network,
const std::string &  binding_name = "network_geometry",
float  over_allocate_factor = 2.0F 
)
explicit

Create geometry buffer from network.

Parameters
networkNodeNetwork containing geometry nodes (e.g., ParticleNetwork)
binding_nameLogical name for this geometry binding (default: "network_geometry")
over_allocate_factorBuffer size multiplier for dynamic growth (default: 2.0x)

Buffer size is calculated based on network node count and estimated vertex size. Higher over_allocate_factor recommended for networks that may grow dynamically.

Definition at line 62 of file NetworkGeometryBuffer.cpp.

66 : VKBuffer(
67 calculate_buffer_size(network, over_allocate_factor),
70 , m_network(std::move(network))
71 , m_binding_name(binding_name)
72{
73 if (!m_network) {
74 error<std::invalid_argument>(
77 std::source_location::current(),
78 "Cannot create NetworkGeometryBuffer with null NodeNetwork");
79 }
80
82 "Created NetworkGeometryBuffer '{}' for {} nodes ({} bytes estimated)",
84 m_network->get_node_count(),
86}
#define MF_INFO(comp, ctx,...)
Core::GlobalNetworkConfig network
Definition Config.cpp:37
std::shared_ptr< Nodes::Network::NodeNetwork > m_network
static size_t calculate_buffer_size(const std::shared_ptr< Nodes::Network::NodeNetwork > &network, float over_allocate_factor)
Calculate initial buffer size based on network node count.
vk::DeviceSize get_size_bytes() const
Definition VKBuffer.hpp:279
@ Init
Engine/subsystem initialization.
@ Buffers
Buffers, Managers, processors and processing chains.

References MayaFlux::Journal::Buffers, MayaFlux::Buffers::VKBuffer::get_size_bytes(), MayaFlux::Journal::Init, m_binding_name, m_network, and MF_INFO.

+ Here is the call graph for this function: