MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nodes::Network::MeshSlot Struct Reference

Named, independently transformable mesh unit within a MeshNetwork. More...

#include <MeshSlot.hpp>

+ Collaboration diagram for MayaFlux::Nodes::Network::MeshSlot:

Public Attributes

std::vector< uint32_t > child_indices
 Indices of child slots. Populated by MeshNetwork::add_slot().
 
std::shared_ptr< Core::VKImagediffuse_texture
 Optional diffuse texture. Null means untextured for this slot.
 
bool dirty { true }
 Set when local_transform or slot config changes since last upload.
 
uint32_t index {}
 Position of this slot in MeshNetwork::m_slots. Stable after insertion.
 
glm::mat4 local_transform { 1.0F }
 Local-space transform relative to parent (or world if root).
 
std::string name
 Logical name. Used for lookup and logging only.
 
std::shared_ptr< GpuSync::MeshWriterNodenode
 Geometry node for this slot.
 
std::optional< uint32_t > parent_index
 Index of the parent slot, or nullopt for a root slot.
 
glm::mat4 world_transform { 1.0F }
 World-space transform, recomputed each cycle from the DAG.
 

Detailed Description

Named, independently transformable mesh unit within a MeshNetwork.

Each slot owns a MeshWriterNode holding its CPU-side geometry and carries a local-space transform. Parent indices form a DAG; MeshNetwork resolves topological order so parents are always processed before children.

World transform composes as: world = parent_world * local.

slot.dirty signals the buffer layer that slot-level configuration changed (transform, texture binding, parent reassignment) independently of whether the node's vertex data changed. The processor checks both: slot.dirty || slot.node->needs_gpu_update()

diffuse_texture is optional. When set, MeshNetworkBuffer binds it to the shader's diffuse slot for this slot's draw range. Slots sharing the same texture share one descriptor. Slots with distinct textures require the texture array path (deferred).

Definition at line 31 of file MeshSlot.hpp.


The documentation for this struct was generated from the following file: