Enzo
Loading...
Searching...
No Matches
GeometryOperator.h
1#pragma once
2#include "Engine/Operator/GeometryConnection.h"
3#include "Engine/Operator/GeometryOpDef.h"
4#include "Engine/Types.h"
5#include <optional>
6#include <memory>
7
8namespace enzo::nt {
9void connectOperators(enzo::nt::OpId inputOpId, unsigned int inputIndex, enzo::nt::OpId outputOpId, unsigned int outputIndex);
10
12{
13public:
14 GeometryOperator(enzo::nt::OpId opId, nt::opConstructor ctorFunc);
15
16 // disable copying
17 GeometryOperator(const GeometryOperator&) = delete;
18 GeometryOperator& operator=(const GeometryOperator&) = delete;
19
20 void cookOp(op::Context context);
21 geo::Geometry& getOutputGeo(unsigned outputIndex);
22
23 void addInputConnection(std::shared_ptr<nt::GeometryConnection> connection);
24 void addOutputConnection(std::shared_ptr<nt::GeometryConnection> connection);
25 std::vector<std::shared_ptr<const GeometryConnection>> getInputConnections() const;
26 std::vector<std::shared_ptr<const GeometryConnection>> getOutputConnections() const;
27
28
29
30 unsigned int getMaxInputs() const;
31 unsigned int getMaxOutputs() const;
32
33
34private:
35 // TODO: avoid duplicate connections
36 std::vector<std::shared_ptr<nt::GeometryConnection>> inputConnections_;
37 std::vector<std::shared_ptr<nt::GeometryConnection>> outputConnections_;
38 unsigned int maxInputs_;
39 unsigned int maxOutputs_;
40 std::unique_ptr<enzo::nt::GeometryOpDef> opDef_;
41 enzo::nt::OpId opId_;
42};
43}
Definition Geometry.h:9
Definition GeometryOperator.h:12
Definition Context.h:14