MeshLib
 
Loading...
Searching...
No Matches
MRFloatGrid.h
Go to the documentation of this file.
1#pragma once
2#include "MRMeshFwd.h"
3#ifndef MRMESH_NO_OPENVDB
4// this is a lightweight header unlike MRVDBFloatGrid.h
5
7
8namespace MR
9{
10
18[[nodiscard]] MRMESH_API size_t heapBytes( const FloatGrid& grid );
19
21MRMESH_API FloatGrid resampled( const FloatGrid& grid, float voxelScale, ProgressCallback cb = {} );
22
24MRMESH_API FloatGrid resampled( const FloatGrid& grid, const Vector3f& voxelScale, ProgressCallback cb = {} );
25
27MRMESH_API FloatGrid cropped( const FloatGrid& grid, const Box3i& box, ProgressCallback cb = {} );
28
30[[nodiscard]] MRMESH_API float getValue( const FloatGrid & grid, const Vector3i & p );
31
34MRMESH_API void setValue( FloatGrid & grid, const VoxelBitSet& region, float value );
35
38
39// union operation on volumetric representation of two meshes
41
42// difference operation on volumetric representation of two meshes
44
45// intersection operation on volumetric representation of two meshes
47
49
50}
51#endif
#define MRMESH_API
Definition MRMeshFwd.h:39
MRMESH_API void setValue(FloatGrid &grid, const VoxelBitSet &region, float value)
MRMESH_API FloatGrid operator+=(FloatGrid &a, const FloatGrid &b)
MRMESH_API float getValue(const FloatGrid &grid, const Vector3i &p)
returns the value at given voxel
std::function< bool(float)> ProgressCallback
Definition MRMeshFwd.h:517
MRMESH_API FloatGrid resampled(const FloatGrid &grid, float voxelScale, ProgressCallback cb={})
resample this grid to fit voxelScale
MRMESH_API FloatGrid operator-=(FloatGrid &a, const FloatGrid &b)
MRMESH_API FloatGrid operator*=(FloatGrid &a, const FloatGrid &b)
MRMESH_API FloatGrid cropped(const FloatGrid &grid, const Box3i &box, ProgressCallback cb={})
returns cropped grid
MRMESH_API size_t heapBytes(const FloatGrid &grid)
returns the amount of heap memory occupied by grid
MRMESH_API void setLevelSetType(FloatGrid &grid)
sets type of this grid as LEVEL SET (for normal flipping)
Definition MRCameraOrientationPlugin.h:7
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRMeshFwd.h:477
Box given by its min- and max- corners.
Definition MRMeshFwd.h:259