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

◆ PointNode() [2/3]

MayaFlux::Nodes::GpuSync::PointNode::PointNode ( const PointVertex point)
explicit

Create point from PointVertex.

Parameters
pointInitial point data

Definition at line 16 of file PointNode.cpp.

18 , m_point_vertex(point)
19{
20 set_vertex_stride(sizeof(PointVertex));
21
22 Kakshya::VertexLayout layout;
23 layout.vertex_count = 1;
24 layout.stride_bytes = sizeof(PointVertex);
25
26 // Location 0: position
27 layout.attributes.push_back(Kakshya::VertexAttributeLayout {
29 .offset_in_vertex = 0,
30 .name = "position" });
31
32 // Location 1: color
33 layout.attributes.push_back(Kakshya::VertexAttributeLayout {
34 .component_modality = Kakshya::DataModality::VERTEX_COLORS_RGB,
35 .offset_in_vertex = sizeof(glm::vec3),
36 .name = "color" });
37
38 // Location 2: size
39 layout.attributes.push_back(Kakshya::VertexAttributeLayout {
40 .component_modality = Kakshya::DataModality::UNKNOWN,
41 .offset_in_vertex = sizeof(glm::vec3) + sizeof(glm::vec3),
42 .name = "size" });
43
44 set_vertex_layout(layout);
45
46 resize_vertex_buffer(1, false);
47
49 "Created PointNode at position ({}, {}, {}), color ({}, {}, {}), size {}",
52}
#define MF_DEBUG(comp, ctx,...)
GeometryWriterNode(uint32_t initial_capacity=1024)
Constructor.
void set_vertex_layout(const Kakshya::VertexLayout &layout)
Set cached vertex layout.
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)
@ NodeProcessing
Node graph processing (Nodes::NodeGraphManager)
@ Nodes
DSP Generator and Filter Nodes, graph pipeline, node management.
@ UNKNOWN
Unknown or undefined modality.

References MayaFlux::Kakshya::VertexLayout::attributes, MayaFlux::Nodes::GpuSync::PointVertex::color, MayaFlux::Kakshya::VertexAttributeLayout::component_modality, m_point_vertex, MF_DEBUG, MayaFlux::Journal::NodeProcessing, MayaFlux::Journal::Nodes, MayaFlux::Nodes::GpuSync::PointVertex::position, MayaFlux::Nodes::GpuSync::GeometryWriterNode::resize_vertex_buffer(), MayaFlux::Nodes::GpuSync::GeometryWriterNode::set_vertex_layout(), MayaFlux::Nodes::GpuSync::GeometryWriterNode::set_vertex_stride(), MayaFlux::Nodes::GpuSync::PointVertex::size, MayaFlux::Kakshya::VertexLayout::stride_bytes, MayaFlux::Kakshya::UNKNOWN, MayaFlux::Kakshya::VERTEX_COLORS_RGB, MayaFlux::Kakshya::VertexLayout::vertex_count, and MayaFlux::Kakshya::VERTEX_POSITIONS_3D.

+ Here is the call graph for this function: