MeshLib
 
Loading...
Searching...
No Matches
MROpenVDB.h
Go to the documentation of this file.
1#pragma once
2
3#include <MRPch/MRTBB.h>
4
5#ifndef M_PI
6#define M_PI 3.1415926535897932384626433832795
7#endif
8
9#ifndef M_PI_2
10#define M_PI_2 1.5707963267948966192313216916398
11#endif
12
13#pragma warning(push)
14
15#pragma warning(disable:4005) // 'M_PI': macro redefinition
16#pragma warning(disable:4127)
17#pragma warning(disable:4146)
18#pragma warning(disable:4180) // qualifier applied to function type has no meaning; ignored
19#pragma warning(disable:4242) // '=': conversion from 'int' to 'char', possible loss of data
20#pragma warning(disable:4244)
21#pragma warning(disable:4251)
22#pragma warning(disable:4275)
23#pragma warning(disable:4355) //'this': used in base member initializer list
24#pragma warning(disable:4459) //declaration of 'compare' hides global declaration
25#pragma warning(disable:4464) //relative include path contains '..'
26#pragma warning(disable:4701) //potentially uninitialized local variable 'inv' used
27#pragma warning(disable:4702) //unreachable code
28#pragma warning(disable:4800) // Implicit conversion from '_Ty' to bool.
29#pragma warning(disable:4868) //compiler may not enforce left-to-right evaluation order in braced initializer list
30
31#pragma warning(disable:6297) //Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value. Results might not be an expected value.
32#pragma warning(disable:26451) //Arithmetic overflow: Using operator '-' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '-' to avoid overflow (io.2).
33#pragma warning(disable:26495) //Variable 'openvdb::v7_1::math::Tuple<4,int>::mm' is uninitialized. Always initialize a member variable (type.6).
34#pragma warning(disable:26812) //The enum type 'openvdb::v7_1::GridClass' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
35#pragma warning(disable:26815) //The pointer is dangling because it points at a temporary instance which was destroyed.
36
37// unknown pragmas
38#pragma warning(disable:4068)
39#if defined(__GNUC__)
40#pragma GCC diagnostic push
41#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
42#if __GNUC__ == 12 || __GNUC__ == 13
43#pragma GCC diagnostic ignored "-Wmissing-template-keyword"
44#endif
45#endif
46
47#ifdef __EMSCRIPTEN__
48#pragma clang diagnostic push
49#pragma clang diagnostic ignored "-Wabsolute-value"
50#endif
51
52#define IMATH_HALF_NO_LOOKUP_TABLE // fix for unresolved external symbol "imath_half_to_float_table"
53#include <openvdb/openvdb.h>
54#include <openvdb/io/Stream.h>
55#include <openvdb/tools/Composite.h>
56#include <openvdb/tools/GridTransformer.h>
57#include <openvdb/tools/MeshToVolume.h>
58#include <openvdb/tools/VolumeToMesh.h>
59#include <openvdb/tools/Dense.h>
60
61#ifdef __EMSCRIPTEN__
62#pragma clang diagnostic pop
63#endif
64
65#if defined(__GNUC__)
66#pragma GCC diagnostic pop
67#endif
68#pragma warning(pop)
69
70#ifdef _WIN32
71//clean up after windows.h
72#undef small
73#undef APIENTRY
74#undef M_PI
75#undef M_PI_2
76#endif