1 // Copyright Contributors to the OpenVDB Project
2 // SPDX-License-Identifier: MPL-2.0
3 
4 #ifndef OPENVDB_OPENVDB_HAS_BEEN_INCLUDED
5 #define OPENVDB_OPENVDB_HAS_BEEN_INCLUDED
6 
7 #include "Platform.h"
8 #include "Types.h"
9 #include "Metadata.h"
10 #include "math/Maps.h"
11 #include "math/Transform.h"
12 #include "Grid.h"
13 #include "tree/Tree.h"
14 #include "io/File.h"
15 
16 
17 namespace openvdb {
18 OPENVDB_USE_VERSION_NAMESPACE
19 namespace OPENVDB_VERSION_NAME {
20 
21 /// Common tree types
22 using BoolTree     = tree::Tree4<bool,        5, 4, 3>::Type;
23 using DoubleTree   = tree::Tree4<double,      5, 4, 3>::Type;
24 using FloatTree    = tree::Tree4<float,       5, 4, 3>::Type;
25 using Int32Tree    = tree::Tree4<int32_t,     5, 4, 3>::Type;
26 using Int64Tree    = tree::Tree4<int64_t,     5, 4, 3>::Type;
27 using MaskTree     = tree::Tree4<ValueMask,   5, 4, 3>::Type;
28 using UInt32Tree   = tree::Tree4<uint32_t,    5, 4, 3>::Type;
29 using Vec2DTree    = tree::Tree4<Vec2d,       5, 4, 3>::Type;
30 using Vec2ITree    = tree::Tree4<Vec2i,       5, 4, 3>::Type;
31 using Vec2STree    = tree::Tree4<Vec2s,       5, 4, 3>::Type;
32 using Vec3DTree    = tree::Tree4<Vec3d,       5, 4, 3>::Type;
33 using Vec3ITree    = tree::Tree4<Vec3i,       5, 4, 3>::Type;
34 using Vec3STree    = tree::Tree4<Vec3f,       5, 4, 3>::Type;
35 using ScalarTree   = FloatTree;
36 using TopologyTree = MaskTree;
37 using Vec3dTree    = Vec3DTree;
38 using Vec3fTree    = Vec3STree;
39 using VectorTree   = Vec3fTree;
40 
41 /// Common grid types
42 using BoolGrid     = Grid<BoolTree>;
43 using DoubleGrid   = Grid<DoubleTree>;
44 using FloatGrid    = Grid<FloatTree>;
45 using Int32Grid    = Grid<Int32Tree>;
46 using Int64Grid    = Grid<Int64Tree>;
47 using MaskGrid     = Grid<MaskTree>;
48 using Vec3DGrid    = Grid<Vec3DTree>;
49 using Vec3IGrid    = Grid<Vec3ITree>;
50 using Vec3SGrid    = Grid<Vec3STree>;
51 using ScalarGrid   = FloatGrid;
52 using TopologyGrid = MaskGrid;
53 using Vec3dGrid    = Vec3DGrid;
54 using Vec3fGrid    = Vec3SGrid;
55 using VectorGrid   = Vec3fGrid;
56 
57 /// Global registration of basic types
58 OPENVDB_API void initialize();
59 
60 /// Global deregistration of basic types
61 OPENVDB_API void uninitialize();
62 
63 
64 // Deprecated types
65 /// @note  Customizing the type of a VDB tree to an arbitrary class is still
66 ///  supported however std::string Trees will, in the future, no longer be
67 ///  provided as a native type by OpenVDB.
68 using StringTree OPENVDB_DEPRECATED_MESSAGE("Support for std::string Trees "
69     "as a native type will be dropped in future versions. Please feedback with any concerns.")
70     = tree::Tree4<std::string, 5, 4, 3>::Type;
71 using StringGrid OPENVDB_DEPRECATED_MESSAGE("Support for std::string Grids "
72     "as a native type will be dropped in future versions. Please feedback with any concerns.")
73     = Grid<tree::Tree4<std::string, 5, 4, 3>::Type>;
74 
75 } // namespace OPENVDB_VERSION_NAME
76 } // namespace openvdb
77 
78 #endif // OPENVDB_OPENVDB_HAS_BEEN_INCLUDED
79