62 std::shared_ptr<GpuSync::MeshWriterNode> node,
63 std::optional<uint32_t>
parent = std::nullopt);
76 [[nodiscard]]
MeshSlot* find_slot(std::string_view
name);
77 [[nodiscard]]
const MeshSlot* find_slot(std::string_view
name)
const;
83 [[nodiscard]] std::optional<uint32_t> find_slot_index(std::string_view
name)
const;
88 [[nodiscard]]
size_t slot_count()
const {
return m_slots.size(); }
93 [[nodiscard]]
const std::vector<MeshSlot>&
slots()
const {
return m_slots; }
94 [[nodiscard]] std::vector<MeshSlot>&
slots() {
return m_slots; }
106 [[nodiscard]] std::optional<Kakshya::MeshData> get_mesh_data()
const;
112 void process_batch(
unsigned int num_samples)
override;
113 void reset()
override;
116 [[nodiscard]] std::optional<double> get_node_output(
size_t index)
const override;
117 [[nodiscard]] std::unordered_map<std::string, std::string> get_metadata()
const override;
127 void set_operator(std::shared_ptr<NetworkOperator> op);
134 template <
typename OpType,
typename... Args>
137 auto op = std::make_shared<OpType>(std::forward<Args>(args)...);
144 return m_operator.get();
149 return m_operator.get();
154 return m_operator !=
nullptr;
161 [[nodiscard]]
const std::vector<uint32_t>&
sorted_indices()
const {
return m_sorted_indices; }
168 void ensure_sorted();
177 bool m_sort_dirty {
true };
182 void propagate_world_transforms();
std::vector< uint32_t > parent
std::vector< MeshSlot > m_slots
bool has_operator() const override
std::vector< uint32_t > m_sorted_indices
Processing order: indices into m_slots, parents before children.
size_t get_node_count() const override
Get the number of nodes in the network.
size_t slot_count() const
Number of slots in the network.
~MeshNetwork() override=default
std::shared_ptr< NetworkOperator > m_operator
NetworkOperator * get_operator() override
const std::vector< MeshSlot > & slots() const
Read-only access to the full slot list.
std::vector< MeshSlot > & slots()
const std::vector< uint32_t > & sorted_indices() const
Get the processing order of slots as indices into m_slots.
std::shared_ptr< OpType > create_operator(Args &&... args)
Construct and set the primary operator in one call.
const NetworkOperator * get_operator() const override
NodeNetwork subclass whose nodes are named, hierarchically transformable mesh slots.
Domain-agnostic interpretive lens for network processing.
Abstract base class for structured collections of nodes with defined relationships.
Named, independently transformable mesh unit within a MeshNetwork.