diff --git a/CMakeLists.txt b/CMakeLists.txt index 67585e6..04c3cd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -68,7 +68,7 @@ if (WIN32) ${GLEW_DIR}/lib/Release/x64/glew32s.lib opengl32) else() - target_link_libraries(Mesh2Splat glfw glew GL) #todo + target_link_libraries(Mesh2Splat glfw GLEW GL stdc++fs) #todo endif() set_target_properties(Mesh2Splat PROPERTIES diff --git a/README.md b/README.md index b01a655..7c57ba6 100644 --- a/README.md +++ b/README.md @@ -110,6 +110,19 @@ To build **Mesh2Splat**, follow the following steps: > **Tip**: Use the release build if you only need the final executable in optimized (Release) mode. +## Build Instructions (Linux) + +The hardware and software requirements are similar as on Windows. + +To build **Mesh2Splat**, follow the following steps: + +1. Open a terminal in the project root directory. +2. Run one of the provided bash scripts: + - `run_build_debug.sh` + - `run_build_release.sh` +3. Open the `build` folder and run the executable + + ## Limitations - Volumetric Data such as foliage, grass, hair, clouds, etc. has not being targeted and will probably not be converted correctly if using primitives different from triangles.
diff --git a/run_build_debug.sh b/run_build_debug.sh new file mode 100755 index 0000000..bcd0b77 --- /dev/null +++ b/run_build_debug.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Remove directories if they exist +[ -d build ] && rm -rf build +[ -d bin ] && rm -rf bin + +# Create build directory and navigate into it +mkdir build +cd build + +# Run CMake configuration and build +cmake .. +cmake --build . --config Debug + +# Go back to the original directory +cd .. diff --git a/run_build_release.sh b/run_build_release.sh new file mode 100755 index 0000000..ca49f10 --- /dev/null +++ b/run_build_release.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Remove directories if they exist +[ -d build ] && rm -rf build +[ -d bin ] && rm -rf bin + +# Create build directory and navigate into it +mkdir build +cd build + +# Run CMake configuration and build +cmake .. +cmake --build . --config Release + +# Go back to the original directory +cd .. diff --git a/src/imGuiUi/ImGuiUI.cpp b/src/imGuiUi/ImGuiUI.cpp index 693dc95..33b3cc1 100644 --- a/src/imGuiUi/ImGuiUI.cpp +++ b/src/imGuiUi/ImGuiUI.cpp @@ -3,7 +3,7 @@ // Copyright (c) 2025 Electronic Arts Inc. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// -#include "ImGuiUI.hpp" +#include "ImGuiUi.hpp" ImGuiUI::ImGuiUI(float defaultGaussianStd, float defaultMesh2SPlatQuality) : resolutionIndex(0), @@ -118,7 +118,7 @@ void ImGuiUI::renderFileSelectorWindow() { if (ImGuiFileDialog::Instance()->IsOk()) { std::string chosenFolder = ImGuiFileDialog::Instance()->GetCurrentPath(); - destinationFilePathFolder = chosenFolder + "\\"; + destinationFilePathFolder = chosenFolder; } // Close the dialog diff --git a/src/renderer/guiRendererConcreteMediator.cpp b/src/renderer/guiRendererConcreteMediator.cpp index a52f504..a99ed6c 100644 --- a/src/renderer/guiRendererConcreteMediator.cpp +++ b/src/renderer/guiRendererConcreteMediator.cpp @@ -3,7 +3,7 @@ // Copyright (c) 2025 Electronic Arts Inc. All rights reserved. // /////////////////////////////////////////////////////////////////////////////// -#include "GuiRendererConcreteMediator.hpp" +#include "guiRendererConcreteMediator.hpp" void GuiRendererConcreteMediator::notify(EventType event) { diff --git a/src/renderer/guiRendererConcreteMediator.hpp b/src/renderer/guiRendererConcreteMediator.hpp index d0cdda5..c8f2c17 100644 --- a/src/renderer/guiRendererConcreteMediator.hpp +++ b/src/renderer/guiRendererConcreteMediator.hpp @@ -4,8 +4,8 @@ /////////////////////////////////////////////////////////////////////////////// #pragma once -#include "Mediator.hpp" -#include "Renderer.hpp" +#include "mediator.hpp" +#include "renderer.hpp" #include "imGuiUi/ImGuiUi.hpp" class GuiRendererConcreteMediator : public IMediator { diff --git a/src/renderer/renderer.hpp b/src/renderer/renderer.hpp index ace89bd..e47ef26 100644 --- a/src/renderer/renderer.hpp +++ b/src/renderer/renderer.hpp @@ -5,7 +5,7 @@ #pragma once #include "utils/utils.hpp" -#include "ioHandler.hpp" +#include "IoHandler.hpp" #include "imGuiUi/ImGuiUi.hpp" #include "parsers/parsers.hpp" #include "utils/glUtils.hpp" @@ -72,4 +72,4 @@ class Renderer { Camera& camera; -}; \ No newline at end of file +}; diff --git a/src/utils/glUtils.cpp b/src/utils/glUtils.cpp index a4ee1c5..75e02df 100644 --- a/src/utils/glUtils.cpp +++ b/src/utils/glUtils.cpp @@ -4,7 +4,7 @@ /////////////////////////////////////////////////////////////////////////////// #include "glUtils.hpp" -#include "utils/shaderRegistry.hpp" +#include "utils/ShaderRegistry.hpp" namespace glUtils { diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index f24ca11..07372d4 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -450,18 +450,7 @@ namespace utils C.x * (A.y - B.y) ); } - - std::string getExecutablePath() { - char buffer[MAX_PATH]; - GetModuleFileNameA(nullptr, buffer, MAX_PATH); - return std::string(buffer); - } - - std::string getExecutableDir() { - std::experimental::filesystem::path exePath(getExecutablePath()); - return exePath.parent_path().string(); - } - + //https://stackoverflow.com/questions/63899489/c-experimental-filesystem-has-no-relative-function fs::path relative(fs::path p, fs::path base) { @@ -484,4 +473,4 @@ namespace utils return ret; } -} \ No newline at end of file +} diff --git a/src/utils/utils.hpp b/src/utils/utils.hpp index 26b2104..7b615bd 100644 --- a/src/utils/utils.hpp +++ b/src/utils/utils.hpp @@ -6,7 +6,6 @@ #pragma once #define _CRTDBG_MAP_ALLOC #include -#include #include #include @@ -44,7 +43,7 @@ #ifndef NOMINMAX #define NOMINMAX #endif -#include +#include // for isnan static void CheckOpenGLError(const char* stmt, const char* fname, int line) @@ -272,9 +271,5 @@ namespace utils float triangleArea(const glm::vec3& A, const glm::vec3& B, const glm::vec3& C); - std::string getExecutablePath(); - - std::string getExecutableDir(); - fs::path relative(fs::path p, fs::path base); -} \ No newline at end of file +} diff --git a/thirdParty/imguizmo/ImGuizmo.cpp b/thirdParty/imguizmo/ImGuizmo.cpp index 52ac88f..f0eb18b 100644 --- a/thirdParty/imguizmo/ImGuizmo.cpp +++ b/thirdParty/imguizmo/ImGuizmo.cpp @@ -29,7 +29,7 @@ #endif #include "imgui.h" #include "imgui_internal.h" -#include "ImGuizmo.hpp" +#include "Imguizmo.hpp" #if defined(_MSC_VER) || defined(__MINGW32__) #include @@ -3141,4 +3141,4 @@ namespace IMGUIZMO_NAMESPACE // restore view/projection because it was used to compute ray ComputeContext(svgView.m16, svgProjection.m16, gContext.mModelSource.m16, gContext.mMode); } -}; \ No newline at end of file +};