-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrenderer.h
48 lines (33 loc) · 858 Bytes
/
renderer.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 RENDERER_H
#define RENDERER_H
#include "edge.h"
#include "frame.h"
#include "maths.h"
#include "polygon.h"
#include "Scene.h"
#include <map>
#include <vector>
// Renders a Scene. Takes a Scene and a Frame
class Renderer
{
public:
struct Intersection {
double alpha;
int deltaIQ;
bool valid;
};
Renderer::Renderer(Scene* scene, Frame* frame);
bool Render();
bool FaceVertexCompare(Polygon* poly, vec4 vertex);
std::map<double, int> BoundaryEdgeCompare(Edge* edge);
Intersection EdgeEdgeCompare(Edge* edge, Edge* test_edge);
void SetWireFrameMode(bool b) { wireframe_ = b; };
private:
//double EdgeEdgeCompare(Edge* a, Edge* b);
Scene* scene_;
Frame* frame_;
std::vector<Edge*> edge_list_;
std::vector<Edge*> boundary_edges_;
bool wireframe_;
};
#endif