-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrender.h
More file actions
37 lines (37 loc) · 910 Bytes
/
render.h
File metadata and controls
37 lines (37 loc) · 910 Bytes
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
#ifndef _RENDER_
#define _RENDER_
#include "vec4.h"
#include <queue>
#include <vector>
class Render{
public:
Render(int sizeX,int sizeY);
~Render();
void workTriple(vec4* position, vec4* color,vec4* normal);
void getPixel(vec4 &p,vec4 &c);
void stencilReset();
bool done(){return qPixels.empty();}
private:
int sizeX;
int sizeY;
void setStencil(vec4 v);
bool** stencil;
std::queue<vec4> qPixels;
std::queue<vec4*> qTriples;
float getFloat();
bool contains(vec4 v);
vec4 getBound(vec4* position);
void addNeighbors(vec4 postion);
void addPixel(vec4 position);
bool onTriangle(vec4 v);
bool onBound(vec4 v);
vec4* workPosition;
vec4* workColor;
vec4* workNormal;
vec4 getFrag(vec4 p);
vec4 getFragShade(vec4 p);
float getDepth(vec4 p);
vec4 getNormal(vec4 p);
vec4 getBary(vec4 p);
};
#endif // _RENDER_