Included the Layer_SURFFeature in code

This commit is contained in:
Maximilian Papa
2018-01-25 22:14:00 +01:00
parent ec4a5da05c
commit b4641fe65b
10 changed files with 82 additions and 3 deletions

View File

@ -38,6 +38,7 @@ void Puzzle::putIntoBox()
tmpPart.m_a1=this->a1.m_constraintMatrix[i+1][j+1];
tmpPart.m_a3=this->a3.m_constraintMatrix[i][j];
tmpPart.m_a4=this->a4.m_constraintMatrix[i][j];
//sets part id
tmpPart.SetPartID(id++);
// adds all 4 rotations to Box
@ -66,6 +67,7 @@ void Puzzle::removeConstrains(coor removeCoordinates)
{
this->a1.RemoveConstraintOnPosition(removeCoordinates);
this->a3.RemoveConstraintOnPosition(removeCoordinates);
this->a4.RemoveConstraintOnPosition(removeCoordinates);
//TODO!! Add other layer remove here
}
void Puzzle::setConstraints(coor setConstraints, Part* constraintPiece)
@ -80,6 +82,9 @@ void Puzzle::setConstraints(coor setConstraints, Part* constraintPiece)
//a3
this->a3.SetConstraintOnPosition(setConstraints,constraintPiece->m_a3);
//a4
this->a4.SetConstraintOnPosition(setConstraints,constraintPiece->m_a4);
//TODO!! Add other layer remove here
}

View File

@ -83,6 +83,9 @@ void solve(vector<LogEntry>& log,Puzzle& puzzleMat)
case 1://poempelposition
puzzleMat.a3.EvaluateQuality(log.back().myCoor,log.back().PieceCollector);
break;
case 4://SURFFeature
puzzleMat.a3.EvaluateQuality(log.back().myCoor,log.back().PieceCollector);
break;
case -1://random
cout << endl;
setsolution(log,puzzleMat);