diff options
Diffstat (limited to 'modules/thekla_unwrap')
-rw-r--r-- | modules/thekla_unwrap/SCsub | 68 | ||||
-rw-r--r-- | modules/thekla_unwrap/config.py | 7 | ||||
-rw-r--r-- | modules/thekla_unwrap/register_types.cpp | 34 | ||||
-rw-r--r-- | modules/thekla_unwrap/register_types.h | 31 |
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(); |