Commit 4e1ad862 authored by Walterio Montanez's avatar Walterio Montanez
Browse files

autosave

parent 0059ba13
......@@ -441,4 +441,26 @@ vector <pair<double, double>> viewFinder (pair <double, double> centerPt) { // f
}
}
return corners;
}
\ No newline at end of file
}
void viewWindow (vector <pair<double,double>> corners, pair<double,double> constellationCoord) {
pair<double,double> coordinates1;
pair<double,double> coordinates2;
pair<double,double> coordinates3;
pair<double,double> coordinates4;
if(corners.coordinates1.first > constellationCoord.first && corners.coordinates1.second > constellationCoord.second &&
corners.coordinates2.first < constellationCoord.first && corners.coordinates2.second > constellationCoord.second &&
corners.coordinates3.first > constellationCoord.first && corners.coordinates3.second < constellationCoord.second &&
corners.coordinates4.first < constellationCoord.first && corners.coordinates4.second < constellationCoord.second) {
cout << "Constellation is fully in view" << endl;
} else if (corners.coordinates1.first > constellationCoord.first || corners.coordinates1.second > constellationCoord.second ||
corners.coordinates2.first < constellationCoord.first || corners.coordinates2.second > constellationCoord.second ||
corners.coordinates3.first > constellationCoord.first || corners.coordinates3.second < constellationCoord.second ||
corners.coordinates4.first < constellationCoord.first || corners.coordinates4.second < constellationCoord.second) {
cout << "Constellation is partially in view" << endl;
} else {
cout << "Constellation is not in view" << endl;
}
}
Supports Markdown
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