{
FILE *tfile;
long i;
- int TriangleNum;
+ short triangleNum;
type = notextype;
color = 0;
// read model settings
fseek(tfile, 0, SEEK_SET);
- funpackf(tfile, "Bs Bs", &vertexNum, &TriangleNum);
+ funpackf(tfile, "Bs Bs", &vertexNum, &triangleNum);
// read the model data
deallocate();
owner = (int*)malloc(sizeof(int) * vertexNum);
vertex = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
- Triangles.resize(TriangleNum);
- vArray = (GLfloat*)malloc(sizeof(GLfloat) * TriangleNum * 24);
+ Triangles.resize(triangleNum);
+ vArray = (GLfloat*)malloc(sizeof(GLfloat) * triangleNum * 24);
for (i = 0; i < vertexNum; i++) {
funpackf(tfile, "Bf Bf Bf", &vertex[i].x, &vertex[i].y, &vertex[i].z);
}
- for (i = 0; i < TriangleNum; i++) {
+ for (i = 0; i < triangleNum; i++) {
short vertex[6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[0], &vertex[1], &vertex[2], &vertex[3], &vertex[4], &vertex[5]);
Triangles[i].vertex[0] = vertex[0];
{
FILE *tfile;
long i;
- int TriangleNum;
+ short triangleNum;
LOGFUNC;
// read model settings
fseek(tfile, 0, SEEK_SET);
- funpackf(tfile, "Bs Bs", &vertexNum, &TriangleNum);
+ funpackf(tfile, "Bs Bs", &vertexNum, &triangleNum);
// read the model data
deallocate();
owner = (int*)malloc(sizeof(int) * vertexNum);
vertex = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
normals = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
- Triangles.resize(TriangleNum);
- vArray = (GLfloat*)malloc(sizeof(GLfloat) * TriangleNum * 24);
+ Triangles.resize(triangleNum);
+ vArray = (GLfloat*)malloc(sizeof(GLfloat) * triangleNum * 24);
for (i = 0; i < vertexNum; i++) {
funpackf(tfile, "Bf Bf Bf", &vertex[i].x, &vertex[i].y, &vertex[i].z);
}
- for (i = 0; i < TriangleNum; i++) {
+ for (i = 0; i < triangleNum; i++) {
short vertex[6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[0], &vertex[1], &vertex[2], &vertex[3], &vertex[4], &vertex[5]);
Triangles[i].vertex[0] = vertex[0];
{
FILE *tfile;
long i, j;
- int TriangleNum;
+ short triangleNum;
LOGFUNC;
// read model settings
fseek(tfile, 0, SEEK_SET);
- funpackf(tfile, "Bs Bs", &vertexNum, &TriangleNum);
+ funpackf(tfile, "Bs Bs", &vertexNum, &triangleNum);
// read the model data
owner = (int*)malloc(sizeof(int) * vertexNum);
vertex = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
normals = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
- Triangles.resize(TriangleNum);
- vArray = (GLfloat*)malloc(sizeof(GLfloat) * TriangleNum * 24);
+ Triangles.resize(triangleNum);
+ vArray = (GLfloat*)malloc(sizeof(GLfloat) * triangleNum * 24);
for (i = 0; i < vertexNum; i++) {
funpackf(tfile, "Bf Bf Bf", &vertex[i].x, &vertex[i].y, &vertex[i].z);
}
- for (i = 0; i < TriangleNum; i++) {
+ for (i = 0; i < triangleNum; i++) {
short vertex[6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[0], &vertex[1], &vertex[2], &vertex[3], &vertex[4], &vertex[5]);
Triangles[i].vertex[0] = vertex[0];
{
FILE *tfile;
long i;
- int TriangleNum;
+ short triangleNum;
LOGFUNC;
// read model settings
fseek(tfile, 0, SEEK_SET);
- funpackf(tfile, "Bs Bs", &vertexNum, &TriangleNum);
+ funpackf(tfile, "Bs Bs", &vertexNum, &triangleNum);
// read the model data
deallocate();
owner = (int*)malloc(sizeof(int) * vertexNum);
vertex = (XYZ*)malloc(sizeof(XYZ) * vertexNum);
- Triangles.resize(TriangleNum);
- vArray = (GLfloat*)malloc(sizeof(GLfloat) * TriangleNum * 24);
+ Triangles.resize(triangleNum);
+ vArray = (GLfloat*)malloc(sizeof(GLfloat) * triangleNum * 24);
for (i = 0; i < vertexNum; i++) {
funpackf(tfile, "Bf Bf Bf", &vertex[i].x, &vertex[i].y, &vertex[i].z);
}
- for (i = 0; i < TriangleNum; i++) {
+ for (i = 0; i < triangleNum; i++) {
short vertex[6];
funpackf(tfile, "Bs Bs Bs Bs Bs Bs", &vertex[0], &vertex[1], &vertex[2], &vertex[3], &vertex[4], &vertex[5]);
Triangles[i].vertex[0] = vertex[0];