MeshLib C++ Docs
Loading...
Searching...
No Matches
MRVoxels/MRVoxelsFwd.h
Go to the documentation of this file.
1#pragma once
2
3#include "config.h"
4
5#ifdef _WIN32
6# ifdef MRVOXELS_EXPORT
7# define MRVOXELS_API __declspec(dllexport)
8# else
9# define MRVOXELS_API __declspec(dllimport)
10# endif
11# define MRVOXELS_CLASS
12#else
13# define MRVOXELS_API __attribute__((visibility("default")))
14# define MRVOXELS_CLASS __attribute__((visibility("default")))
15#endif
16
17#include <MRMesh/MRMeshFwd.h>
18
19namespace MR
20{
21
22class ObjectVoxels;
23
24struct OpenVdbFloatGrid;
25using FloatGrid = std::shared_ptr<OpenVdbFloatGrid>;
26
27MR_CANONICAL_TYPEDEFS( ( template <typename T> struct ), VoxelsVolumeMinMax,
28 ( SimpleVolumeMinMax, VoxelsVolumeMinMax<std::vector<float>> )
29 ( SimpleVolumeMinMaxU16, VoxelsVolumeMinMax<std::vector<uint16_t>> )
31)
32
33using VdbVolumes = std::vector<VdbVolume>;
34
35template <typename T>
36using VoxelValueGetter = std::function<T ( const Vector3i& )>;
37
38MR_CANONICAL_TYPEDEFS( (template <typename T> struct), VoxelsVolume,
39 ( FunctionVolume, VoxelsVolume<VoxelValueGetter<float>> )
40 ( FunctionVolumeU8, VoxelsVolume<VoxelValueGetter<uint8_t>> )
41 ( SimpleVolume, VoxelsVolume<std::vector<float>> )
42 ( SimpleVolumeU16, VoxelsVolume<std::vector<uint16_t>> )
43)
44
45} // namespace MR
#define MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
Definition MRCanonicalTypedefs.h:23
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxels/MRVoxelsFwd.h:25
std::function< T(const Vector3i &)> VoxelValueGetter
Definition MRVoxels/MRVoxelsFwd.h:36
Definition MRVoxelsVolume.h:53
represents a box in 3D space subdivided on voxels stored in T
Definition MRVoxelsVolume.h:39