MeshLib
 
Loading...
Searching...
No Matches
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
33template <typename T>
34using VoxelValueGetter = std::function<T ( const Vector3i& )>;
35
36MR_CANONICAL_TYPEDEFS( (template <typename T> struct), VoxelsVolume,
37 ( FunctionVolume, VoxelsVolume<VoxelValueGetter<float>> )
38 ( FunctionVolumeU8, VoxelsVolume<VoxelValueGetter<uint8_t>> )
39 ( SimpleVolume, VoxelsVolume<std::vector<float>> )
40 ( SimpleVolumeU16, VoxelsVolume<std::vector<uint16_t>> )
41)
42
43} // namespace MR
#define MR_CANONICAL_TYPEDEFS(type_, name_, aliases_)
Definition MRCanonicalTypedefs.h:23
Definition MRCameraOrientationPlugin.h:8
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxelsFwd.h:25
Definition MRVoxelsVolume.h:52
represents a box in 3D space subdivided on voxels stored in T
Definition MRVoxelsVolume.h:38