[Bf-blender-cvs] [513fbbf7490] soc-2020-soft-body: rm sdf

over0219 noreply at git.blender.org
Wed Jul 15 05:09:07 CEST 2020


Commit: 513fbbf749003796ca5cc1f9ab357abf4cdf2368
Author: over0219
Date:   Tue Jul 14 22:08:59 2020 -0500
Branches: soc-2020-soft-body
https://developer.blender.org/rB513fbbf749003796ca5cc1f9ab357abf4cdf2368

rm sdf

===================================================================

M	extern/softbody/CMakeLists.txt
M	extern/softbody/src/admmpd_bvh_traverse.cpp
M	extern/softbody/src/admmpd_sdf.cpp
M	extern/softbody/src/admmpd_sdf.h
D	extern/softbody/src/sdfgen/CMakeLists.txt
D	extern/softbody/src/sdfgen/README.md
D	extern/softbody/src/sdfgen/array1.h
D	extern/softbody/src/sdfgen/array2.h
D	extern/softbody/src/sdfgen/array3.h
D	extern/softbody/src/sdfgen/config.h.in
D	extern/softbody/src/sdfgen/hashgrid.h
D	extern/softbody/src/sdfgen/hashtable.h
D	extern/softbody/src/sdfgen/main.cpp
D	extern/softbody/src/sdfgen/makelevelset3.cpp
D	extern/softbody/src/sdfgen/makelevelset3.h
D	extern/softbody/src/sdfgen/util.h
D	extern/softbody/src/sdfgen/vec.h

===================================================================

diff --git a/extern/softbody/CMakeLists.txt b/extern/softbody/CMakeLists.txt
index 84b2de7fea7..78e4525322b 100644
--- a/extern/softbody/CMakeLists.txt
+++ b/extern/softbody/CMakeLists.txt
@@ -29,15 +29,15 @@ set(INC_SYS
 )
 
 set(SDFGEN_SRC
-	src/sdfgen/array1.h
-	src/sdfgen/array2.h
-	src/sdfgen/array3.h
-	src/sdfgen/hashgrid.h
-	src/sdfgen/hashtable.h
-	src/sdfgen/makelevelset3.cpp
-	src/sdfgen/makelevelset3.h
-	src/sdfgen/util.h
-	src/sdfgen/vec.h
+#	src/sdfgen/array1.h
+#	src/sdfgen/array2.h
+#	src/sdfgen/array3.h
+#	src/sdfgen/hashgrid.h
+#	src/sdfgen/hashtable.h
+#	src/sdfgen/makelevelset3.cpp
+#	src/sdfgen/makelevelset3.h
+#	src/sdfgen/util.h
+#	src/sdfgen/vec.h
 )
 
 set(SRC
diff --git a/extern/softbody/src/admmpd_bvh_traverse.cpp b/extern/softbody/src/admmpd_bvh_traverse.cpp
index 8fd4b1118f6..9ec4c281368 100644
--- a/extern/softbody/src/admmpd_bvh_traverse.cpp
+++ b/extern/softbody/src/admmpd_bvh_traverse.cpp
@@ -140,7 +140,6 @@ PointInTriangleMeshTraverse<T>::PointInTriangleMeshTraverse(
 	prim_inds(prim_inds_)
 {
 	//dir = VecType::Random();
-
 	BLI_assert(prim_verts->rows()>=0);
 	BLI_assert(prim_inds->rows()>=0);
 	BLI_assert(prim_inds->cols()==3);
diff --git a/extern/softbody/src/admmpd_sdf.cpp b/extern/softbody/src/admmpd_sdf.cpp
index 16bcc545903..f40615cdab6 100644
--- a/extern/softbody/src/admmpd_sdf.cpp
+++ b/extern/softbody/src/admmpd_sdf.cpp
@@ -1,6 +1,8 @@
 // Copyright Matt Overby 2020.
 // Distributed under the MIT License.
 
+#if 0
+
 #include "admmpd_sdf.h"
 #include "admmpd_geom.h"
 #include <vector>
@@ -344,4 +346,6 @@ void SDF<T>::get_cells(
 template class admmpd::SDF<double>;
 template class admmpd::SDF<float>;
 
-} // namespace admmpd
\ No newline at end of file
+} // namespace admmpd
+
+#endif
\ No newline at end of file
diff --git a/extern/softbody/src/admmpd_sdf.h b/extern/softbody/src/admmpd_sdf.h
index fce7689da88..898dbe3218c 100644
--- a/extern/softbody/src/admmpd_sdf.h
+++ b/extern/softbody/src/admmpd_sdf.h
@@ -1,6 +1,8 @@
 // Copyright Matt Overby 2020.
 // Distributed under the MIT License.
 
+#if 0
+
 #ifndef ADMMPD_SDF_H_
 #define ADMMPD_SDF_H_
 
@@ -84,3 +86,5 @@ public:
 } // namespace admmpd
 
 #endif // ADMMPD_SDF_H_
+
+#endif
\ No newline at end of file
diff --git a/extern/softbody/src/sdfgen/CMakeLists.txt b/extern/softbody/src/sdfgen/CMakeLists.txt
deleted file mode 100644
index 400c92beac7..00000000000
--- a/extern/softbody/src/sdfgen/CMakeLists.txt
+++ /dev/null
@@ -1,39 +0,0 @@
-cmake_minimum_required(VERSION 2.6)
-Project("SDFGen")
-
-# Set the build type.  Options are:
-#  Coverage       : w/ debug symbols, w/o optimization, w/ code-coverage
-#  Debug          : w/ debug symbols, w/o optimization
-#  Release        : w/o debug symbols, w/ optimization
-#  RelWithDebInfo : w/ debug symbols, w/ optimization
-#  MinSizeRel     : w/o debug symbols, w/ optimization, stripped binaries
-
-# SET(CMAKE_BUILD_TYPE Coverage)
-SET(CMAKE_BUILD_TYPE Release)
-
-#set the default path for built executables to the "bin" directory
-set(EXECUTABLE_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin)
-
-#These flags might not work on every system, especially the release flags, comment out as needed
-set(CMAKE_CXX_FLAGS "-O3")
-set(CMAKE_CXX_FLAGS_DEBUG "-O0 -g")
-set(CMAKE_CXX_FLAGS_RELEASE "-O3 -march=native")
-
-#checks if VTK is available
-find_package(VTK QUIET)
-if(VTK_FOUND)
-	set(HAVE_VTK 1)
-endif()
-
-#Generates config.h replacing expressions in config.h.in with actual values
-configure_file(
-  "${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
-  "${CMAKE_CURRENT_SOURCE_DIR}/config.h"
-)
-
-add_executable(${PROJECT_NAME} main.cpp  makelevelset3.cpp)
-
-if(VTK_FOUND)
-	include_directories(${VTK_INCLUDE_DIRS})
-	target_link_libraries(${PROJECT_NAME} ${VTK_LIBRARIES})
-endif()
\ No newline at end of file
diff --git a/extern/softbody/src/sdfgen/README.md b/extern/softbody/src/sdfgen/README.md
deleted file mode 100644
index ed85c981911..00000000000
--- a/extern/softbody/src/sdfgen/README.md
+++ /dev/null
@@ -1,25 +0,0 @@
-# SDFGen
-A simple commandline utility to generate grid-based signed distance field (level set) generator from triangle meshes, using code from Robert Bridson's website.
-
-
-The MIT License (MIT)
-
-Copyright (c) 2015, Christopher Batty
-
-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.
diff --git a/extern/softbody/src/sdfgen/array1.h b/extern/softbody/src/sdfgen/array1.h
deleted file mode 100644
index 08d39f2c284..00000000000
--- a/extern/softbody/src/sdfgen/array1.h
+++ /dev/null
@@ -1,798 +0,0 @@
-#ifndef ARRAY1_H
-#define ARRAY1_H
-
-#include <algorithm>
-#include <cstring>
-#include <cassert>
-#include <climits>
-#include <cstdlib>
-#include <iostream>
-#include <stdexcept>
-#include <vector>
-
-// In this file:
-//   Array1<T>: a dynamic 1D array for plain-old-data (not objects)
-//   WrapArray1<T>: a 1D array wrapper around an existing array (perhaps objects, perhaps data)
-// For the most part std::vector operations are supported, though for the Wrap version
-// note that memory is never allocated/deleted and constructor/destructors are never called
-// from within the class, thus only shallow copies can be made and some operations such as
-// resize() and push_back() are limited.
-// Note: for the most part assertions are done with assert(), not exceptions...
-
-namespace sdfgen {
-
-// gross template hacking to determine if a type is integral or not
-struct Array1True {};
-struct Array1False {};
-template<typename T> struct Array1IsIntegral{ typedef Array1False type; }; // default: no (specializations to yes follow)
-template<> struct Array1IsIntegral<bool>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<char>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<signed char>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<unsigned char>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<short>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<unsigned short>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<int>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<unsigned int>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<long>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<unsigned long>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<long long>{ typedef Array1True type; };
-template<> struct Array1IsIntegral<unsigned long long>{ typedef Array1True type; };
-
-//============================================================================
-template<typename T>
-struct Array1
-{
-   // STL-friendly typedefs
-
-   typedef T* iterator;
-   typedef const T* const_iterator;
-   typedef unsigned long size_type;
-   typedef long difference_type;
-   typedef T& reference;
-   typedef const T& const_reference;
-   typedef T value_type;
-   typedef T* pointer;
-   typedef const T* const_pointer;
-   typedef std::reverse_iterator<iterator> reverse_iterator;
-   typedef std::reverse_iterator<const_iterator> const_reverse_iterator;
-
-   // the actual representation
-
-   unsigned long n;
-   unsigned long max_n;
-   T* data;
-
-   // STL vector's interface, with additions, but only valid when used with plain-old-data
-
-   Array1(void)
-      : n(0), max_n(0), data(0)
-   {}
-
-   // note: default initial values are zero
-   Array1(unsigned long n_)
-      : n(0), max_n(0), data(0)
-   {
-      if(n_>ULONG_MAX/sizeof(T)) throw std::bad_alloc();
-      data=(T*)std::calloc(n_, sizeof(T));
-      if(!data) throw std::bad_alloc();
-      n=n_;
-      max_n=n_;
-   }
-
-   Array1(unsigned long n_, const T& value)
-      : n(0), max_n(0), data(0)
-   {
-      if(n_>ULONG_MAX/sizeof(T)) throw std::bad_alloc();
-      data=(T*)std::calloc(n_, sizeof(T));
-      if(!data) throw std::bad_alloc();
-      n=n_;
-      max_n=n_;
-      for(unsigned long i=0; i<n; ++i) data[i]=value;
-   }
-
-   Array1(unsigned long n_, const T& value, unsigned long max_n_)
-      : n(0), max_n(0), data(0)
-   {
-      assert(n_<=max_n_);
-      if(max_n_>ULONG_MAX/sizeof(T)) throw std::bad_alloc();
-      data=(T*)std::calloc(max_n_, sizeof(T));
-      if(!data) throw std::bad_alloc();
-      n=n_;
-      max_n=max_n_;
-      for(unsigned long i=0; i<n; ++i) data[i]=value;
-   }
-
-   Array1(unsigned long n_, const T* data_)
-      : n(0), max_n(0), data(0)
-   {
-      if(n_>ULONG_MAX/sizeof(T)) throw std::bad_alloc();
-      data=(T*)std::calloc(n_, sizeof(T));
-      if(!data) throw std::bad_alloc();
-      n=n_;
-      max_n=n_;
-      assert(data_);
-      std::memcpy(data, data_, n*sizeof(T));
-   }
-
-   Array1(unsigned long n_, const T* data_, unsigned long max_n_)
-      : n(0), max_n(0), data(0)
-   {
-      assert(n_<=max_n_);
-      if(max_n_>ULONG_MAX/sizeof(T)) throw std::bad_alloc();
-      data=(T*)std::calloc(max_n_, sizeof(T));
-      if(!data) throw std::bad_alloc();
-      max_n=max_n_;
-      n=n_;
-      assert(data_);
-      std::memcpy(data, data_, n*sizeof(T));
-   }
-
-   Array1(const Array1<T> &x)
-      : n(0), max_n(0), data(0)
-   {
-      data=(T*)std::malloc(x.n*sizeof(T));
-      if(!data) throw std::bad_alloc();
-      n=x.n;
-      max_n=x.n;
-      std::memcpy(data, x.

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list