refactor: connect context, remove network manager pass to opDef

This commit is contained in:
parker
2025-07-14 20:19:49 +01:00
parent 79d8a9096a
commit 1253785f2b
11 changed files with 53 additions and 42 deletions

View File

@@ -1,4 +1,6 @@
#include "Engine/Operator/Context.h"
#include "Engine/Network/NetworkManager.h"
#include <iostream>
enzo::op::Context::Context(enzo::nt::OpId opId, enzo::nt::NetworkManager& networkManager)
@@ -6,3 +8,18 @@ enzo::op::Context::Context(enzo::nt::OpId opId, enzo::nt::NetworkManager& networ
{
}
enzo::geo::Geometry enzo::op::Context::cloneInputGeo(unsigned int inputIndex)
{
// TODO: implement
enzo::nt::GeometryOperator& selfOp = networkManager_.getGeoOperator(opId_);
std::vector<std::shared_ptr<const nt::GeometryConnection>> inputConnections = selfOp.getInputConnections();
if(inputConnections.size()==0)
{
std::cout << "no input\n";
return enzo::geo::Geometry();
}
std::shared_ptr<const nt::GeometryConnection> inputConnection = inputConnections.at(inputIndex);
return networkManager_.getGeoOperator(inputConnection->getInputOpId()).getOutputGeo(inputConnection->getInputIndex());
}