![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Complete reference for a MathOp node: left operand, operator, right operand. More...
#include <MathOpOperand.h>
Collaboration diagram for Olympe::MathOpRef:Public Member Functions | |
| std::string | GetDisplayString () const |
| Returns a human-readable display string for the operation. | |
| nlohmann::json | ToJson () const |
| Serializes this MathOpRef to a JSON object. | |
Static Public Member Functions | |
| static MathOpRef | FromJson (const nlohmann::json &data) |
| Deserializes a MathOpRef from a JSON object. | |
Public Attributes | |
| MathOpOperand | leftOperand |
| Left-hand side operand (A) | |
| std::string | mathOperator = "+" |
| Arithmetic operator: "+", "-", "*", "/", "%", "^". | |
| MathOpOperand | rightOperand |
| Right-hand side operand (B) | |
Complete reference for a MathOp node: left operand, operator, right operand.
Stores the full operand configuration for one MathOp node. The result is computed as: leftOperand [operator] rightOperand. Operators supported: "+", "-", "*", "/", "%", "^" (power).
Operands whose mode is Pin automatically have DynamicDataPin objects generated for them by DynamicDataPinManager.
Definition at line 86 of file MathOpOperand.h.
|
static |
Deserializes a MathOpRef from a JSON object.
Definition at line 108 of file MathOpOperand.cpp.
References Olympe::MathOpOperand::FromJson(), GetComponentTypeID_Static(), and leftOperand.
Referenced by Olympe::TaskGraphLoader::ParseNodeV4().
Here is the call graph for this function:
Here is the caller graph for this function:| std::string Olympe::MathOpRef::GetDisplayString | ( | ) | const |
Returns a human-readable display string for the operation.
Example: "[mSpeed] + [5.0]" or "[Pin:0] * [mFactor]"
Definition at line 60 of file MathOpOperand.cpp.
References Olympe::MathOpOperand::Const, Olympe::MathOpOperand::constValue, Olympe::MathOpOperand::dynamicPinID, leftOperand, mathOperator, Olympe::MathOpOperand::mode, Olympe::MathOpOperand::Pin, rightOperand, Olympe::MathOpOperand::Variable, and Olympe::MathOpOperand::variableName.
| nlohmann::json Olympe::MathOpRef::ToJson | ( | ) | const |
Serializes this MathOpRef to a JSON object.
Definition at line 97 of file MathOpOperand.cpp.
References GetComponentTypeID_Static(), leftOperand, mathOperator, rightOperand, and Olympe::MathOpOperand::ToJson().
Referenced by Olympe::VisualScriptEditorPanel::SerializeAndWrite().
Here is the call graph for this function:
Here is the caller graph for this function:| MathOpOperand Olympe::MathOpRef::leftOperand |
Left-hand side operand (A)
Definition at line 89 of file MathOpOperand.h.
Referenced by Olympe::VisualScriptEditorPanel::AddNode(), Olympe::DataPinEvaluator_EvaluateRecursive(), FromJson(), GetDisplayString(), Olympe::MathOpPropertyPanel::RenderInlineOperandEditor(), Olympe::VisualScriptNodeRenderer::RenderNode(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanel(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent(), and ToJson().
| std::string Olympe::MathOpRef::mathOperator = "+" |
Arithmetic operator: "+", "-", "*", "/", "%", "^".
Definition at line 90 of file MathOpOperand.h.
Referenced by Olympe::VisualScriptEditorPanel::AddNode(), GetDisplayString(), Olympe::VisualScriptNodeRenderer::RenderNode(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanel(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent(), Olympe::MathOpPropertyPanel::RenderOperatorSelector(), Olympe::VisualScriptEditorPanel::SerializeAndWrite(), and ToJson().
| MathOpOperand Olympe::MathOpRef::rightOperand |
Right-hand side operand (B)
Definition at line 91 of file MathOpOperand.h.
Referenced by Olympe::VisualScriptEditorPanel::AddNode(), Olympe::DataPinEvaluator_EvaluateRecursive(), GetDisplayString(), Olympe::MathOpPropertyPanel::RenderInlineOperandEditor(), Olympe::VisualScriptNodeRenderer::RenderNode(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanel(), Olympe::VisualScriptEditorPanel::RenderNodePropertiesPanelContent(), and ToJson().