-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implemented some base support for large worlds (#45)
- Loading branch information
Showing
72 changed files
with
1,373 additions
and
180 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 7368991460119830626 | ||
assetHandle: 6283149130508796929 | ||
filePath: Engine/Meshes/Primitives/SM_Capsule.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 18411356710391823355 | ||
assetHandle: 10117410387453422377 | ||
filePath: Engine/Meshes/Primitives/SM_Capsule.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 5244042238809914408 | ||
assetHandle: 4608470111307946929 | ||
filePath: Engine/Meshes/Primitives/SM_Cone.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 10242065537839545921 | ||
assetHandle: 6968151257201624914 | ||
filePath: Engine/Meshes/Primitives/SM_Cone.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 6184134929358402430 | ||
assetHandle: 16422502198230809186 | ||
filePath: Engine/Meshes/Primitives/SM_Cube.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 10149696181569838305 | ||
assetHandle: 7235711071482003307 | ||
filePath: Engine/Meshes/Primitives/SM_Cube.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 9963684909373996543 | ||
assetHandle: 6095984363745051238 | ||
filePath: Engine/Meshes/Primitives/SM_Cylinder.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 2900881217054044389 | ||
assetHandle: 9258625515238793615 | ||
filePath: Engine/Meshes/Primitives/SM_Cylinder.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 13661243206498577773 | ||
assetHandle: 15731543908010069181 | ||
filePath: Engine/Meshes/Primitives/SM_Plane.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 3087037750680072373 | ||
assetHandle: 7102265901469832403 | ||
filePath: Engine/Meshes/Primitives/SM_Plane.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 16599656187294192819 | ||
assetHandle: 11824673864998436943 | ||
filePath: Engine/Meshes/Primitives/SM_Sphere.fbx | ||
type: 2 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,8 @@ | ||
Metadata: | ||
assetHandle: 12441354821563457429 | ||
assetHandle: 11830290587447924398 | ||
filePath: Engine/Meshes/Primitives/SM_Sphere.vtmesh | ||
type: 1 | ||
Dependencies: | ||
[] | ||
[] | ||
Properties: | ||
{} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
58 changes: 58 additions & 0 deletions
58
Volt/Sandbox/src/Sandbox/Modals/ConvertToWorldEngineModal.cpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
#include "sbpch.h" | ||
#include "ConvertToWorldEngineModal.h" | ||
|
||
#include <Volt/Asset/AssetManager.h> | ||
#include <Volt/Scene/Scene.h> | ||
|
||
#include <Volt/Utility/FileSystem.h> | ||
|
||
#include <imgui.h> | ||
|
||
ConvertToWorldEngineModal::ConvertToWorldEngineModal(const std::string& stringId) | ||
: Modal(stringId) | ||
{ | ||
} | ||
|
||
ConvertToWorldEngineModal::~ConvertToWorldEngineModal() | ||
{ | ||
} | ||
|
||
void ConvertToWorldEngineModal::DrawModalContent() | ||
{ | ||
ImGui::Text("Are you sure you want to convert to WorldEngine?"); | ||
|
||
ImGui::SameLine(); | ||
|
||
if (ImGui::Button("Convert")) | ||
{ | ||
m_scene->GetSceneSettingsMutable().useWorldEngine = true; | ||
|
||
const auto& metadata = Volt::AssetManager::GetMetadataFromHandle(m_scene->handle); | ||
if (metadata.IsValid()) | ||
{ | ||
const std::filesystem::path directoryPath = Volt::AssetManager::GetFilesystemPath(metadata.filePath); | ||
const std::filesystem::path layersPath = directoryPath / "Layers"; | ||
|
||
if (std::filesystem::exists(directoryPath) && std::filesystem::exists(layersPath)) | ||
{ | ||
FileSystem::MoveToRecycleBin(layersPath); | ||
} | ||
} | ||
|
||
Volt::AssetManager::SaveAsset(m_scene.GetSharedPtr()); | ||
Close(); | ||
} | ||
|
||
ImGui::SameLine(); | ||
|
||
if (ImGui::Button("Cancel")) | ||
{ | ||
m_scene->GetSceneSettingsMutable().useWorldEngine = false; | ||
Close(); | ||
} | ||
} | ||
|
||
void ConvertToWorldEngineModal::OnClose() | ||
{ | ||
m_scene.Reset(); | ||
} |
Oops, something went wrong.