Changeset 1071 for cpp/frams/model/similarity/measuregreedy.cpp
 Timestamp:
 02/08/21 17:07:11 (2 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/model/similarity/measuregreedy.cpp
r1066 r1071 147 147 m_iDN += abs(temp); 148 148 // pobierz polozenie dopasowanego Part 149 Pt3D MatchedPartPos(coordinates[m_iSmaller][iOrgMatchedPart]); 150 // dodaj euklidesowa odleglosc Parts do sumy odleglosci 151 //no need to compute distane when m_dDG weight is 0 152 m_dDG += m_adFactors[3] == 0 ? 0 : coordinates[1  m_iSmaller][iOrgPart].distanceTo(MatchedPartPos); 149 if (m_adFactors[3] > 0) 150 { 151 Pt3D MatchedPartPos(coordinates[m_iSmaller][iOrgMatchedPart]); 152 // dodaj euklidesowa odleglosc Parts do sumy odleglosci 153 m_dDG += coordinates[1  m_iSmaller][iOrgPart].distanceTo(MatchedPartPos); 154 } 153 155 } 154 156 } … … 318 320 // now compute the geometrical distance of these Parts (use coordinates 319 321 // which should be computed by SVD) 320 Pt3D Part0Pos(coordinates[0][iPartIndex[0]]); 321 Pt3D Part1Pos(coordinates[1][iPartIndex[1]]); 322 dGeo = m_adFactors[3] == 0 ? 0 : Part0Pos.distanceTo(Part1Pos); //no need to compute distane when m_dDG weight is 0 322 dGeo = 0; 323 if (m_adFactors[3] > 0) 324 { 325 Pt3D Part0Pos(coordinates[0][iPartIndex[0]]); 326 Pt3D Part1Pos(coordinates[1][iPartIndex[1]]); 327 dGeo = Part0Pos.distanceTo(Part1Pos); 328 } 323 329 324 330 // tutaj prawdopodobnie należy jeszcze dodać sprawdzanie … … 1485 1491 m_adFactors[i] = params.at(i); 1486 1492 fixedZaxis = params.at(i); 1493 if (m_adFactors[3] == 0) 1494 with_alignment = false; 1487 1495 return 0; 1488 1496 }
Note: See TracChangeset
for help on using the changeset viewer.