Enzo
Loading...
Searching...
No Matches
GeometryOpDef.h
1#pragma once
2#include "Engine/Operator/Geometry.h"
3#include "Engine/Operator/Context.h"
4#include "Engine/Types.h"
5#include <boost/config.hpp>
6#include "Engine/Operator/OpInfo.h"
7
8
9// forward declaration
10namespace enzo::nt {class NetworkManager;}
11
12namespace enzo::nt
13{
14class NetworkManager;
15
31class BOOST_SYMBOL_EXPORT GeometryOpDef
32{
33public:
45 virtual void cookOp(op::Context context) = 0;
46
55 geo::Geometry& getOutputGeo(unsigned outputIndex);
56
61 void throwError(std::string error);
62
64 unsigned int getMinInputs() const;
66 unsigned int getMaxInputs() const;
68 unsigned int getMaxOutputs() const;
69private:
70 std::vector<enzo::geo::Geometry> outputGeometry_;
71
72protected:
73 const op::OpInfo opInfo_;
74 nt::NetworkManager* network_;
75 bool outputRequested(unsigned int outputIndex);
76
77 // TODO: std::move geometry instead of copying
78 void setOutputGeometry(unsigned int outputIndex, enzo::geo::Geometry geometry);
79};
80
81using opConstructor = GeometryOpDef* (*)(enzo::nt::NetworkManager* network, enzo::op::OpInfo opInfo);
82
83}
Basic attribute, parameter, and node types for Enzo.
Attribute based geometry container exchanged and modified by nodes.
Abstract class used to create new operators.
Definition GeometryOpDef.h:32
virtual void cookOp(op::Context context)=0
This function is called at runtime to create the output geometry.
The central coordinator of the engine's node system.
Definition NetworkManager.h:26
Provides network context for the cookOp function.
Definition Context.h:20
Definition OpInfo.h:20