Sets the boolean operation to perform.
- Parameters
-
| op | Boolean operator to apply |
| create_default_direct_function | Whether to create a default direct function if none is set |
Configures the node to use one of the standard boolean operations (AND, OR, XOR, etc.) for evaluating inputs.
Definition at line 347 of file Logic.cpp.
348{
350
351 if (create_default_direct_function) {
352 switch (op) {
357 return current && previous;
358 };
359 break;
360
365 return current || previous;
366 };
367 break;
368
373 return current != previous;
374 };
375 break;
376
380 };
381 break;
382
387 return !(current && previous);
388 };
389 break;
390
395 return !(current || previous);
396 };
397 break;
398
402 };
403 break;
404
411 }
413 };
414 break;
415
417
419
420 break;
421 }
422 }
423}
DirectFunction m_direct_function
Function for direct mode.
double m_threshold
Threshold for boolean conversion.
double m_high_threshold
High threshold for hysteresis.
LogicOperator m_operator
Current logic operator.
double m_low_threshold
Low threshold for hysteresis.
bool m_hysteresis_state
State for hysteresis operator.
double m_last_output
The most recent sample value generated by this oscillator.
@ NOT
Logical NOT - inverts the input.
@ NOR
Logical NOR - inverted OR operation.
@ OR
Logical OR - true when any input is true.
@ NAND
Logical NAND - inverted AND operation.
@ THRESHOLD
Binary quantization - true when input exceeds threshold.
@ AND
Logical AND - true only when all inputs are true.
@ EDGE
Transition detector - identifies state changes.
@ HYSTERESIS
Threshold with memory - prevents rapid oscillation at boundary.
@ CUSTOM
User-defined boolean function.
@ XOR
Logical XOR - true when odd number of inputs are true.
References MayaFlux::Nodes::Generator::AND, MayaFlux::Nodes::Generator::CUSTOM, MayaFlux::Nodes::Generator::EDGE, MayaFlux::Nodes::Generator::HYSTERESIS, m_direct_function, m_high_threshold, m_hysteresis_state, MayaFlux::Nodes::Node::m_last_output, m_low_threshold, m_operator, m_threshold, MayaFlux::Nodes::Generator::NAND, MayaFlux::Nodes::Generator::NOR, MayaFlux::Nodes::Generator::NOT, MayaFlux::Nodes::Generator::OR, MayaFlux::Nodes::Generator::THRESHOLD, and MayaFlux::Nodes::Generator::XOR.