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

◆ set_transformation_parameter()

template<ComputeData InputType = std::vector<Kakshya::DataVariant>, ComputeData OutputType = InputType>
void MayaFlux::Yantra::MathematicalTransformer< InputType, OutputType >::set_transformation_parameter ( const std::string &  name,
std::any  value 
)
inlineoverrideprotectedvirtual

Sets transformation parameters.

Parameters
nameParameter name
valueParameter value

Handles setting of operation type and delegates other parameters to base class. Supports both enum and string values for the "operation" parameter.

Reimplemented from MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >.

Definition at line 203 of file MathematicalTransformer.hpp.

204 {
205 if (name == "operation") {
206 if (auto r = safe_any_cast<MathematicalOperation>(value)) {
207 m_operation = *r.value;
208 return;
209 }
210 if (auto r = safe_any_cast<std::string>(value)) {
211 if (auto e = Reflect::string_to_enum_case_insensitive<MathematicalOperation>(*r.value)) {
212 m_operation = *e;
213 return;
214 }
215 }
216 }
217
219 }
glm::vec3 value
std::string name
Definition VKDevice.cpp:123
MathematicalOperation m_operation
Current mathematical operation.
virtual void set_transformation_parameter(const std::string &name, std::any value)
Transformation-specific parameter handling (override for custom parameters)

References MayaFlux::Yantra::MathematicalTransformer< InputType, OutputType >::m_operation, name, MayaFlux::Yantra::UniversalTransformer< InputType, OutputType >::set_transformation_parameter(), and value.

+ Here is the call graph for this function: