@@ -194,7 +194,7 @@ void MeshMender::UpdateIndices(const size_t oldIndex, const size_t newIndex, Tri
194194void MeshMender::ProcessNormals (TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
195195 xr_vector<unsigned int >& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
196196{
197- NeighborGroupList neighborGroups; // a fresh group for each pass
197+ NeighborGroupList neighborGroups; // a fresh group for each pass
198198
199199 // reset each triangle to prepare for smoothing group building
200200 for (u32 i = 0 ; i < possibleNeighbors.size (); ++i)
@@ -223,7 +223,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
223223 D3DXVECTOR3 gnorm (0 .0f , 0 .0f , 0 .0f );
224224
225225 assert (curGroup.size () != 0 && " should not be a zero group here." );
226- for (size_t t = 0 ; t < curGroup.size (); ++t) // for each triangle in the group,
226+ for (size_t t = 0 ; t < curGroup.size (); ++t) // for each triangle in the group,
227227 {
228228 TriID tID = curGroup[t];
229229 gnorm += m_Triangles[tID].normal ;
@@ -240,10 +240,10 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
240240 TriangleList& curGroup = neighborGroups[i];
241241 xr_set<size_t > thisGroupIndices;
242242
243- for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
243+ for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
244244 {
245245 TriID tID = curGroup[t];
246- for (size_t indx = 0 ; indx < 3 ; ++indx) // for each vert in that tri
246+ for (size_t indx = 0 ; indx < 3 ; ++indx) // for each vert in that tri
247247 {
248248 // if it is at the positions in question
249249 if (theVerts[m_Triangles[tID].indices [indx]].pos == workingPosition) {
@@ -281,7 +281,7 @@ void MeshMender::ProcessNormals(TriangleList& possibleNeighbors, xr_vector<Verte
281281void MeshMender::ProcessTangents (TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
282282 xr_vector<unsigned int >& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
283283{
284- NeighborGroupList neighborGroups; // a fresh group for each pass
284+ NeighborGroupList neighborGroups; // a fresh group for each pass
285285
286286 // reset each triangle to prepare for smoothing group building
287287 for (u32 i = 0 ; i < possibleNeighbors.size (); ++i)
@@ -306,7 +306,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
306306 for (u32 i = 0 ; i < neighborGroups.size (); ++i)
307307 {
308308 D3DXVECTOR3 gtang (0 , 0 , 0 );
309- for (unsigned int t = 0 ; t < neighborGroups[i].size (); ++t) // for each triangle in the group,
309+ for (unsigned int t = 0 ; t < neighborGroups[i].size (); ++t) // for each triangle in the group,
310310 {
311311 TriID tID = neighborGroups[i][t];
312312 gtang += m_Triangles[tID].tangent ;
@@ -323,10 +323,10 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
323323 TriangleList& curGroup = neighborGroups[i];
324324 xr_set<size_t > thisGroupIndices;
325325
326- for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
326+ for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
327327 {
328328 TriID tID = curGroup[t];
329- for (size_t indx = 0 ; indx < 3 ; indx++) // for each vert in that tri
329+ for (size_t indx = 0 ; indx < 3 ; indx++) // for each vert in that tri
330330 {
331331 // if it is at the positions in question
332332 if (theVerts[m_Triangles[tID].indices [indx]].pos == workingPosition) {
@@ -364,7 +364,7 @@ void MeshMender::ProcessTangents(TriangleList& possibleNeighbors, xr_vector<Vert
364364void MeshMender::ProcessBinormals (TriangleList& possibleNeighbors, xr_vector<Vertex>& theVerts,
365365 xr_vector<unsigned int >& mappingNewToOldVert, D3DXVECTOR3 workingPosition)
366366{
367- NeighborGroupList neighborGroups; // a fresh group for each pass
367+ NeighborGroupList neighborGroups; // a fresh group for each pass
368368
369369 // reset each triangle to prepare for smoothing group building
370370 for (u32 i = 0 ; i < possibleNeighbors.size (); ++i)
@@ -389,7 +389,7 @@ void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector<Ver
389389 for (u32 i = 0 ; i < neighborGroups.size (); ++i)
390390 {
391391 D3DXVECTOR3 gbinormal (0 , 0 , 0 );
392- for (unsigned int t = 0 ; t < neighborGroups[i].size (); ++t) // for each triangle in the group,
392+ for (unsigned int t = 0 ; t < neighborGroups[i].size (); ++t) // for each triangle in the group,
393393 {
394394 TriID tID = neighborGroups[i][t];
395395 gbinormal += m_Triangles[tID].binormal ;
@@ -406,10 +406,10 @@ void MeshMender::ProcessBinormals(TriangleList& possibleNeighbors, xr_vector<Ver
406406 TriangleList& curGroup = neighborGroups[i];
407407 xr_set<size_t > thisGroupIndices;
408408
409- for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
409+ for (size_t t = 0 ; t < curGroup.size (); ++t) // for each tri
410410 {
411411 TriID tID = curGroup[t];
412- for (size_t indx = 0 ; indx < 3 ; ++indx) // for each vert in that tri
412+ for (size_t indx = 0 ; indx < 3 ; ++indx) // for each vert in that tri
413413 {
414414 // if it is at the positions in question
415415 if (theVerts[m_Triangles[tID].indices [indx]].pos == workingPosition) {
@@ -482,9 +482,9 @@ bool MeshMender::Mend(xr_vector<Vertex>& theVerts, xr_vector<unsigned int>& theI
482482 return true ;
483483}
484484
485- void MeshMender::BuildGroups (Triangle* tri, // the tri of interest
486- TriangleList& possibleNeighbors, // all tris arround a vertex
487- NeighborGroupList& neighborGroups, // the neighbor groups to be updated
485+ void MeshMender::BuildGroups (Triangle* tri, // the tri of interest
486+ TriangleList& possibleNeighbors, // all tris arround a vertex
487+ NeighborGroupList& neighborGroups, // the neighbor groups to be updated
488488 xr_vector<Vertex>& theVerts, CanSmoothChecker* smoothChecker, const float & minCreaseAngle)
489489{
490490 if ((!tri) || (tri->handled )) return ;
@@ -535,7 +535,7 @@ void MeshMender::FindNeighbors(Triangle* tri, TriangleList& possibleNeighbors, T
535535 {
536536 TriID tID = possibleNeighbors[n];
537537 Triangle* possible = &(m_Triangles[tID]);
538- if (possible != tri) // check for myself
538+ if (possible != tri) // check for myself
539539 {
540540 if (SharesEdge (tri, possible, theVerts)) {
541541 theNeighbors.push_back (possible);
@@ -661,7 +661,7 @@ void MeshMender::SetUpData(xr_vector<Vertex>& theVerts, const xr_vector<unsigned
661661 // set up bin, norm, and tan
662662 SetUpFaceVectors (t, theVerts, computeNormals);
663663
664- t.myID = m_Triangles.size (); // set id, to my index into m_Triangles
664+ t.myID = m_Triangles.size (); // set id, to my index into m_Triangles
665665 m_Triangles.push_back (t);
666666 }
667667
@@ -751,7 +751,7 @@ void MeshMender::OrthogonalizeTangentsAndBinormals(xr_vector<Vertex>& theVerts)
751751 float lenTan = D3DXVec3Length (&(theVerts[i].tangent ));
752752 float lenBin = D3DXVec3Length (&(theVerts[i].binormal ));
753753
754- if ((lenTan <= 0 .001f ) || (lenBin <= 0 .001f )) // should be approx 1.0f
754+ if ((lenTan <= 0 .001f ) || (lenBin <= 0 .001f )) // should be approx 1.0f
755755 {
756756 // the tangent space is ill defined at this vertex
757757 // so we can generate a valid one based on the normal vector,
0 commit comments