-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6f98763
commit 8872a76
Showing
3 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,6 @@ CMakeFiles/* | |
CMakeCache.txt | ||
*.cmake | ||
Makefile | ||
class1 | ||
.vscode | ||
generator | ||
visualizer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,43 @@ | ||
#include <string.h> | ||
|
||
#include <iostream> | ||
|
||
int main() { | ||
std::cout << "Hello, World!" << std::endl; | ||
#include "../include/figure.hpp" | ||
#include "../include/figure_generator.hpp" | ||
|
||
inline std::unique_ptr<Figure> generateFigure(int argc, char* argv[]) { | ||
if (argc < 5) { | ||
std::cerr << "Insufficient arguments\n"; | ||
return 0; | ||
} | ||
|
||
std::string figureType = argv[argc - 1]; | ||
|
||
if (figureType == "sphere.3d" && argc == 6) { | ||
// Generate Sphere | ||
std::cout << "Generating Sphere\n"; | ||
return 0; | ||
} else if (figureType == "box.3d" && argc == 5) { | ||
// Generate Box | ||
std::cout << "Generating Box\n"; | ||
return 0; | ||
} else if (figureType == "plane.3d" && argc == 5) { | ||
// Generate Plane | ||
std::cout << "Generating Plane\n"; | ||
return 0; | ||
} else if (figureType == "cone.3d" && argc == 7) { | ||
// Generate Cone | ||
std::cout << "Generating Cone\n"; | ||
return 0; | ||
} else { | ||
std::cerr << "Invalid arguments\n"; | ||
return 0; | ||
} | ||
return 0; | ||
} | ||
|
||
int main(int argc, char* argv[]) { | ||
std::unique_ptr<Figure> figure = generateFigure(argc, argv); | ||
|
||
return 0; | ||
} |