39 lines
1.2 KiB
C++
39 lines
1.2 KiB
C++
#pragma once
|
|
#include "Engine/Operator/GeometryConnection.h"
|
|
#include "Engine/Types.h"
|
|
#include <optional>
|
|
#include <memory>
|
|
|
|
namespace enzo::nt {
|
|
void connectOperators(enzo::nt::OpId inputOpId, unsigned int inputIndex, enzo::nt::OpId outputOpId, unsigned int outputIndex);
|
|
|
|
class GeometryOperator
|
|
{
|
|
public:
|
|
GeometryOperator();
|
|
|
|
// disable copying
|
|
GeometryOperator(const GeometryOperator&) = delete;
|
|
GeometryOperator& operator=(const GeometryOperator&) = delete;
|
|
|
|
void addInputConnection(std::shared_ptr<nt::GeometryConnection> connection);
|
|
void addOutputConnection(std::shared_ptr<nt::GeometryConnection> connection);
|
|
std::vector<std::shared_ptr<const GeometryConnection>> getInputConnections() const;
|
|
std::vector<std::shared_ptr<const GeometryConnection>> getOutputConnections() const;
|
|
|
|
|
|
|
|
unsigned int getMaxInputs() const;
|
|
unsigned int getMaxOutputs() const;
|
|
|
|
|
|
private:
|
|
// TODO: avoid duplicate connections
|
|
std::vector<std::shared_ptr<nt::GeometryConnection>> inputConnections_;
|
|
std::vector<std::shared_ptr<nt::GeometryConnection>> outputConnections_;
|
|
unsigned int maxInputs_;
|
|
unsigned int maxOutputs_;
|
|
|
|
};
|
|
}
|