-
Notifications
You must be signed in to change notification settings - Fork 0
/
trace.h
48 lines (41 loc) · 775 Bytes
/
trace.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
#ifndef ___TRACE_H___
#define ___TRACE_H___
#include "geom.h"
#include "color.h"
#include "solids.h"
typedef struct
{
solid* shape;
CORD_TYPE c_spec_ref, c_spec_trans; /* para rayos hijo */
CORD_TYPE c_diff_ref;
colorf col_diff;
CORD_TYPE refindex;
} body;
typedef struct
{
point pos;
colorf col;
CORD_TYPE aten_const,aten_lin,aten_quad;
} light;
typedef struct
{
int Nlight;
light* light;
int Nobj;
body* obj;
colorf ambient_light;
} scene;
typedef struct {
int resx,resy;
point camera;
vec scrvec;
vec scrx;
vec scry;
int maxdepth;
int rpp;
} sceneinfo;
scene* loadScene(void);
sceneinfo* loadSceneInfo(void);
void destroyScene(scene*);
colorf trace(const scene* sc, point start, vec dir, int depth, int obj, vec olddir, CORD_TYPE power);
#endif