|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Single 3D point in space. More...
#include <PointNode.hpp>
Inheritance diagram for MayaFlux::Nodes::GpuSync::PointNode:
Collaboration diagram for MayaFlux::Nodes::GpuSync::PointNode:Public Member Functions | |
| PointNode () | |
| Create point at origin. | |
| PointNode (const PointVertex &point) | |
| Create point from PointVertex. | |
| PointNode (const glm::vec3 &position, const glm::vec3 &color=glm::vec3(1.0F), float size=10.0F) | |
| Create point at specific position. | |
| void | set_position (const glm::vec3 &position) |
| Set point position. | |
| void | set_size (float size) |
| Set point size. | |
| void | set_color (const glm::vec3 &color) |
| Set point color. | |
| glm::vec3 | get_position () const |
| Get current position. | |
| glm::vec3 | get_color () const |
| Get current color. | |
| float | get_size () const |
| Get current size. | |
| void | compute_frame () override |
| Compute frame - upload single point to vertex buffer. | |
Public Member Functions inherited from MayaFlux::Nodes::GpuSync::GeometryWriterNode | |
| GeometryWriterNode (uint32_t initial_capacity=1024) | |
| Constructor. | |
| ~GeometryWriterNode () override=default | |
| std::vector< double > | process_batch (unsigned int num_samples) override |
| Process batch for geometry generation. | |
| std::span< const uint8_t > | get_vertex_data () const |
| Get raw vertex buffer data. | |
| size_t | get_vertex_buffer_size_bytes () const |
| Get vertex buffer size in bytes. | |
| uint32_t | get_vertex_count () const |
| Get number of vertices. | |
| size_t | get_vertex_stride () const |
| Get stride (bytes per vertex) | |
| void | set_vertex_stride (size_t stride) |
| Set vertex stride (bytes per vertex) | |
| void | resize_vertex_buffer (uint32_t vertex_count, bool preserve_data=false) |
| Resize vertex buffer to hold specified number of vertices. | |
| void | set_vertex_data (const void *data, size_t size_bytes) |
| Copy raw vertex data into buffer. | |
| void | set_vertex (uint32_t vertex_index, const void *data, size_t size_bytes) |
| Set a single vertex by index. | |
| std::span< const uint8_t > | get_vertex (uint32_t vertex_index) const |
| Get a single vertex by index. | |
| template<typename T > | |
| void | set_vertices (std::span< const T > vertices) |
| Set multiple vertices from typed array. | |
| template<typename T > | |
| void | set_vertex_typed (uint32_t index, const T &vertex) |
| Set a single vertex by index from typed data. | |
| template<typename T > | |
| T | get_vertex_typed (uint32_t index) const |
| Get a single vertex by index as typed data. | |
| void | clear () |
| Clear vertex buffer and reset count. | |
| void | clear_and_resize (uint32_t vertex_count) |
| Clear vertex buffer and resize to specified count. | |
| void | set_vertex_layout (const Kakshya::VertexLayout &layout) |
| Set cached vertex layout. | |
| std::optional< Kakshya::VertexLayout > | get_vertex_layout () const |
| Get cached vertex layout. | |
| bool | needs_layout_update () const |
| Check if layout needs update. | |
| void | clear_layout_update_flag () |
| Clear layout update flag. | |
| void | save_state () override |
| Save current geometry state. | |
| void | restore_state () override |
| Restore saved geometry state. | |
| bool | needs_gpu_update () const override |
| Check if vertex data or layout changed since last GPU sync. | |
| void | clear_gpu_update_flag () override |
| Clear the dirty flag after GPU upload completes. | |
Public Member Functions inherited from MayaFlux::Nodes::GpuSync::GpuSync | |
| ~GpuSync () override=default | |
| double | process_sample (double) override |
| Single sample processing hook. | |
| std::vector< double > | process_batch (unsigned int num_samples) override |
| Batch processing for GPU nodes. | |
Public Member Functions inherited from MayaFlux::Nodes::Node | |
| virtual | ~Node ()=default |
| Virtual destructor for proper cleanup of derived classes. | |
| virtual void | on_tick (const NodeHook &callback) |
| Registers a callback to be called on each tick. | |
| virtual void | on_tick_if (const NodeHook &callback, const NodeCondition &condition) |
| Registers a conditional callback. | |
| virtual bool | remove_hook (const NodeHook &callback) |
| Removes a previously registered callback. | |
| virtual bool | remove_conditional_hook (const NodeCondition &callback) |
| Removes a previously registered conditional callback. | |
| virtual void | remove_all_hooks () |
| Removes all registered callbacks. | |
| virtual void | reset_processed_state () |
| Resets the processed state of the node and any attached input nodes. | |
| virtual double | get_last_output () |
| Retrieves the most recent output value produced by the node. | |
| void | register_channel_usage (uint32_t channel_id) |
| Mark the specificed channel as a processor/user. | |
| void | unregister_channel_usage (uint32_t channel_id) |
| Removes the specified channel from the usage tracking. | |
| bool | is_used_by_channel (uint32_t channel_id) const |
| Checks if the node is currently used by a specific channel. | |
| void | request_reset_from_channel (uint32_t channel_id) |
| Requests a reset of the processed state from a specific channel. | |
| const std::atomic< uint32_t > & | get_channel_mask () const |
| Retrieves the current bitmask of active channels using this node. | |
| NodeContext & | get_last_context () |
| Retrieves the last created context object. | |
| void | set_gpu_compatible (bool compatible) |
| Sets whether the node is compatible with GPU processing. | |
| bool | is_gpu_compatible () const |
| Checks if the node supports GPU processing. | |
| std::span< const float > | get_gpu_data_buffer () const |
| Provides access to the GPU data buffer. | |
Private Attributes | |
| PointVertex | m_point_vertex |
Additional Inherited Members | |
Public Attributes inherited from MayaFlux::Nodes::Node | |
| bool | m_fire_events_during_snapshot = false |
| Internal flag controlling whether notify_tick fires during state snapshots Default: false (events don't fire during isolated buffer processing) Can be exposed in future if needed via concrete implementation in parent. | |
| std::atomic< Utils::NodeState > | m_state { Utils::NodeState::INACTIVE } |
| Atomic state flag tracking the node's processing status. | |
| std::atomic< uint32_t > | m_modulator_count { 0 } |
| Counter tracking how many other nodes are using this node as a modulator. | |
Protected Member Functions inherited from MayaFlux::Nodes::GpuSync::GpuSync | |
| std::unique_ptr< NodeContext > | create_context (double) override |
| GPU sync nodes don't produce scalar contexts. | |
| void | notify_tick (double) override |
| GPU sync nodes don't emit tick callbacks. | |
Protected Member Functions inherited from MayaFlux::Nodes::Node | |
| virtual void | reset_processed_state_internal () |
| Resets the processed state of the node directly. | |
Protected Attributes inherited from MayaFlux::Nodes::GpuSync::GeometryWriterNode | |
| std::vector< uint8_t > | m_vertex_buffer |
| Vertex data buffer (flat array of bytes) | |
| uint32_t | m_vertex_count {} |
| Number of vertices in buffer. | |
| size_t | m_vertex_stride {} |
| Bytes per vertex (stride for vertex buffer binding) | |
| std::optional< Kakshya::VertexLayout > | m_vertex_layout |
| Cached vertex layout for descriptor binding. | |
| bool | m_needs_layout_update {} |
| Flag indicating if layout needs update. | |
| bool | m_vertex_data_dirty { true } |
| Flag: vertex data or layout changed since last GPU upload. | |
Protected Attributes inherited from MayaFlux::Nodes::Node | |
| double | m_last_output { 0 } |
| The most recent sample value generated by this oscillator. | |
| bool | m_gpu_compatible {} |
| Flag indicating if the node supports GPU processing This flag is set by derived classes to indicate whether the node can be processed on the GPU. | |
| std::unique_ptr< NodeContext > | m_last_context |
| The last context object created for callbacks. | |
| std::vector< float > | m_gpu_data_buffer |
| GPU data buffer for context objects. | |
| std::vector< NodeHook > | m_callbacks |
| Collection of standard callback functions. | |
| std::vector< std::pair< NodeHook, NodeCondition > > | m_conditional_callbacks |
| Collection of conditional callback functions with their predicates. | |
Single 3D point in space.
GeometryWriterNode that renders exactly ONE point. Can be used standalone or as building block in NodeNetworks.
Usage:
Definition at line 27 of file PointNode.hpp.