summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-12-08 11:58:37 -0300
committerGitHub <noreply@github.com>2017-12-08 11:58:37 -0300
commit372b79b0d324b1eeb5991eb510726420c7cbb12d (patch)
tree533b0acfc41971f8d46bdd7139a379a0f2ba39d5 /modules
parent8c78ccb027635702a2d69ebb7ad6a6ddfaf5ffa1 (diff)
parentbf05309af734431c3b3cf869a63ed477439a6739 (diff)
Merge pull request #14409 from hpvb/import-thekla-atlas
Import thekla_atlas
Diffstat (limited to 'modules')
-rw-r--r--modules/thekla_unwrap/SCsub68
-rw-r--r--modules/thekla_unwrap/config.py7
-rw-r--r--modules/thekla_unwrap/register_types.cpp34
-rw-r--r--modules/thekla_unwrap/register_types.h31
4 files changed, 140 insertions, 0 deletions
diff --git a/modules/thekla_unwrap/SCsub b/modules/thekla_unwrap/SCsub
new file mode 100644
index 0000000000..c0dd376e8c
--- /dev/null
+++ b/modules/thekla_unwrap/SCsub
@@ -0,0 +1,68 @@
+#!/usr/bin/env python
+
+Import('env')
+Import('env_modules')
+
+env_thekla_unwrap = env_modules.Clone()
+
+# Thirdparty source files
+if env['builtin_thekla_atlas']:
+ thirdparty_dir = "#thirdparty/thekla_atlas/"
+ thirdparty_sources = [
+ "nvcore/Memory.cpp",
+ "nvcore/Debug.cpp",
+ "nvcore/StrLib.cpp",
+ "nvcore/FileSystem.cpp",
+ "nvcore/RadixSort.cpp",
+ "nvmath/Basis.cpp",
+ "nvmath/ConvexHull.cpp",
+ "nvmath/Fitting.cpp",
+ "nvmath/Plane.cpp",
+ "nvmath/ProximityGrid.cpp",
+ "nvmath/Random.cpp",
+ "nvmath/Solver.cpp",
+ "nvmath/Sparse.cpp",
+ "nvmath/TypeSerialization.cpp",
+ "poshlib/posh.c",
+ "nvimage/BitMap.cpp",
+ "nvimage/Image.cpp",
+ "nvmesh/BaseMesh.cpp",
+ "nvmesh/MeshBuilder.cpp",
+ "nvmesh/TriMesh.cpp",
+ "nvmesh/QuadTriMesh.cpp",
+ "nvmesh/MeshTopology.cpp",
+ "nvmesh/halfedge/Edge.cpp",
+ "nvmesh/halfedge/Mesh.cpp",
+ "nvmesh/halfedge/Face.cpp",
+ "nvmesh/halfedge/Vertex.cpp",
+ "nvmesh/geometry/Bounds.cpp",
+ "nvmesh/geometry/Measurements.cpp",
+ "nvmesh/raster/Raster.cpp",
+ "nvmesh/param/Atlas.cpp",
+ "nvmesh/param/AtlasBuilder.cpp",
+ "nvmesh/param/AtlasPacker.cpp",
+ "nvmesh/param/LeastSquaresConformalMap.cpp",
+ "nvmesh/param/OrthogonalProjectionMap.cpp",
+ "nvmesh/param/ParameterizationQuality.cpp",
+ "nvmesh/param/SingleFaceMap.cpp",
+ "nvmesh/param/Util.cpp",
+ "nvmesh/weld/VertexWeld.cpp",
+ "nvmesh/weld/Snap.cpp"
+ ]
+ thirdparty_sources = [thirdparty_dir + file for file in thirdparty_sources]
+
+ env_thekla_unwrap.add_source_files(env.modules_sources, thirdparty_sources)
+ env_thekla_unwrap.Append(CPPPATH=[thirdparty_dir, thirdparty_dir + "/poshlib", thirdparty_dir + "/nvcore", thirdparty_dir + "/nvmesh"])
+
+ # upstream uses c++11
+ env_thekla_unwrap.Append(CCFLAGS="-std=gnu++11")
+
+ if env["platform"] == 'x11':
+ env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_LINUX"])
+ elif env["platform"] == 'osx':
+ env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_DARWIN"])
+ elif env["platform"] == 'windows':
+ env_thekla_unwrap.Append(CCFLAGS=["-DNV_OS_WIN32"])
+
+# Godot source files
+env_thekla_unwrap.add_source_files(env.modules_sources, "*.cpp")
diff --git a/modules/thekla_unwrap/config.py b/modules/thekla_unwrap/config.py
new file mode 100644
index 0000000000..7c5ecd1581
--- /dev/null
+++ b/modules/thekla_unwrap/config.py
@@ -0,0 +1,7 @@
+def can_build(platform):
+ return platform != "android" and platform != "ios"
+
+def configure(env):
+ if not env['tools']:
+ env['module_thekla_unwrap_enabled'] = False
+ env.disabled_modules.append("thekla_unwrap")
diff --git a/modules/thekla_unwrap/register_types.cpp b/modules/thekla_unwrap/register_types.cpp
new file mode 100644
index 0000000000..8a9f8341e8
--- /dev/null
+++ b/modules/thekla_unwrap/register_types.cpp
@@ -0,0 +1,34 @@
+/*************************************************************************/
+/* register_types.cpp */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+#include "register_types.h"
+
+void register_thekla_unwrap_types() {}
+
+void unregister_thekla_unwrap_types() {}
diff --git a/modules/thekla_unwrap/register_types.h b/modules/thekla_unwrap/register_types.h
new file mode 100644
index 0000000000..2bc3d16c64
--- /dev/null
+++ b/modules/thekla_unwrap/register_types.h
@@ -0,0 +1,31 @@
+/*************************************************************************/
+/* register_types.h */
+/*************************************************************************/
+/* This file is part of: */
+/* GODOT ENGINE */
+/* https://godotengine.org */
+/*************************************************************************/
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* */
+/* Permission is hereby granted, free of charge, to any person obtaining */
+/* a copy of this software and associated documentation files (the */
+/* "Software"), to deal in the Software without restriction, including */
+/* without limitation the rights to use, copy, modify, merge, publish, */
+/* distribute, sublicense, and/or sell copies of the Software, and to */
+/* permit persons to whom the Software is furnished to do so, subject to */
+/* the following conditions: */
+/* */
+/* The above copyright notice and this permission notice shall be */
+/* included in all copies or substantial portions of the Software. */
+/* */
+/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
+/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
+/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.*/
+/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
+/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
+/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
+/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
+/*************************************************************************/
+void register_thekla_unwrap_types();
+void unregister_thekla_unwrap_types();