MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
StructureConfig.hpp
Go to the documentation of this file.
1#pragma once
2
10
11namespace MayaFlux {
12
13namespace Core {
14 class VKImage;
15}
16
17namespace Nodes::GpuSync {
18class MeshWriterNode;
19}
20
21namespace Nodes::Network {
22class InstanceNetwork;
23class MeshNetwork;
24}
25
26/**
27 * @struct StructureConfig
28 * @brief API-side playground for a complete visible structure.
29 *
30 * A StructureConfig accepts the concrete forms already present in the API,
31 * plus the required rendering destination. Exactly one source is selected by
32 * the eventual Creator consumer.
33 *
34 * This type is not a library contract. It is the API experiment from which
35 * repeated, concrete arrangements may later earn class-level configuration.
36 */
38 /** @brief Render target and pipeline overrides. target_window is required. */
40
41 /** @brief A one-shot typed mesh expression, normally invoking Kinesis. */
42 using MeshExpression = std::function<Kakshya::MeshData()>;
43
44 /**
45 * @struct Object
46 * @brief One independently rendered mesh-backed object.
47 */
48 struct Object {
49 /** @brief Fixed materialised source. Exclusive with expression and writer. */
50 std::optional<Kakshya::MeshData> mesh;
51 /** @brief Fixed construction expression. Exclusive with mesh and writer. */
53 /** @brief Live geometry source. Exclusive with mesh and expression. */
54 std::shared_ptr<Nodes::GpuSync::MeshWriterNode> writer;
55 /** @brief Images available to the selected render pipeline. */
56 std::vector<std::shared_ptr<Core::VKImage>> textures;
57 /** @brief Required render destination and pipeline overrides. */
59 };
60
61 /**
62 * @struct ModelComponent
63 * @brief One local mesh in a hierarchical model.
64 */
66 /** @brief Fixed materialised source. Exclusive with expression and writer. */
67 std::optional<Kakshya::MeshData> mesh;
68 /** @brief Fixed construction expression. Exclusive with mesh and writer. */
70 /** @brief Live geometry source. Exclusive with mesh and expression. */
71 std::shared_ptr<Nodes::GpuSync::MeshWriterNode> writer;
72 /** @brief Fixed local transform within the hierarchy. */
73 glm::mat4 local_transform { 1.0F };
74 /** @brief Parent index within Model::components, or no local parent. */
75 std::optional<uint32_t> parent_component;
76 /** @brief Parent slot index in an existing Model::network, or no existing parent. */
77 std::optional<uint32_t> parent_slot;
78 };
79
80 /**
81 * @struct Model
82 * @brief Mesh components and allocation policy for one MeshNetworkBuffer.
83 */
84 struct Model {
85 /** @brief Existing network to complete, or null to construct one. */
86 std::shared_ptr<Nodes::Network::MeshNetwork> network;
87 /** @brief Components appended before registration. */
88 std::vector<ModelComponent> components;
89 /** @brief Fixed initial vertex-buffer capacity multiplier. */
90 float over_allocate_factor { 1.5F };
91 /** @brief Images available to the selected render pipeline. */
92 std::vector<std::shared_ptr<Core::VKImage>> textures;
93 /** @brief Required render destination and pipeline overrides. */
95 };
96
97 /**
98 * @struct Instances
99 * @brief Prototype mesh and world transforms for one InstanceNetworkBuffer.
100 */
101 struct Instances {
102 /** @brief Existing network to complete, or null to construct one. */
103 std::shared_ptr<Nodes::Network::InstanceNetwork> network;
104 /** @brief Fixed prototype source. Exclusive with prototype_expression and prototype_writer. */
105 std::optional<Kakshya::MeshData> prototype_mesh;
106 /** @brief Fixed prototype expression. Exclusive with prototype_mesh and prototype_writer. */
108 /** @brief Live prototype source. Exclusive with prototype_mesh and prototype_expression. */
109 std::shared_ptr<Nodes::GpuSync::MeshWriterNode> prototype_writer;
110 /** @brief Fixed initial world transform for each new instance. */
111 std::vector<glm::mat4> transforms;
112 /** @brief Fixed initial vertex-buffer capacity multiplier. */
113 float over_allocate_factor { 1.5F };
114 /** @brief Images available to the selected render pipeline. */
115 std::vector<std::shared_ptr<Core::VKImage>> textures;
116 /** @brief Required render destination and pipeline overrides. */
118 };
119
120 /**
121 * @struct Assembly
122 * @brief Independent heterogeneous sources and their shared milling policy.
123 */
124 struct Assembly {
125 /** @brief Existing assembly to complete, or null to construct one. */
126 std::shared_ptr<Nodes::Network::AssemblyNetwork> network;
127 /** @brief Independent sources appended before registration. */
128 std::vector<Nodes::Network::AssemblyNetwork::Source> sources;
129 /** @brief Fixed milling policy shared by the rendered assembly. */
131 /** @brief Images available to the selected render pipeline. */
132 std::vector<std::shared_ptr<Core::VKImage>> textures;
133 /** @brief Required render destination and pipeline overrides. */
135 };
136
137 /**
138 * @struct Isosurface
139 * @brief Existing isosurface buffer or new buffer construction state.
140 */
141 struct Isosurface {
142 /** @brief Existing isosurface buffer, exclusive with config. */
143 std::shared_ptr<Buffers::ComputeMeshBuffer> buffer;
144 /** @brief Library-owned construction state when Mint creates the buffer. */
145 std::optional<Buffers::ComputeMeshBuffer::Config> config;
146 /** @brief Images available to the selected render pipeline. */
147 std::vector<std::shared_ptr<Core::VKImage>> textures;
148 /** @brief Required render destination and pipeline overrides. */
150 };
151};
152
153} // namespace MayaFlux
Portal::Graphics::RenderConfig RenderConfig
Definition VKBuffer.hpp:78
@ Core
Core engine, backend, subsystems.
Main namespace for the Maya Flux audio engine.
Definition Runtime.cpp:12
Owning CPU-side representation of a loaded or generated mesh.
Definition MeshData.hpp:33
How a PrimitiveMill shapes spans.
Unified rendering configuration for graphics buffers.
std::shared_ptr< Nodes::Network::AssemblyNetwork > network
Existing assembly to complete, or null to construct one.
Portal::Graphics::MillSpec mill
Fixed milling policy shared by the rendered assembly.
std::vector< std::shared_ptr< Core::VKImage > > textures
Images available to the selected render pipeline.
RenderConfig render
Required render destination and pipeline overrides.
std::vector< Nodes::Network::AssemblyNetwork::Source > sources
Independent sources appended before registration.
Independent heterogeneous sources and their shared milling policy.
std::shared_ptr< Nodes::Network::InstanceNetwork > network
Existing network to complete, or null to construct one.
std::optional< Kakshya::MeshData > prototype_mesh
Fixed prototype source.
MeshExpression prototype_expression
Fixed prototype expression.
float over_allocate_factor
Fixed initial vertex-buffer capacity multiplier.
std::vector< glm::mat4 > transforms
Fixed initial world transform for each new instance.
std::shared_ptr< Nodes::GpuSync::MeshWriterNode > prototype_writer
Live prototype source.
RenderConfig render
Required render destination and pipeline overrides.
std::vector< std::shared_ptr< Core::VKImage > > textures
Images available to the selected render pipeline.
Prototype mesh and world transforms for one InstanceNetworkBuffer.
std::vector< std::shared_ptr< Core::VKImage > > textures
Images available to the selected render pipeline.
std::optional< Buffers::ComputeMeshBuffer::Config > config
Library-owned construction state when Mint creates the buffer.
RenderConfig render
Required render destination and pipeline overrides.
std::shared_ptr< Buffers::ComputeMeshBuffer > buffer
Existing isosurface buffer, exclusive with config.
Existing isosurface buffer or new buffer construction state.
std::optional< uint32_t > parent_component
Parent index within Model::components, or no local parent.
std::optional< Kakshya::MeshData > mesh
Fixed materialised source.
std::optional< uint32_t > parent_slot
Parent slot index in an existing Model::network, or no existing parent.
glm::mat4 local_transform
Fixed local transform within the hierarchy.
MeshExpression expression
Fixed construction expression.
std::shared_ptr< Nodes::GpuSync::MeshWriterNode > writer
Live geometry source.
One local mesh in a hierarchical model.
float over_allocate_factor
Fixed initial vertex-buffer capacity multiplier.
std::shared_ptr< Nodes::Network::MeshNetwork > network
Existing network to complete, or null to construct one.
RenderConfig render
Required render destination and pipeline overrides.
std::vector< ModelComponent > components
Components appended before registration.
std::vector< std::shared_ptr< Core::VKImage > > textures
Images available to the selected render pipeline.
Mesh components and allocation policy for one MeshNetworkBuffer.
RenderConfig render
Required render destination and pipeline overrides.
MeshExpression expression
Fixed construction expression.
std::shared_ptr< Nodes::GpuSync::MeshWriterNode > writer
Live geometry source.
std::optional< Kakshya::MeshData > mesh
Fixed materialised source.
std::vector< std::shared_ptr< Core::VKImage > > textures
Images available to the selected render pipeline.
One independently rendered mesh-backed object.
std::function< Kakshya::MeshData()> MeshExpression
A one-shot typed mesh expression, normally invoking Kinesis.
API-side playground for a complete visible structure.