Terrain refactor (#549)
- terrain separated into core logic and gui - terrain can be serialized - ddgi extents also saved, added control for smooth backface test - raytraced shadow fixes
This commit is contained in:
@@ -40,6 +40,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
|
||||
cameraComponentWnd.Create(editor);
|
||||
expressionWnd.Create(editor);
|
||||
armatureWnd.Create(editor);
|
||||
terrainWnd.Create(editor);
|
||||
|
||||
|
||||
newComponentCombo.Create("Add: ");
|
||||
@@ -310,6 +311,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
|
||||
AddWidget(&cameraComponentWnd);
|
||||
AddWidget(&expressionWnd);
|
||||
AddWidget(&armatureWnd);
|
||||
AddWidget(&terrainWnd);
|
||||
|
||||
materialWnd.SetVisible(false);
|
||||
weatherWnd.SetVisible(false);
|
||||
@@ -336,6 +338,7 @@ void ComponentsWindow::Create(EditorComponent* _editor)
|
||||
cameraComponentWnd.SetVisible(false);
|
||||
expressionWnd.SetVisible(false);
|
||||
armatureWnd.SetVisible(false);
|
||||
terrainWnd.SetVisible(false);
|
||||
|
||||
SetSize(editor->optionsWnd.GetSize());
|
||||
}
|
||||
@@ -703,4 +706,17 @@ void ComponentsWindow::ResizeLayout()
|
||||
{
|
||||
armatureWnd.SetVisible(false);
|
||||
}
|
||||
|
||||
if (scene.terrains.Contains(terrainWnd.entity))
|
||||
{
|
||||
terrainWnd.SetVisible(true);
|
||||
terrainWnd.SetPos(pos);
|
||||
terrainWnd.SetSize(XMFLOAT2(width, terrainWnd.GetScale().y));
|
||||
pos.y += terrainWnd.GetSize().y;
|
||||
pos.y += padding;
|
||||
}
|
||||
else
|
||||
{
|
||||
terrainWnd.SetVisible(false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user