MCPcopy Create free account
hub / github.com/ZDoom/Raze / LoadNormal

Method LoadNormal

source/common/models/models_iqm.cpp:348–365  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

346}
347
348void IQMModel::LoadNormal(IQMFileReader& reader, const IQMVertexArray& vertexArray)
349{
350 if (vertexArray.Format == IQM_FLOAT && vertexArray.Size == 3)
351 {
352 for (FModelVertex& v : Vertices)
353 {
354 float x = reader.ReadFloat();
355 float y = reader.ReadFloat();
356 float z = reader.ReadFloat();
357
358 v.SetNormal(x, z, y);
359 }
360 }
361 else
362 {
363 I_FatalError("Unsupported IQM_NORMAL vertex format");
364 }
365}
366
367void IQMModel::LoadBlendIndexes(IQMFileReader& reader, const IQMVertexArray& vertexArray)
368{

Callers

nothing calls this directly

Calls 3

I_FatalErrorFunction · 0.85
ReadFloatMethod · 0.80
SetNormalMethod · 0.45

Tested by

no test coverage detected