Enzo
Loading...
Searching...
No Matches
CookContext.h
1#pragma once
2
3#include "Engine/Core/Types.h"
4#include "Engine/Network/NodePacket.h"
5
6namespace enzo::nt {
7class NetworkManager;
8}
9
10namespace enzo::prm {
11class Ramp;
12}
13
14namespace enzo::op {
24{
25 public:
27 enzo::NodePacket cloneInputPacket(unsigned int inputIndex);
28 bool hasInput(unsigned int inputIndex);
29 floatT evalParmFloat(std::string_view parmName, const unsigned int index = 0) const;
30 intT evalParmInt(std::string_view parmName, const unsigned int index = 0) const;
31 boolT evalParmBool(std::string_view parmName, const unsigned int index = 0) const;
32 String evalParmString(std::string_view parmName, const unsigned int index = 0) const;
33
34 // Read every value of a parameter as a list. The singular forms above read
35 // one value by index, these read them all at once.
36 std::vector<floatT> evalParmFloats(std::string_view parmName) const;
37 std::vector<intT> evalParmInts(std::string_view parmName) const;
38 std::vector<String> evalParmStrings(std::string_view parmName) const;
39
40 // Read the first two float components of a parameter as a Vector2. Missing
41 // components default to zero.
42 Vector2 evalParmVector2(std::string_view parmName) const;
43
44 // Read the first three float components of a parameter as a Vector3. Missing
45 // components default to zero.
46 Vector3 evalParmVector3(std::string_view parmName) const;
47
48 // Snapshot a ramp parameter into a sampler for use during cook.
49 enzo::prm::Ramp evalParmRamp(std::string_view parmName) const;
50
51 private:
52 enzo::nt::OpId opId_;
53 enzo::nt::NetworkManager& networkManager_;
54};
55} // namespace enzo::op
Basic attribute, parameter, and node types for Enzo.
uint64_t OpId
The unique ID assigned to each node in the network.
Definition Types.h:137
Definition NodePacket.h:9
The central coordinator of the engine's node system.
Definition NetworkManager.h:27
Provides network context for the cookOp function.
Definition CookContext.h:24
A sampled snapshot of a ramp parameter read during cook.
Definition Ramp.h:25