-
Notifications
You must be signed in to change notification settings - Fork 0
/
Figure.h
56 lines (40 loc) · 1.13 KB
/
Figure.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
//
// Created by arno on 26.02.19.
//
#ifndef ENGINE_FIGURE_H
#define ENGINE_FIGURE_H
#include "Face.h"
#include "vector3d.h"
#include "ColorD.h"
#include "Line2D.h"
#include <list>
class Figure;
typedef std::list<Figure> Figures3D;
class Figure {
public:
std::vector<Vector3D> points;
std::vector<Face> faces;
// ColorD color;
ColorD ambientReflection;
ColorD diffuseReflection;
ColorD specularReflection;
double reflectionCoeff;
Lines2D doProjection();
void applyTransformation(const Matrix &transformation);
void decreaseFaces();
void splitTriangles();
void rescalePoints();
void trinagulate();
std::vector<Face> triangulate_face(const Face& face);
void mergeFigure(Figure fig);
/**
*
* @param resultingFigures
* @param r The radius of the spheres and cilinders
* @param n The number of side faces of the cilinders
* @param m The number of iterations to generate the spheres with
*/
void generateThickFigure(Figures3D& resultingFigures, const double r, const int n, const int m);
bool pointInFace(int i);
};
#endif //ENGINE_FIGURE_H