|
Enzo
|
The unique runtime representation of a node. More...
#include <GeometryOperator.h>
Public Member Functions | |
| GeometryOperator (enzo::nt::OpId opId, op::OpInfo opInfo) | |
| Constructs a new node. | |
| GeometryOperator (const GeometryOperator &)=delete | |
| Deleted copy constructor to avoid accidental copies. | |
| GeometryOperator & | operator= (const GeometryOperator &)=delete |
| Deleted copy assignment operator to avoid accidental copies. | |
| void | cookOp (op::CookContext context) |
Computes the output geometry based on the cookOp definition in nt::GeometryOpDef. This is set by the opInfo constructor parameter. | |
| std::shared_ptr< const enzo::NodePacket > | getOutputPacket (unsigned int outputIndex) const |
| Returns the current output geometry. | |
| std::vector< std::weak_ptr< prm::NodeParameter > > | getParameters () |
| Returns all parameters belonging to this node. | |
| std::weak_ptr< prm::NodeParameter > | getParameter (std::string_view parameterName) |
| Returns a parameter with the given name belonging to this node. | |
| bool | isParameterEnabled (std::string_view parmName) |
| Whether the named parameter's disable condition leaves it enabled. | |
| bool | isParameterHidden (std::string_view parmName) |
| Whether the named parameter's hide condition currently hides it. | |
| const std::vector< prm::Template > & | getTemplates () const |
| Returns the template tree declared by this node's type. | |
| std::string | getName () const |
| Returns the runtime name uniquely identifying this node within its scope (eg. "my_node_05") | |
| const Path & | getPath () const |
| Returns the full path locating this node within the network. | |
| void | setPath (const Path &path) |
| Sets the full path locating this node within the network. | |
| const op::OpInfo & | getType () const |
| Returns the static type definition this node was created from. | |
| void | dirtyNode (bool dirtyDescendents=true) |
| Marks the outputed geometry as outdated and notifies the network. | |
| bool | isDirty () |
| Returns true if the node is dirty and false if the node is clean (does not need cooking). | |
| unsigned int | getMinInputs () const |
| Returns the minimum number of input connections required for the node to function. These are in order so 3 would mean the first three inputs must have a connection. | |
| unsigned int | getMaxInputs () const |
| Returns the maximum number of input connections accepted by the node. | |
| unsigned int | getMaxOutputs () const |
| Returns the number of available outputs the node provides. | |
| Vector2 | getPosition () const |
| Returns the node's position in the network graph. | |
| void | setPosition (Vector2 pos) |
| Sets the node's position in the network graph. | |
Public Attributes | |
| boost::signals2::signal< void(nt::OpId opId, bool dirtyDescendents)> | nodeDirtied |
| A signal emitted when the node is dirtied. This will usually notify the NetworkManager. | |
| boost::signals2::signal< void(const std::string &parmName)> | parameterChanged |
| A signal emitted when one parameter's value changes, carrying its name. | |
The unique runtime representation of a node.
| enzo::nt::GeometryOperator::GeometryOperator | ( | enzo::nt::OpId | opId, |
| op::OpInfo | opInfo ) |
Constructs a new node.
| opId | the operator id assigned to this node. For most situations this should be set by the nt::NetworkManager |
| opInfo | The data class informing the node what its properties are that set it apart from other nodes. This is what makes a grid node different to a transform node. |
| void enzo::nt::GeometryOperator::dirtyNode | ( | bool | dirtyDescendents = true | ) |
Marks the outputed geometry as outdated and notifies the network.
| dirtyDescendents | Sets whether all descendents (nodes connected directly or indirectly to the output of this node) are also dirtied. This is usually what you want. |
| std::string enzo::nt::GeometryOperator::getName | ( | ) | const |
Returns the runtime name uniquely identifying this node within its scope (eg. "my_node_05")
The name is the leaf of the node's path, not stored separately. Unlike the type name it is per node and is intended to be user assignable.
| std::shared_ptr< const NodePacket > enzo::nt::GeometryOperator::getOutputPacket | ( | unsigned int | outputIndex | ) | const |
Returns the current output geometry.
Does not trigger a cook so if the geometry may be outdated if not cooked first.
| std::weak_ptr< prm::NodeParameter > enzo::nt::GeometryOperator::getParameter | ( | std::string_view | parameterName | ) |
Returns a parameter with the given name belonging to this node.
| const std::vector< prm::Template > & enzo::nt::GeometryOperator::getTemplates | ( | ) | const |
Returns the template tree declared by this node's type.
| const op::OpInfo & enzo::nt::GeometryOperator::getType | ( | ) | const |
| bool enzo::nt::GeometryOperator::isParameterEnabled | ( | std::string_view | parmName | ) |
Whether the named parameter's disable condition leaves it enabled.
| bool enzo::nt::GeometryOperator::isParameterHidden | ( | std::string_view | parmName | ) |
Whether the named parameter's hide condition currently hides it.