MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / computeCorner

Function computeCorner

tools/modeltool/modeltool.cpp:1079–1096  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1077
1078
1079int computeCorner(const CMesh& mesh, const CFace& face, int index, tvVec3List& v, tvVec3List& n, tvVec2List& u, tvVec3List& c) {
1080 int vertIndex = getNewIndex(mesh.verts[face.verts[index]], v);
1081 int normalIndex = getNewIndex(mesh.normals[face.normals[index]], n);
1082 int uvIndex;
1083 if (!face.texCoords.size()) {
1084 uvIndex = getNewIndex(CVector2(0, 0), u);
1085 }
1086 else {
1087 uvIndex = getNewIndex(mesh.texCoords[face.texCoords[index]], u);
1088 }
1089
1090 CVector3 vert;
1091 vert.x = (float)vertIndex;
1092 vert.y = (float)normalIndex;
1093 vert.z = (float)uvIndex;
1094
1095 return getNewIndex(vert, c);
1096}
1097
1098int computeCorner(const CMesh& mesh, const CTriStrip& strip, int index, tvVec3List& v, tvVec3List& n, tvVec2List& u, tvVec3List& c) {
1099 // it's highly likely that the strip will use

Callers 1

writeDrawInfoBZWFunction · 0.85

Calls 4

getNewIndexFunction · 0.85
CVector2Class · 0.85
CVector3Class · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected