differ vertexNormal and triangleNormal
This commit is contained in:
parent
10718f2269
commit
0a9103fdc5
|
@ -23,7 +23,7 @@ struct VertexData
|
||||||
{
|
{
|
||||||
QVector3D position;
|
QVector3D position;
|
||||||
QVector2D texCoord;
|
QVector2D texCoord;
|
||||||
QVector3D normal;
|
QVector3D vertexNormal;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct Segment {
|
struct Segment {
|
||||||
|
|
|
@ -510,7 +510,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
|
||||||
|
|
||||||
for (unsigned int i = new_segment->vertices.size(); i != tmp_size; i--)
|
for (unsigned int i = new_segment->vertices.size(); i != tmp_size; i--)
|
||||||
for (unsigned int j = 0; j < 3; j++)
|
for (unsigned int j = 0; j < 3; j++)
|
||||||
new_segment->vertices[i - 1].normal[j] = 0;
|
new_segment->vertices[i - 1].vertexNormal[j] = 0;
|
||||||
}
|
}
|
||||||
else if (tmp_size > new_segment->vertices.size())
|
else if (tmp_size > new_segment->vertices.size())
|
||||||
{
|
{
|
||||||
|
@ -520,7 +520,7 @@ void MshFile::analyseSegmChunks(Model * dataDestination, std::list<ChunkHeader*>
|
||||||
|
|
||||||
for (unsigned int i = 0; i < tmp_size; i++)
|
for (unsigned int i = 0; i < tmp_size; i++)
|
||||||
for (unsigned int j = 0; j < 3; j++)
|
for (unsigned int j = 0; j < 3; j++)
|
||||||
m_file.read(F2V(new_segment->vertices[i].normal[j]), sizeof(float));
|
m_file.read(F2V(new_segment->vertices[i].vertexNormal[j]), sizeof(float));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue