erebus
diff liberebus/src/erebus_impl.h @ 17:e9da2916bc79
fixed the normal bug
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Mon, 26 May 2014 05:41:28 +0300 |
parents | 474a0244f57d |
children | 4336acf8389d |
line diff
1.1 --- a/liberebus/src/erebus_impl.h Sun May 25 02:23:39 2014 +0300 1.2 +++ b/liberebus/src/erebus_impl.h Mon May 26 05:41:28 2014 +0300 1.3 @@ -1,6 +1,49 @@ 1.4 #ifndef EREBUS_IMPL_H_ 1.5 #define EREBUS_IMPL_H_ 1.6 1.7 +#include <vector> 1.8 +#include <vmath/vmath.h> 1.9 +#include "erebus.h" 1.10 +#include "image.h" 1.11 +#include "scene.h" 1.12 + 1.13 +struct Option { 1.14 + enum Type { INT, FLOAT, VEC } type; 1.15 + int ival; 1.16 + float fval; 1.17 + Vector4 vval; 1.18 +}; 1.19 + 1.20 +struct Rect { 1.21 + int x, y, width, height; 1.22 + 1.23 + bool operator ==(const Rect &r) const; 1.24 + bool operator !=(const Rect &r) const; 1.25 +}; 1.26 + 1.27 +struct erebus { 1.28 + Scene *scn; 1.29 + 1.30 + Image<float> fbimg; 1.31 + Image<float> accum; // sample accumulator per pixel 1.32 + Option options[ERB_NUM_OPTIONS]; 1.33 + 1.34 + // render state 1.35 + float inv_gamma; 1.36 + long cur_time; 1.37 + int cur_pixel_x, cur_pixel_y; 1.38 + Rect cur_rect; 1.39 + int cur_sample; 1.40 + 1.41 + // interactive input 1.42 + std::vector<bool> keystate; 1.43 + std::vector<bool> bnstate; 1.44 + int mouse_pos[2]; 1.45 + 1.46 + // debugging stuff 1.47 + int dbg_nodesel; 1.48 +}; 1.49 + 1.50 float randf(float low = 0.0f, float high = 1.0f); 1.51 1.52 #endif // EREBUS_IMPL_H_