Skip to content
Snippets Groups Projects
Commit 84000ab9 authored by Louis James's avatar Louis James
Browse files

neatened algorithm and commented

parent 7bcccd93
Branches
No related merge requests found
......@@ -65,6 +65,7 @@ void Projector::draw(){
// }
// }
// Find blob pairs
vector<vector<int>> pairs;
for (int i = 0; i < blobs.size();i++){
for (int j = 0; j < blobs.size(); j++){
......@@ -85,13 +86,12 @@ void Projector::draw(){
_found=true;
}
}
if(_found==false)
pairs.push_back({i, j});
else{}
if(!_found) pairs.push_back({i, j});
}
}
}
}
// Draw line between them
for(int i = 0; i < pairs.size(); i++){
ofDrawLine(blobs[pairs[i][0]].x, blobs[pairs[i][0]].y,
blobs[pairs[i][1]].x, blobs[pairs[i][1]].y);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment