diff options
Diffstat (limited to 'extern/carve/patches/files')
-rw-r--r-- | extern/carve/patches/files/config.h | 30 | ||||
-rw-r--r-- | extern/carve/patches/files/random.h | 61 |
2 files changed, 0 insertions, 91 deletions
diff --git a/extern/carve/patches/files/config.h b/extern/carve/patches/files/config.h deleted file mode 100644 index 3533c1a6710..00000000000 --- a/extern/carve/patches/files/config.h +++ /dev/null @@ -1,30 +0,0 @@ -#define CARVE_VERSION "2.0.0a" - -#undef CARVE_DEBUG -#undef CARVE_DEBUG_WRITE_PLY_DATA - -#if defined(__GNUC__) -# if !defined(HAVE_BOOST_UNORDERED_COLLECTIONS) -# define HAVE_TR1_UNORDERED_COLLECTIONS -# endif - -# define HAVE_STDINT_H -#endif - -// Support for latest Clang/LLVM on FreeBSD which does have different libcxx. -// -// TODO(sergey): Move it some some more generic header with platform-specific -// declarations. - -// Indicates whether __is_heap is available -#undef HAVE_IS_HEAP - -#ifdef __GNUC__ -// NeyBSD doesn't have __is_heap -# ifndef __NetBSD__ -# define HAVE_IS_HEAP -# ifdef _LIBCPP_VERSION -# define __is_heap is_heap -# endif // _LIBCPP_VERSION -# endif // !__NetBSD__ -#endif // __GNUC__ diff --git a/extern/carve/patches/files/random.h b/extern/carve/patches/files/random.h deleted file mode 100644 index 634063cb90c..00000000000 --- a/extern/carve/patches/files/random.h +++ /dev/null @@ -1,61 +0,0 @@ -#include <cassert> -#include <cmath> -#include <vector> - -namespace boost { -#if __cplusplus > 199711L -# include <random> -typedef std::mt19937 mt19937; -#else -# include <stdlib.h> -struct mt19937 { - int operator()() { - return rand(); - } - - int max() { - return RAND_MAX; - } -}; -#endif - -template<typename T> -struct uniform_on_sphere { - typedef std::vector<T> result_type; - - uniform_on_sphere(int dimension) { - assert(dimension == 3); - } - - std::vector<T> - operator()(float u1, float u2) { - T z = 1.0 - 2.0*u1; - T r = std::sqrt(std::max(0.0, 1.0 - z*z)); - T phi = 2.0*M_PI*u2; - T x = r*std::cos(phi); - T y = r*std::sin(phi); - std::vector<T> result; - result.push_back(x); - result.push_back(y); - result.push_back(z); - return result; - } -}; - -template<typename RNG, typename DISTR> -struct variate_generator { - - variate_generator(RNG rng, DISTR distr) - : rng_(rng), distr_(distr) {} - - typename DISTR::result_type - operator()() { - float rng_max_inv = 1.0 / rng_.max(); - return distr_(rng_() * rng_max_inv, rng_() * rng_max_inv); - } - - RNG rng_; - DISTR distr_; -}; - -} |