Enzo
Loading...
Searching...
No Matches
src
Engine
Operator
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
10
namespace
enzo::nt {
class
NetworkManager;}
11
12
namespace
enzo::nt
13
{
14
class
NetworkManager;
15
31
class
BOOST_SYMBOL_EXPORT
GeometryOpDef
32
{
33
public
:
37
GeometryOpDef
(
nt::NetworkManager
* network,
op::OpInfo
opInfo);
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
;
69
private
:
70
std::vector<enzo::geo::Geometry> outputGeometry_;
71
72
protected
:
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
81
using
opConstructor =
GeometryOpDef
* (*)(
enzo::nt::NetworkManager
* network,
enzo::op::OpInfo
opInfo);
82
83
}
Types.h
Basic attribute, parameter, and node types for Enzo.
enzo::geo::Geometry
Attribute based geometry container exchanged and modified by nodes.
enzo::nt::GeometryOpDef
Abstract class used to create new operators.
Definition
GeometryOpDef.h:32
enzo::nt::GeometryOpDef::cookOp
virtual void cookOp(op::Context context)=0
This function is called at runtime to create the output geometry.
enzo::nt::NetworkManager
The central coordinator of the engine's node system.
Definition
NetworkManager.h:26
enzo::op::Context
Provides network context for the cookOp function.
Definition
Context.h:20
enzo::op::OpInfo
Definition
OpInfo.h:20
Generated by
1.12.0