large refactor

This commit is contained in:
Turanszki Janos
2019-12-12 22:15:16 +00:00
parent c495ce0088
commit fa267b0e7d
115 changed files with 1348 additions and 1739 deletions
+6 -6
View File
@@ -2,7 +2,7 @@
#include "EnvProbeWindow.h"
using namespace wiECS;
using namespace wiSceneSystem;
using namespace wiScene;
EnvProbeWindow::EnvProbeWindow(wiGUI* gui) : GUI(gui)
{
@@ -21,7 +21,7 @@ EnvProbeWindow::EnvProbeWindow(wiGUI* gui) : GUI(gui)
realTimeCheckBox->SetPos(XMFLOAT2(x, y += step));
realTimeCheckBox->SetEnabled(false);
realTimeCheckBox->OnClick([&](wiEventArgs args) {
EnvironmentProbeComponent* probe = wiSceneSystem::GetScene().probes.GetComponent(entity);
EnvironmentProbeComponent* probe = wiScene::GetScene().probes.GetComponent(entity);
if (probe != nullptr)
{
probe->SetRealTime(args.bValue);
@@ -35,7 +35,7 @@ EnvProbeWindow::EnvProbeWindow(wiGUI* gui) : GUI(gui)
generateButton->OnClick([](wiEventArgs args) {
XMFLOAT3 pos;
XMStoreFloat3(&pos, XMVectorAdd(wiRenderer::GetCamera().GetEye(), wiRenderer::GetCamera().GetAt() * 4));
wiSceneSystem::GetScene().Entity_CreateEnvironmentProbe("editorProbe", pos);
wiScene::GetScene().Entity_CreateEnvironmentProbe("editorProbe", pos);
});
envProbeWindow->AddWidget(generateButton);
@@ -43,7 +43,7 @@ EnvProbeWindow::EnvProbeWindow(wiGUI* gui) : GUI(gui)
refreshButton->SetPos(XMFLOAT2(x, y += step));
refreshButton->SetEnabled(false);
refreshButton->OnClick([&](wiEventArgs args) {
EnvironmentProbeComponent* probe = wiSceneSystem::GetScene().probes.GetComponent(entity);
EnvironmentProbeComponent* probe = wiScene::GetScene().probes.GetComponent(entity);
if (probe != nullptr)
{
probe->SetDirty();
@@ -55,7 +55,7 @@ EnvProbeWindow::EnvProbeWindow(wiGUI* gui) : GUI(gui)
refreshAllButton->SetPos(XMFLOAT2(x, y += step));
refreshAllButton->SetEnabled(true);
refreshAllButton->OnClick([&](wiEventArgs args) {
Scene& scene = wiSceneSystem::GetScene();
Scene& scene = wiScene::GetScene();
for (size_t i = 0; i < scene.probes.GetCount(); ++i)
{
EnvironmentProbeComponent& probe = scene.probes[i];
@@ -85,7 +85,7 @@ void EnvProbeWindow::SetEntity(Entity entity)
{
this->entity = entity;
const EnvironmentProbeComponent* probe = wiSceneSystem::GetScene().probes.GetComponent(entity);
const EnvironmentProbeComponent* probe = wiScene::GetScene().probes.GetComponent(entity);
if (probe == nullptr)
{