Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Removing QuickHull dependency #881

Merged
merged 27 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9d013b3
Removed QuickHull Dependency
Kushal-Shah-03 Jul 25, 2024
24b51a0
Replaced Vector3 with glm::vec3 and VertexDataSource (and formatting)
Kushal-Shah-03 Jul 31, 2024
0f5eb39
Revert nanobind
Kushal-Shah-03 Jul 31, 2024
219905c
Removing Templates (since using glm::vec3 so only need float)
Kushal-Shah-03 Jul 31, 2024
511c153
Formatting
Kushal-Shah-03 Jul 31, 2024
4c3389f
Converted glm::vec3 to glm::vec3d and float to double
Kushal-Shah-03 Aug 1, 2024
a5f74ca
Fixed Formatting and Removed third_party
Kushal-Shah-03 Aug 1, 2024
302f149
Made requested Changes (m_,comments,removing unnecessary code)
Kushal-Shah-03 Aug 1, 2024
1effcd7
Resolving Conflict
Kushal-Shah-03 Aug 1, 2024
ef02430
Merge branch 'master' into HullAlgorithm
Kushal-Shah-03 Aug 1, 2024
988a3e3
Fixed std::move warning (Shouldn't affect performance, ideally)
Kushal-Shah-03 Aug 1, 2024
74e6328
Merge remote-tracking branch 'origin/HullAlgorithm' into HullAlgorithm
Kushal-Shah-03 Aug 1, 2024
c1f67c7
Reverted third_party directory in bindings
Kushal-Shah-03 Aug 2, 2024
a46ca54
Reverting std::move
Kushal-Shah-03 Aug 2, 2024
3e75a32
Corrected std::move and added glm::dot to calculate distance squared
Kushal-Shah-03 Aug 2, 2024
d818f24
Reverted m_epsilon due to epsilon and m_epsilon
Kushal-Shah-03 Aug 2, 2024
7cda272
Fixed some Names
Kushal-Shah-03 Aug 2, 2024
c32dc4e
Formatting
Kushal-Shah-03 Aug 2, 2024
00dd951
Removed all unecessary m_
Kushal-Shah-03 Aug 2, 2024
ca8484f
Fixed manifold.yaml
Kushal-Shah-03 Aug 2, 2024
9c74ffe
Added headers and pragma once
Kushal-Shah-03 Aug 3, 2024
5180b15
Modified License
Kushal-Shah-03 Aug 5, 2024
08ec868
Formatting
Kushal-Shah-03 Aug 5, 2024
9b3d4b0
Merge branch 'elalish:master' into HullAlgorithm
Kushal-Shah-03 Aug 7, 2024
81f31f0
Activated the two failing tests and added the fix for the algorithm
Kushal-Shah-03 Aug 7, 2024
462c917
Modified gitmodules to remove third_party
Kushal-Shah-03 Aug 7, 2024
95f9721
Removed nanobind
Kushal-Shah-03 Aug 7, 2024
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 .github/workflows/manifold.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
cd ../
lcov --capture --gcov-tool gcov-${{ matrix.gcc }} --ignore-errors mismatch --directory . --output-file ./code_coverage_test.info
lcov --add-tracefile ./code_coverage_init.info --add-tracefile ./code_coverage_test.info --output-file ./code_coverage_total.info
lcov --remove ./code_coverage_total.info '/usr/*' '*/third_party/*' '*/test/*' '*/extras/*' '*/bindings/*' --output-file ./code_coverage.info
lcov --remove ./code_coverage_total.info '/usr/*' '*/test/*' '*/extras/*' '*/bindings/*' --output-file ./code_coverage.info
cd ../
- uses: codecov/codecov-action@v4
if: matrix.parallel_backend == 'NONE'
Expand Down
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "src/third_party/quickhull"]
path = src/third_party/quickhull
url = https://github.com/akuukka/quickhull
2 changes: 0 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

# do not add third_party installations
add_subdirectory(third_party EXCLUDE_FROM_ALL)
add_subdirectory(utilities)
add_subdirectory(collider)
add_subdirectory(cross_section)
Expand Down
2 changes: 1 addition & 1 deletion src/manifold/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
target_link_libraries(${PROJECT_NAME}
PUBLIC utilities
PRIVATE $<BUILD_INTERFACE:collider> polygon ${MANIFOLD_INCLUDE} quickhull
PRIVATE $<BUILD_INTERFACE:collider> polygon ${MANIFOLD_INCLUDE}
)

target_compile_options(${PROJECT_NAME} PRIVATE ${MANIFOLD_FLAGS})
Expand Down
6 changes: 3 additions & 3 deletions src/manifold/src/manifold.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
#include <map>
#include <numeric>

#include "QuickHull.hpp"
#include "boolean3.h"
#include "csg_tree.h"
#include "impl.h"
#include "par.h"
#include "quickhull.h"

namespace {
using namespace manifold;
Expand Down Expand Up @@ -919,12 +919,12 @@ Manifold Manifold::Hull(const std::vector<glm::vec3>& pts) {
const int numVert = pts.size();
if (numVert < 4) return Manifold();

std::vector<quickhull::Vector3<double>> vertices(numVert);
std::vector<glm::dvec3> vertices(numVert);
for (int i = 0; i < numVert; i++) {
vertices[i] = {pts[i].x, pts[i].y, pts[i].z};
}

quickhull::QuickHull<double> qh;
QuickHull qh;
// bools: correct triangle winding, and use original indices
auto hull = qh.getConvexHull(vertices, false, true);
const auto& triangles = hull.getIndexBuffer();
Expand Down
Loading
Loading