-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathShape.cpp
More file actions
38 lines (33 loc) · 767 Bytes
/
Copy pathShape.cpp
File metadata and controls
38 lines (33 loc) · 767 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
38
#include "Shape.h"
#include "stdio.h"
#include "common.h"
Shape::Shape() {
m_param1 = 0;
m_param2 = 0;
m_vertex_count = 0;
m_vertex = NULL;
}
Shape::~Shape() {
freeVertexes();
}
void Shape::renderSelf(int param1, int param2) {
}
void Shape::vertexAndNorm(float x, float y, float z, int coord_ind) {
}
void Shape::calculateVertexes(int param1, int param2) {
}
void Shape::drawTriangles() {
for(int i=0;i<m_vertex_count;i++) {
Vertex3f *tmp = m_vertex[i];
glNormal3f(tmp->m_nx, tmp->m_ny, tmp->m_nz);
glVertex3f(tmp->m_x, tmp->m_y, tmp->m_z);
}
}
void Shape::freeVertexes() {
for (int i=0;i<m_vertex_count;i++) {
delete m_vertex[i];
}
if (m_vertex != NULL) {
free (m_vertex);
}
}