-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathrender.h
64 lines (52 loc) · 1.67 KB
/
render.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#ifndef __MALLIE_RENDER_H__
#define __MALLIE_RENDER_H__
#include <vector>
#include <string>
#include "scene.h"
namespace mallie {
struct RenderConfig {
double fov;
int width;
int height;
double eye[3];
double lookat[3];
double up[3];
double quat[4];
double scene_scale;
bool scene_fit;
bool plane; // Infinite plane for debugging purpose
int num_passes;
int num_photons; // # of photon to shoot per pass.
std::string obj_filename;
std::string eson_filename;
std::string magicavoxel_filename;
std::string material_filename;
RenderConfig()
: fov(45.0), width(512), height(512), scene_scale(1.0), plane(false),
num_passes(10), num_photons(10000) {
eye[0] = 0.0;
eye[1] = 0.0;
eye[2] = -5.0;
lookat[0] = 0.0;
lookat[1] = 0.0;
lookat[2] = 0.0;
up[0] = 0.0;
up[1] = 1.0;
up[2] = 0.0;
quat[0] = quat[1] = quat[2] = quat[3] = 0.0;
scene_fit = false;
}
};
extern void Render(Scene &scene, const RenderConfig &config,
std::vector<float> &image, // out image
std::vector<int> &count, // per-pixel counter
const double eye[3], const double lookat[3],
const double up[3], const double quat[4], int step);
extern void RenderPanoramic(Scene &scene, const RenderConfig &config,
std::vector<float> &image, // out image
std::vector<int> &count, // per-pixel counter
const double eye[3], const double lookat[3],
const double up[3], const double quat[4],
bool stereo);
}
#endif // __MALLIE_RENDER_H__