MeshLib Documentation
Loading...
Searching...
No Matches
MRFloatGrid.h
Go to the documentation of this file.
1#pragma once
2#include "MRVoxelsFwd.h"
3
4// this is a lightweight header unlike MRVDBFloatGrid.h
5
7
8namespace MR
9{
10
18[[nodiscard]] MRVOXELS_API size_t heapBytes( const FloatGrid& grid );
19
21MRVOXELS_API FloatGrid resampled( const FloatGrid& grid, float voxelScale, ProgressCallback cb = {} );
22
24MRVOXELS_API FloatGrid resampled( const FloatGrid& grid, const Vector3f& voxelScale, ProgressCallback cb = {} );
25
27MRVOXELS_API FloatGrid cropped( const FloatGrid& grid, const Box3i& box, ProgressCallback cb = {} );
28
30[[nodiscard]] MRVOXELS_API float getValue( const FloatGrid & grid, const Vector3i & p );
31
34MRVOXELS_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}
#define MRVOXELS_API
Definition MRVoxelsFwd.h:13
size_t heapBytes(const std::vector< T > &vec)
returns the amount of memory given vector occupies on heap
Definition MRHeapBytes.h:15
MRVOXELS_API FloatGrid resampled(const FloatGrid &grid, float voxelScale, ProgressCallback cb={})
resample this grid to fit voxelScale
MRVOXELS_API float getValue(const FloatGrid &grid, const Vector3i &p)
returns the value at given voxel
std::function< bool(float)> ProgressCallback
Definition MRMesh/MRMeshFwd.h:576
MRVOXELS_API void setLevelSetType(FloatGrid &grid)
sets type of this grid as LEVEL SET (for normal flipping)
MRVOXELS_API FloatGrid cropped(const FloatGrid &grid, const Box3i &box, ProgressCallback cb={})
returns cropped grid
MRVOXELS_API void setValue(FloatGrid &grid, const VoxelBitSet &region, float value)
Definition MRCameraOrientationPlugin.h:8
MRMESH_API TransformedMesh & operator+=(TransformedMesh &a, const TransformedMesh &b)
union operation on two meshes
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxelsFwd.h:25
MRMESH_API TransformedMesh & operator-=(TransformedMesh &a, const TransformedMesh &b)
difference operation on two meshes
MRMESH_API TransformedMesh & operator*=(TransformedMesh &a, const TransformedMesh &b)
intersection operation on two meshes