-
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
f1d4338
commit 6f98763
Showing
6 changed files
with
77 additions
and
88 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 |
---|---|---|
@@ -1,16 +1,15 @@ | ||
#pragma once | ||
#include <vector> | ||
#include <string> | ||
#include <tuple> | ||
#include <vector> | ||
|
||
typedef std::vector<std::tuple<std::string, std::string>> Point; | ||
|
||
class Figure | ||
{ | ||
public: | ||
Figure(); | ||
void exportFile(std::string filename); | ||
class Figure { | ||
public: | ||
Figure(); | ||
void exportFile(std::string filename); | ||
|
||
private: | ||
std::vector<Point> points; | ||
private: | ||
std::vector<Point> points; | ||
}; |
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,8 +1,10 @@ | ||
#pragma once | ||
#include <memory> | ||
|
||
#include "figure.hpp" | ||
|
||
std::unique_ptr<Figure> generatePlane(float length, int divisions); | ||
std::unique_ptr<Figure> generateBox(float dimension, int divisions); | ||
std::unique_ptr<Figure> generateSphere(float radius, int slices, int stacks); | ||
std::unique_ptr<Figure> generateCone(float radius, float height, int slices, int stacks); | ||
std::unique_ptr<Figure> generateCone(float radius, float height, int slices, | ||
int stacks); |
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,14 +1,11 @@ | ||
#include "figure.hpp" | ||
|
||
#include <fstream> | ||
|
||
Figure::Figure() | ||
{ | ||
points = std::vector<Point>(); | ||
} | ||
Figure::Figure() { points = std::vector<Point>(); } | ||
|
||
void Figure::exportFile(std::string filename) | ||
{ | ||
std::ofstream file(filename); | ||
file << "Test\n"; | ||
file.close(); | ||
void Figure::exportFile(std::string filename) { | ||
std::ofstream file(filename); | ||
file << "Test\n"; | ||
file.close(); | ||
} |
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,28 +1,26 @@ | ||
#include "figure_generator.hpp" | ||
|
||
#include <iostream> | ||
|
||
// This is a placeholder for the actual implementation of the functions | ||
|
||
std::unique_ptr<Figure> generatePlane(float length, int divisions) | ||
{ | ||
std::cout << "Generating Plane\n"; | ||
return std::make_unique<Figure>(); | ||
std::unique_ptr<Figure> generatePlane(float length, int divisions) { | ||
std::cout << "Generating Plane\n"; | ||
return std::make_unique<Figure>(); | ||
} | ||
|
||
std::unique_ptr<Figure> generateBox(float dimension, int divisions) | ||
{ | ||
std::cout << "Generating Box\n"; | ||
return std::make_unique<Figure>(); | ||
std::unique_ptr<Figure> generateBox(float dimension, int divisions) { | ||
std::cout << "Generating Box\n"; | ||
return std::make_unique<Figure>(); | ||
} | ||
|
||
std::unique_ptr<Figure> generateSphere(float radius, int slices, int stacks) | ||
{ | ||
std::cout << "Generating Sphere\n"; | ||
return std::make_unique<Figure>(); | ||
std::unique_ptr<Figure> generateSphere(float radius, int slices, int stacks) { | ||
std::cout << "Generating Sphere\n"; | ||
return std::make_unique<Figure>(); | ||
} | ||
|
||
std::unique_ptr<Figure> generateCone(float radius, float height, int slices, int stacks) | ||
{ | ||
std::cout << "Generating Cone\n"; | ||
return std::make_unique<Figure>(); | ||
std::unique_ptr<Figure> generateCone(float radius, float height, int slices, | ||
int stacks) { | ||
std::cout << "Generating Cone\n"; | ||
return std::make_unique<Figure>(); | ||
} |
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,7 +1,6 @@ | ||
#include <iostream> | ||
|
||
int main() | ||
{ | ||
std::cout << "Hello, World!" << std::endl; | ||
return 0; | ||
int main() { | ||
std::cout << "Hello, World!" << std::endl; | ||
return 0; | ||
} |