bool TriangulationCDTWindow::OnCharPress(unsigned char key, int x, int y) { switch (key) { case '0': UnindexedSimplePolygon(); OnDisplay(); return true; case '1': IndexedSimplePolygon(); OnDisplay(); return true; case '2': OneNestedPolygon(); OnDisplay(); return true; case '3': TwoNestedPolygons(); OnDisplay(); return true; case '4': TreeOfNestedPolygons(); OnDisplay(); return true; } return Window::OnCharPress(key, x, y); }
bool TriangulationECWindow::OnCharPress(unsigned char key, int x, int y) { switch (key) { case '0': UnindexedSimplePolygon(); OnDisplay(); return true; case '1': IndexedSimplePolygon(); OnDisplay(); return true; case '2': OneNestedPolygon(); OnDisplay(); return true; case '3': TwoNestedPolygons(); OnDisplay(); return true; case '4': TreeOfNestedPolygons(); OnDisplay(); return true; case '5': FourBoxesThreeNested(0, 1, 2); OnDisplay(); return true; case '6': FourBoxesThreeNested(0, 2, 1); OnDisplay(); return true; case '7': FourBoxesThreeNested(1, 0, 2); OnDisplay(); return true; case '8': FourBoxesThreeNested(1, 2, 0); OnDisplay(); return true; case '9': FourBoxesThreeNested(2, 0, 1); OnDisplay(); return true; case 'a': case 'A': FourBoxesThreeNested(2, 1, 0); OnDisplay(); return true; } return Window::OnCharPress(key, x, y); }