Skip to content

Commit

Permalink
Add csg boolean operators using elalish/manifold.
Browse files Browse the repository at this point in the history
Co-Authored-By: 31 <[email protected]>
Co-Authored-By: Claudio Z <[email protected]>
  • Loading branch information
3 people committed Sep 9, 2024
1 parent d0dc389 commit 2b86e39
Show file tree
Hide file tree
Showing 483 changed files with 84,196 additions and 165 deletions.
48 changes: 47 additions & 1 deletion modules/csg/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,53 @@ Import("env_modules")

env_csg = env_modules.Clone()

# Godot source files
# Thirdparty source files

thirdparty_obj = []

thirdparty_dir = "#thirdparty/manifold/"
thirdparty_sources = [
"src/polygon/src/polygon.cpp",
"src/manifold/src/constructors.cpp",
"src/manifold/src/edge_op.cpp",
"src/manifold/src/face_op.cpp",
"src/manifold/src/impl.cpp",
"src/manifold/src/boolean_result.cpp",
"src/manifold/src/boolean3.cpp",
"src/manifold/src/manifold.cpp",
"src/manifold/src/properties.cpp",
"src/manifold/src/smoothing.cpp",
"src/manifold/src/sort.cpp",
"src/manifold/src/csg_tree.cpp",
"src/manifold/src/subdivision.cpp",
"src/collider/src/collider.cpp",
]

env_csg.Append(CPPDEFINES=["THRUST_DEVICE_SYSTEM=THRUST_DEVICE_SYSTEM_CPP"])
env_csg.Append(LINKFLAGS=["-fno-exceptions"])
env_csg.Append(LINKFLAGS=["-fno-duplicated-branches"])

thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
env_csg.Prepend(
CPPPATH=[
"#thirdparty/thrust",
"#thirdparty/glm",
"#thirdparty/quickhull",
thirdparty_dir + "src/polygon/include",
thirdparty_dir + "src/manifold/include",
thirdparty_dir + "src/utilities/include",
thirdparty_dir + "src/collider/include",
thirdparty_dir + "src/third_party",
thirdparty_dir + "src/third_party/quickhull",
]
)
env_thirdparty = env_csg.Clone()
env_thirdparty.disable_warnings()
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_sources)
env_thirdparty.add_source_files(thirdparty_obj, "#thirdparty/quickhull/QuickHull.cpp")
env.modules_sources += thirdparty_obj

# Godot's own source files
env_csg.add_source_files(env.modules_sources, "*.cpp")
if env.editor_build:
env_csg.add_source_files(env.modules_sources, "editor/*.cpp")
Loading

0 comments on commit 2b86e39

Please sign in to comment.