12 case PrimitiveTopology::LINE_LIST:
13 case PrimitiveTopology::LINE_STRIP:
15 case PrimitiveTopology::TRIANGLE_LIST:
16 case PrimitiveTopology::TRIANGLE_STRIP:
17 case PrimitiveTopology::TRIANGLE_FAN:
19 case PrimitiveTopology::POINT_LIST:
30 m_items.reserve(initial_capacity);
34 layout.vertex_count = 0;
48 layout.vertex_count =
static_cast<uint32_t
>(
m_items.size());
63 m_items.reserve(positions.size());
64 for (
const auto& p : positions) {
82 "GeometryLeafNode: vertex index {} out of range (count: {})", index,
m_items.size());
113 layout.vertex_count =
static_cast<uint32_t
>(
m_items.size());
#define MF_WARN(comp, ctx,...)
std::vector< Vertex > m_items
void set_geometry(std::vector< Vertex > vertices)
Replace geometry with fully specified vertices.
void compute_frame() override
No-op unless a mutator has run since the last call, so AssemblyOperator::process() calling this on ev...
GeometryLeafNode(size_t initial_capacity=64)
void clear_geometry()
Mutable access for in-place edits.
void update_vertex(size_t index, const Vertex &vertex)
void set_positions(std::vector< glm::vec3 > positions)
Replace geometry with plain positions (color/scalar/normal/uv default).
uint32_t get_vertex_count() const
Get number of vertices.
GeometryWriterNode(uint32_t initial_capacity=1024)
Constructor.
virtual Portal::Graphics::PrimitiveTopology get_primitive_topology() const
Primitive topology this node's vertex data represents.
void set_vertex_layout(const Kakshya::VertexLayout &layout)
Set cached vertex layout.
void set_vertices(std::span< const T > vertices)
Set multiple vertices from typed array.
void resize_vertex_buffer(uint32_t vertex_count, bool preserve_data=false)
Resize vertex buffer to hold specified number of vertices.
void set_vertex_stride(size_t stride)
Set vertex stride (bytes per vertex).
uint32_t m_vertex_count
Number of vertices in buffer.
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager).
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
PrimitiveTopology
Vertex assembly primitive topology.
static VertexLayout for_points(uint32_t stride=68)
Factory: layout for PointVertex (position, color, size, uv, normal, tangent).
static VertexLayout for_meshes(uint32_t stride=68)
Factory: layout for MeshVertex (position, color, weight, uv, normal, tangent).
static VertexLayout for_lines(uint32_t stride=68)
Factory: layout for LineVertex (position, color, thickness, uv, normal, tangent).