Adding more stuff

This commit is contained in:
Dynamitos
2024-05-16 19:45:44 +02:00
parent 79bfb1fd65
commit d12508818f
224 changed files with 16092 additions and 11 deletions
+31 -6
View File
@@ -3,6 +3,7 @@
#include "Asset/AssetRegistry.h"
#include "Component/Transform.h"
#include "System/FlyCamSystem.h"
#include "Graphics/StaticMeshVertexData.h"
MeshShadingDemoGame::MeshShadingDemoGame()
{
@@ -14,15 +15,39 @@ MeshShadingDemoGame::~MeshShadingDemoGame()
void MeshShadingDemoGame::setupScene(PScene scene, PSystemGraph graph)
{
cube = new StaticMeshActor(scene, AssetRegistry::findMesh("", "cube"));
cube->getTransform().setPosition(Vector(200, 0, 40));
cube->getTransform().setRotation(Quaternion(Vector(0, 1, 0.6f)));
cube->getTransform().setScale(Vector(50, 50, 50));
lights.add(new PointLightActor(scene, Vector(4.588, 3.085, 4.934), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(7.953, 3.121, -3.686), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.556, 3.187, -20.951), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(28.248, 3.119, -12.431), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(21.286, 3.132, -3.812), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(16.584, 3.1152, 4.822), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(14.232, 3.151, 13.474), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.178, 3.144, 22.079), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.074, 3.176, 30.716), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.053, 3.136, 39.339), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.062, 3.163, 48.746), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.067, 3.097, 56.555), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.051, 3.109, 65.204), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(13.073, 3.107, 73.822), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(2.997, 3.1082, 73.903), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(2.951, 3.127, 65.324), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(2.939, 3.117, 56.713), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(2.939, 3.100, 48.078), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(1.819, 3.048, 30.881), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(1.812, 3.076, 22.211), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
lights.add(new PointLightActor(scene, Vector(2.647, 3.154, 13.573), Vector(251 / 255.f, 207 / 255.f, 107 / 255.f), 3));
//cube = new StaticMeshActor(scene, AssetRegistry::findMesh("", "cube"));
//cube->getTransform().setPosition(Vector(2, 0, 4));
////cube->getTransform().setRotation(Quaternion(Vector(0, 1, 0.6f)));
//cube->getTransform().setScale(Vector(5, 5, 5));
//car = new StaticMeshActor(scene, AssetRegistry::findMesh("Volvo", "Volvo S90"));
//chapel = new StaticMeshActor(scene, AssetRegistry::findMesh("Whitechapel", "Whitechapel"));
chapel = new StaticMeshActor(scene, AssetRegistry::findMesh("Whitechapel", "Whitechapel"));
//chapel->getTransform().setRotation(Quaternion(Vector(0, 1.5, 0)));
//chapel->getTransform().setScale(Vector(0.01, 0.01, 0.01));
//test = new StaticMeshActor(scene, AssetRegistry::findMesh("", "Arissa"));
camera = new FlyCam(scene);
light = new DirectionalLightActor(scene, Vector4(1, 1, 1, 1), Vector(0, -1, 0));
camera->attachComponent<Component::PointLight>(Vector4(0, 0, 0, 0), Vector4(1, 1, 1, 2));
//light = new DirectionalLightActor(scene, Vector4(0.0, 0.0, 0.2, 1), Vector(0, -1, 0));
graph->addSystem(new FlyCamSystem(scene));
}