Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br>

Expand Down
16 changes: 16 additions & 0 deletions run_build_debug.sh
Original file line number Diff line number Diff line change
@@ -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 ..
16 changes: 16 additions & 0 deletions run_build_release.sh
Original file line number Diff line number Diff line change
@@ -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 ..
4 changes: 2 additions & 2 deletions src/imGuiUi/ImGuiUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -118,7 +118,7 @@ void ImGuiUI::renderFileSelectorWindow()
{
if (ImGuiFileDialog::Instance()->IsOk()) {
std::string chosenFolder = ImGuiFileDialog::Instance()->GetCurrentPath();
destinationFilePathFolder = chosenFolder + "\\";
destinationFilePathFolder = chosenFolder;
}

// Close the dialog
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/guiRendererConcreteMediator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// Copyright (c) 2025 Electronic Arts Inc. All rights reserved. //
///////////////////////////////////////////////////////////////////////////////

#include "GuiRendererConcreteMediator.hpp"
#include "guiRendererConcreteMediator.hpp"

void GuiRendererConcreteMediator::notify(EventType event)
{
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/guiRendererConcreteMediator.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -72,4 +72,4 @@ class Renderer {

Camera& camera;

};
};
2 changes: 1 addition & 1 deletion src/utils/glUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
///////////////////////////////////////////////////////////////////////////////

#include "glUtils.hpp"
#include "utils/shaderRegistry.hpp"
#include "utils/ShaderRegistry.hpp"

namespace glUtils
{
Expand Down
15 changes: 2 additions & 13 deletions src/utils/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -484,4 +473,4 @@ namespace utils

return ret;
}
}
}
9 changes: 2 additions & 7 deletions src/utils/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
#pragma once
#define _CRTDBG_MAP_ALLOC
#include <stdlib.h>
#include <crtdbg.h>

#include <string>
#include <vector>
Expand Down Expand Up @@ -44,7 +43,7 @@
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h>
#include <math.h> // for isnan


static void CheckOpenGLError(const char* stmt, const char* fname, int line)
Expand Down Expand Up @@ -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);
}
}
4 changes: 2 additions & 2 deletions thirdParty/imguizmo/ImGuizmo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 <malloc.h>
Expand Down Expand Up @@ -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);
}
};
};