-
Notifications
You must be signed in to change notification settings - Fork 0
/
object3D.h
64 lines (36 loc) · 1.59 KB
/
object3D.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
typedef struct {
float **points; //Coordenadas x, y, z de cada ponto
int **lines; //Indice do primeiro e ultimo ponto da linha
int* trans; // Coordenadas x, y e z para projecao no sist de referencia do universo
int* ang; //Angulos de rotacao nas coordenadas x, y e z
float* scale; //Escala do objeto, x, y e z
int p, l; //qnt de pontos e linhas
}graphObject;
graphObject* newObject(int n_points, int m_lines);
void destroyObject(graphObject* obj);
void printMtr (int linha, int coluna, int** mtr);
void printMtrFloat (int linha, int coluna, float** mtr);
void printArray (int size, int array[size]);
void printArrayFloat (int size, float array[size]);
graphObject* newCube ();
void printObjectInfo (graphObject* obj);
graphObject* copyObject (graphObject* orig);
void matrixMult (graphObject* obj, float mtr[][3]);
void matrixSum (graphObject* obj, int mtr[3]);
void rotateX(graphObject* obj, float angle);
void rotateY(graphObject* obj, float angle);
void rotateZ(graphObject* obj, float angle);
void scaleX(graphObject* obj, float scale);
void scaleY(graphObject* obj, float scale);
void scaleZ(graphObject* obj, float scale);
void transX(graphObject* obj, int trans);
void transY(graphObject* obj, int trans);
void transZ(graphObject* obj, int trans);
graphObject* scaleObject(graphObject* obj, float scale);
graphObject* moveCenter(graphObject* obj, int center);
void cavaleira_proj (graphObject* obj);
void cabinet_proj (graphObject* obj);
void orto_proj (graphObject* obj);
void persp1_proj (graphObject* obj);
void persp2_proj (graphObject* obj);
void showLinesCube (graphObject* cube);