Game of Ur 0.3.3
This is a computer adaptation of Game of Ur, written in C++ mainly using SDL and OpenGL.
Loading...
Searching...
No Matches
shapegen.hpp
Go to the documentation of this file.
1
11
12#ifndef FOOLSENGINE_SHAPEGEN_H
13#define FOOLSENGINE_SHAPEGEN_H
14
15#include <memory>
16#include <nlohmann/json.hpp>
17
19#include "mesh.hpp"
20#include "model.hpp"
21
22namespace ToyMaker {
23
45 class StaticMeshSphereLatLong: public ResourceConstructor<StaticMesh, StaticMeshSphereLatLong> {
46 public:
47 StaticMeshSphereLatLong():
49 {}
50 inline static std::string getResourceConstructorName() { return "sphereLatLong"; }
51 private:
52 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
53 };
54
75 class StaticMeshRectangleDimensions: public ResourceConstructor<StaticMesh, StaticMeshRectangleDimensions> {
76 public:
77 StaticMeshRectangleDimensions():
79 {}
80 inline static std::string getResourceConstructorName() { return "rectangleDimensions"; }
81 private:
82 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
83 };
84
108 class StaticMeshCuboidDimensions: public ResourceConstructor<StaticMesh, StaticMeshCuboidDimensions> {
109 public:
110 StaticMeshCuboidDimensions():
112 {}
113 inline static std::string getResourceConstructorName() { return "cuboidDimensions"; }
114 private:
115 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
116 };
117
125 class StaticModelSphereLatLong: public ResourceConstructor<StaticModel, StaticModelSphereLatLong> {
126 public:
127 StaticModelSphereLatLong():
129 {}
130 inline static std::string getResourceConstructorName() { return "sphereLatLong"; }
131 private:
132 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
133 };
134
143 class StaticModelRectangleDimensions: public ResourceConstructor<StaticModel, StaticModelRectangleDimensions> {
144 public:
145 StaticModelRectangleDimensions():
147 {}
148 inline static std::string getResourceConstructorName() { return "rectangleDimensions"; }
149 private:
150 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
151 };
152
160 class StaticModelCuboidDimensions: public ResourceConstructor<StaticModel, StaticModelCuboidDimensions> {
161 public:
162 StaticModelCuboidDimensions():
164 {}
165 inline static std::string getResourceConstructorName() { return "cuboidDimensions"; }
166 private:
167 std::shared_ptr<IResource> createResource(const nlohmann::json& methodParameters) override;
168 };
169
170}
171#endif
ResourceConstructor(int explicitlyInitializeMe)
Definition resource_database.hpp:491
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:39
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:31
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:23
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:110
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:82
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition shapegen.cpp:53
Classes, constructors for this engine's representation of 3D models.
A file containing the ToyMaker::StaticMesh class and related structures.
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition camera_system.hpp:20
Headers relating to resources and their management for a given project.