ToyMaker Game Engine
0.0.2
ToyMaker is a game engine developed and maintained by Zoheb Shujauddin.
Toggle main menu visibility
Loading...
Searching...
No Matches
shapegen.hpp
Go to the documentation of this file.
1
11
12
#ifndef TOYMAKERENGINE_SHAPEGEN_H
13
#define TOYMAKERENGINE_SHAPEGEN_H
14
15
#include <memory>
16
#include <nlohmann/json.hpp>
17
18
#include "
core/resource_database.hpp
"
19
#include "
mesh.hpp
"
20
#include "
model.hpp
"
21
22
namespace
ToyMaker
{
23
45
class
StaticMeshSphereLatLong:
public
ResourceConstructor
<StaticMesh, StaticMeshSphereLatLong> {
46
public
:
47
StaticMeshSphereLatLong():
48
ResourceConstructor<StaticMesh, StaticMeshSphereLatLong>
{0}
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():
78
ResourceConstructor<StaticMesh, StaticMeshRectangleDimensions>
{0}
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():
111
ResourceConstructor<StaticMesh, StaticMeshCuboidDimensions>
{0}
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():
128
ResourceConstructor<StaticModel, StaticModelSphereLatLong>
{0}
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():
146
ResourceConstructor<StaticModel, StaticModelRectangleDimensions>
{0}
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():
163
ResourceConstructor<StaticModel, StaticModelCuboidDimensions>
{0}
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
ToyMaker::ResourceConstructor< StaticMesh, StaticMeshSphereLatLong >::ResourceConstructor
ResourceConstructor(int explicitlyInitializeMe)
Definition
resource_database.hpp:488
ToyMaker::StaticMeshCuboidDimensions::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:39
ToyMaker::StaticMeshRectangleDimensions::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:31
ToyMaker::StaticMeshSphereLatLong::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:23
ToyMaker::StaticModelCuboidDimensions::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:110
ToyMaker::StaticModelRectangleDimensions::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:82
ToyMaker::StaticModelSphereLatLong::createResource
std::shared_ptr< IResource > createResource(const nlohmann::json &methodParameters) override
Creates a resource object using the parameters specified in methodParameters.
Definition
shapegen.cpp:53
mesh.hpp
A file containing the ToyMaker::StaticMesh class and related structures.
model.hpp
Classes, constructors for this engine's representation of 3D models.
ToyMaker
Namespace containing all class definitions and functions related to the ToyMaker engine.
Definition
application.hpp:25
resource_database.hpp
Headers relating to resources and their management for a given project.
ToyMaker_Main
include
toymaker
engine
shapegen.hpp
Generated on
for ToyMaker Game Engine by
1.17.0