|
MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
|
Defines one slot's block as a function of other slots' blocks. More...
#include <RelationOperators.hpp>
Inheritance diagram for MayaFlux::Nodes::Network::DeriveOperator:
Collaboration diagram for MayaFlux::Nodes::Network::DeriveOperator:Public Types | |
| using | CoefFunction = std::function< double(std::span< const double >, std::span< double >)> |
| using | Function = std::function< double(std::span< const double >)> |
Public Member Functions | |
| DeriveOperator (size_t target, std::vector< size_t > inputs, CoefFunction function, std::vector< double > coefficients) | |
| DeriveOperator (size_t target, std::vector< size_t > inputs, Function function) | |
| template<typename Gate > requires (std::invocable<Gate&, const std::vector<double>&, std::span<double>> && std::same_as<std::invoke_result_t<Gate&, const std::vector<double>&, std::span<double>>, bool>) | |
| DeriveOperator (size_t target, std::vector< size_t > inputs, Gate function, std::vector< double > coefficients) | |
| const std::vector< double > & | get_coefficients () const noexcept |
| std::string_view | get_type_name () const override |
| Type name for introspection. | |
| void | process (float frames) override |
| Process for one batch cycle. | |
| std::optional< double > | query_state (std::string_view query) const override |
| void | set_coefficients (std::vector< double > coefficients) |
| Replace the coefficient array. | |
| void | set_parameter (std::string_view param, double value) override |
| Set one coefficient. | |
Public Member Functions inherited from MayaFlux::Nodes::Network::RelationOperator | |
| void | begin_block () |
| Apply mapped parameters at the start of a block. | |
| virtual std::span< const double > | get_output_block (size_t) const |
| virtual size_t | get_output_count () const |
| void | map (std::string parameter, Source source) |
| Drive an operator parameter from a source. | |
| virtual bool | publishes_output () const |
| void | set_slots (std::vector< RelationSlot > &slots) noexcept |
| Supply the current slot storage. | |
| void | unmap (std::string_view parameter) |
| Remove the mapping of a parameter. | |
Public Member Functions inherited from MayaFlux::Nodes::Network::NetworkOperator | |
| virtual void | apply_one_to_one (std::string_view param, const std::shared_ptr< NodeNetwork > &source) |
| Apply ONE_TO_ONE parameter mapping (per-point control) | |
| virtual bool | demands_full_vertex_restore () const |
| Whether a downstream compute pass writes the network's vertex buffer in place each cycle, so the geometry producer must keep restoring the CPU-authoritative vertex data every frame. | |
| virtual | ~NetworkOperator ()=default |
Private Types | |
| using | Kernel = std::function< double(const std::vector< double > &, std::span< double >)> |
Static Private Member Functions | |
| static std::optional< size_t > | coefficient_index (std::string_view param) |
Private Attributes | |
| std::vector< double > | m_coefficients |
| bool | m_gate {} |
| std::vector< size_t > | m_inputs |
| Kernel | m_kernel |
| size_t | m_target |
| std::vector< double > | m_values |
Additional Inherited Members | |
Protected Member Functions inherited from MayaFlux::Nodes::Network::RelationOperator | |
| std::span< RelationSlot > | slots () const noexcept |
Defines one slot's block as a function of other slots' blocks.
For each frame, calls the function with the input slots' values in the order given and writes the result to the target slot's block. An input equal to the target reads that slot's previous frame, or its previous block's last value at frame 0. Place after AdvanceOperator.
Three forms of rule:
Coefficients are parameters "c0", "c1", ...: map("c2", source) retunes coefficient 2 at the start of every block.
Definition at line 292 of file RelationOperators.hpp.