system updates; gltf importer updates; editor updates

This commit is contained in:
turanszkij
2018-10-03 18:48:21 +01:00
parent 575b2210b0
commit 9f98c9ff9d
13 changed files with 164 additions and 73 deletions
+29 -1
View File
@@ -16,7 +16,7 @@ MeshWindow::MeshWindow(wiGUI* gui) : GUI(gui)
meshWindow = new wiWindow(GUI, "Mesh Window");
meshWindow->SetSize(XMFLOAT2(800, 640));
meshWindow->SetSize(XMFLOAT2(800, 700));
meshWindow->SetEnabled(false);
GUI->AddWidget(meshWindow);
@@ -193,6 +193,34 @@ MeshWindow::MeshWindow(wiGUI* gui) : GUI(gui)
});
meshWindow->AddWidget(computeNormalsHardButton);
recenterButton = new wiButton("Recenter");
recenterButton->SetTooltip("Recenter mesh to AABB center.");
recenterButton->SetSize(XMFLOAT2(240, 30));
recenterButton->SetPos(XMFLOAT2(x - 50, y += step));
recenterButton->OnClick([&](wiEventArgs args) {
MeshComponent* mesh = wiRenderer::GetScene().meshes.GetComponent(entity);
if (mesh != nullptr)
{
mesh->Recenter();
SetEntity(entity);
}
});
meshWindow->AddWidget(recenterButton);
recenterToBottomButton = new wiButton("RecenterToBottom");
recenterToBottomButton->SetTooltip("Recenter mesh to AABB bottom.");
recenterToBottomButton->SetSize(XMFLOAT2(240, 30));
recenterToBottomButton->SetPos(XMFLOAT2(x - 50, y += step));
recenterToBottomButton->OnClick([&](wiEventArgs args) {
MeshComponent* mesh = wiRenderer::GetScene().meshes.GetComponent(entity);
if (mesh != nullptr)
{
mesh->RecenterToBottom();
SetEntity(entity);
}
});
meshWindow->AddWidget(recenterToBottomButton);