remove normal and texcoord data from Triangle

This commit is contained in:
Gered 2012-12-18 12:33:04 -05:00
parent d89072b3d5
commit cc6fb19f4c
2 changed files with 0 additions and 18 deletions

View file

@ -109,18 +109,6 @@ void WriteChunk(TrianglesChunk *chunk, FILE *fp)
fwrite(&triangle->vertices[2], sizeof(uint32_t), 1, fp);
fwrite(&triangle->groupIndex, sizeof(uint32_t), 1, fp);
for (int j = 0; j < 3; ++j)
{
fwrite(&triangle->normals[j].x, sizeof(float), 1, fp);
fwrite(&triangle->normals[j].y, sizeof(float), 1, fp);
fwrite(&triangle->normals[j].z, sizeof(float), 1, fp);
}
for (int j = 0; j < 3; ++j)
{
fwrite(&triangle->texCoords[j].x, sizeof(float), 1, fp);
fwrite(&triangle->texCoords[j].y, sizeof(float), 1, fp);
}
}
}

View file

@ -2,15 +2,11 @@
#define __GEOMETRY_TRIANGLE_H_INCLUDED__
#include "../common.h"
#include "vector2.h"
#include "vector3.h"
struct Triangle
{
uint32_t vertices[3];
uint32_t groupIndex;
Vector3 normals[3];
Vector2 texCoords[3];
uint32_t GetSize() const;
};
@ -21,8 +17,6 @@ inline uint32_t Triangle::GetSize() const
size += sizeof(uint32_t) * 3; // vertices (index)
size += sizeof(uint32_t); // group index
size += (sizeof(float) * 3) * 3; // normals (xyz)
size += (sizeof(float) * 2) * 3; // texcoords (uv)
return size;
}