2#include "Engine/Core/Path.h"
4#include "Engine/Network/GeometryOpDef.h"
5#include "Engine/Network/NodePacket.h"
6#include "Engine/Network/OpInfo.h"
7#include "Engine/Parameter/NodeParameter.h"
45 std::shared_ptr<const enzo::NodePacket>
getOutputPacket(
unsigned int outputIndex)
const;
48 std::vector<std::weak_ptr<prm::NodeParameter>>
getParameters();
53 std::weak_ptr<prm::NodeParameter>
getParameter(std::string_view parameterName);
100 void dirtyNode(
bool dirtyDescendents =
true);
128 void initParameters();
132 bool isComparisonTrue(
const std::string& conditionText);
135 void onParameterChanged(
const std::string& parmName);
137 std::vector<std::shared_ptr<prm::NodeParameter>> parameters_;
138 std::unique_ptr<enzo::nt::GeometryOpDef> opDef_;
143 Vector2 position_{0.f, 0.f};
Basic attribute, parameter, and node types for Enzo.
uint64_t OpId
The unique ID assigned to each node in the network.
Definition Types.h:137
A default path class for creation and manipulation of tree-based paths.
Definition Path.h:14
The unique runtime representation of a node.
Definition GeometryOperator.h:16
const Path & getPath() const
Returns the full path locating this node within the network.
Definition GeometryOperator.h:79
boost::signals2::signal< void(const std::string &parmName)> parameterChanged
A signal emitted when one parameter's value changes, carrying its name.
Definition GeometryOperator.h:125
GeometryOperator(enzo::nt::OpId opId, op::OpInfo opInfo)
Constructs a new node.
Definition GeometryOperator.cpp:46
bool isParameterHidden(std::string_view parmName)
Whether the named parameter's hide condition currently hides it.
Definition GeometryOperator.cpp:141
void cookOp(op::CookContext context)
Computes the output geometry based on the cookOp definition in nt::GeometryOpDef. This is set by the ...
Definition GeometryOperator.cpp:92
bool isDirty()
Returns true if the node is dirty and false if the node is clean (does not need cooking).
Definition GeometryOperator.cpp:90
unsigned int getMinInputs() const
Returns the minimum number of input connections required for the node to function....
Definition GeometryOperator.cpp:185
const op::OpInfo & getType() const
Returns the static type definition this node was created from.
Definition GeometryOperator.cpp:163
void dirtyNode(bool dirtyDescendents=true)
Marks the outputed geometry as outdated and notifies the network.
Definition GeometryOperator.cpp:77
boost::signals2::signal< void(nt::OpId opId, bool dirtyDescendents)> nodeDirtied
A signal emitted when the node is dirtied. This will usually notify the NetworkManager.
Definition GeometryOperator.h:122
std::vector< std::weak_ptr< prm::NodeParameter > > getParameters()
Returns all parameters belonging to this node.
Definition GeometryOperator.cpp:151
const std::vector< prm::Template > & getTemplates() const
Returns the template tree declared by this node's type.
Definition GeometryOperator.cpp:156
GeometryOperator(const GeometryOperator &)=delete
Deleted copy constructor to avoid accidental copies.
void setPath(const Path &path)
Sets the full path locating this node within the network.
Definition GeometryOperator.h:82
GeometryOperator & operator=(const GeometryOperator &)=delete
Deleted copy assignment operator to avoid accidental copies.
std::shared_ptr< const enzo::NodePacket > getOutputPacket(unsigned int outputIndex) const
Returns the current output geometry.
Definition GeometryOperator.cpp:102
unsigned int getMaxOutputs() const
Returns the number of available outputs the node provides.
Definition GeometryOperator.cpp:184
unsigned int getMaxInputs() const
Returns the maximum number of input connections accepted by the node.
Definition GeometryOperator.cpp:183
Vector2 getPosition() const
Returns the node's position in the network graph.
Definition GeometryOperator.h:116
void setPosition(Vector2 pos)
Sets the node's position in the network graph.
Definition GeometryOperator.h:118
std::weak_ptr< prm::NodeParameter > getParameter(std::string_view parameterName)
Returns a parameter with the given name belonging to this node.
Definition GeometryOperator.cpp:107
bool isParameterEnabled(std::string_view parmName)
Whether the named parameter's disable condition leaves it enabled.
Definition GeometryOperator.cpp:131
std::string getName() const
Returns the runtime name uniquely identifying this node within its scope (eg. "my_node_05")
Definition GeometryOperator.cpp:161
Provides network context for the cookOp function.
Definition CookContext.h:24