Can create roofs now
This commit is contained in:
@@ -90,6 +90,23 @@ void showItemPopup(const std::pair<flecs::entity, Ogre::String> &item)
|
||||
}
|
||||
}
|
||||
};
|
||||
static float windowWidth = 1.6f;
|
||||
static float windowHeight = 2.0f;
|
||||
static float windowDepth = 0.12f;
|
||||
static float windowFrameWidth = 0.2f;
|
||||
ImGui::Text("Windows tools...");
|
||||
char windowStyleName[32] = { 0 };
|
||||
ImGui::InputFloat("windowWidth", &windowWidth);
|
||||
ImGui::InputFloat("windowHeight", &windowHeight);
|
||||
ImGui::InputFloat("windowDepth", &windowDepth);
|
||||
ImGui::InputFloat("windowFrameWidth", &windowFrameWidth);
|
||||
if (ImGui::InputText("windowStyleAdd", windowStyleName,
|
||||
sizeof(windowStyleName))) {
|
||||
}
|
||||
if (ImGui::SmallButton("Add")) {
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
buttonGroup(buttons_large,
|
||||
sizeof(buttons_large) / sizeof(buttons_large[0]));
|
||||
buttonGroup(buttons_small,
|
||||
|
||||
@@ -72,6 +72,13 @@ static void to_json(nlohmann::json &j, const Ogre::Quaternion &orientation)
|
||||
j["y"] = orientation.y;
|
||||
j["z"] = orientation.z;
|
||||
}
|
||||
static void to_json(nlohmann::json &j, const Ogre::ColourValue &colour)
|
||||
{
|
||||
j["r"] = colour.r;
|
||||
j["g"] = colour.g;
|
||||
j["b"] = colour.b;
|
||||
j["a"] = colour.a;
|
||||
}
|
||||
static void from_json(const nlohmann::json &j, Ogre::Vector3 &position)
|
||||
{
|
||||
position.x = j["x"].get<float>();
|
||||
@@ -85,5 +92,12 @@ static void from_json(const nlohmann::json &j, Ogre::Quaternion &orientation)
|
||||
orientation.y = j["y"].get<float>();
|
||||
orientation.z = j["z"].get<float>();
|
||||
}
|
||||
static void from_json(const nlohmann::json &j, Ogre::ColourValue &colour)
|
||||
{
|
||||
colour.r = j["r"].get<float>();
|
||||
colour.g = j["g"].get<float>();
|
||||
colour.b = j["b"].get<float>();
|
||||
colour.a = j["a"].get<float>();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,9 @@
|
||||
#define __TOWN_H__
|
||||
#include <OgreMeshLodGenerator.h>
|
||||
#include <flecs.h>
|
||||
namespace Procedural {
|
||||
class TriangleBuffer;
|
||||
}
|
||||
namespace ECS
|
||||
{
|
||||
namespace Items
|
||||
@@ -12,6 +15,9 @@ void createTownPopup(const std::pair<flecs::entity, Ogre::String> item);
|
||||
}
|
||||
namespace Geometry
|
||||
{
|
||||
void clampUV(flecs::entity e, Procedural::TriangleBuffer &tb,
|
||||
const Ogre::String &rectKey);
|
||||
Ogre::MaterialPtr createTownMaterial(flecs::entity e, bool force = false);
|
||||
void createCells(flecs::entity e, const nlohmann::json &jdistrict, int index,
|
||||
Ogre::SceneNode *sceneNode, Ogre::StaticGeometry *geo);
|
||||
void createTown(flecs::entity e, Ogre::SceneNode *sceneNode,
|
||||
@@ -22,6 +28,9 @@ void createTownPlazza(flecs::entity e, const nlohmann::json &jdistrict,
|
||||
void createTownLots(flecs::entity e, const nlohmann::json &jdistrict,
|
||||
int index, Ogre::SceneNode *sceneNode,
|
||||
Ogre::StaticGeometry *geo);
|
||||
void createTownRoofs(flecs::entity e, const nlohmann::json &jdistrict,
|
||||
int index, Ogre::SceneNode *sceneNode,
|
||||
Ogre::StaticGeometry *geo);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user