Lumiverse  2.5
A framework for creating lighting control applications
Compositor.h
1 #ifndef Lumiverse_COMPOSITOR_H
2 #define Lumiverse_COMPOSITOR_H
3 
4 #ifdef USE_ARNOLD_CACHING
5 
6 #include <unordered_map>
7 #include <set>
8 #include <string>
9 
10 #include "EXRLayer.h"
11 #include "Device.h"
12 
13 namespace Lumiverse {
14 
25 class Compositor {
26 public:
31  Compositor();
32 
37  ~Compositor();
38 
43  size_t get_width();
44 
49  size_t get_height();
50 
55  std::unordered_map<std::string, EXRLayer *>& get_layers();
56 
62  void add_layer(EXRLayer *layer);
63 
69  void del_layer(EXRLayer *layer);
70 
77  EXRLayer *get_layer_by_name(const char *layer_name);
78 
84  void del_layer_by_name(const char *layer_name);
85 
90  void render(const std::set<Device*> &devices);
91 
96  Pixel4 *get_compose_buffer() { return compose_buffer; };
97 
102  void update_dims(int w, int h);
103 
107  bool contains_layer(const char *layer_name);
108 
114  float _exposure;
115 
116 private:
121  size_t w;
122 
127  size_t h;
128 
132  std::unordered_map<std::string, EXRLayer *> layers;
133 
140  Pixel4 *compose_buffer;
141 };
142 
143 }; // namespace Lumiverse
144 
145 #endif // USE_ARNOLD_CACHING
146 
147 #endif // Lumiverse_COMPOSITOR_H
void render()
Render a frame and pass it back to node.
Definition: Dumiverse.cpp:43
Represents a physical lighting Device in Lumiverse.
Contains all core Lumiverse functions and variables.
Definition: Device.cpp:2