8#include "MRPch/MRBindingMacros.h"
24 [[nodiscard]]
size_t heapBytes()
const {
return memUsage(); }
35 return std::make_shared<OpenVdbFloatGrid>( std::move( *p ) );
38MR_BIND_IGNORE
inline Vector3i
fromVdb(
const openvdb::Coord & v )
40 return Vector3i( v.x(), v.y(), v.z() );
43MR_BIND_IGNORE
inline openvdb::Coord
toVdb(
const Vector3i & v )
45 return openvdb::Coord( v.x, v.y, v.z );
48MR_BIND_IGNORE
inline openvdb::CoordBBox
toVdbBox(
const Box3i& box )
50 return openvdb::CoordBBox(
toVdb( box.min ),
toVdb( box.max ) );
53MR_BIND_IGNORE
inline openvdb::CoordBBox
toVdbBox(
const Vector3i& dims )
55 return openvdb::CoordBBox(
toVdb( Vector3i( 0, 0, 0 ) ),
56 toVdb( Vector3i( dims ) - Vector3i::diagonal(1) ) );
MR_BIND_IGNORE FloatGrid MakeFloatGrid(openvdb::FloatGrid::Ptr &&p)
makes MR::FloatGrid shared pointer taking the contents of the input pointer
Definition MRVDBFloatGrid.h:31
MR_BIND_IGNORE openvdb::FloatGrid & ovdb(OpenVdbFloatGrid &v)
Definition MRVDBFloatGrid.h:27
MR_BIND_IGNORE Vector3i fromVdb(const openvdb::Coord &v)
Definition MRVDBFloatGrid.h:38
MR_BIND_IGNORE openvdb::Coord toVdb(const Vector3i &v)
Definition MRVDBFloatGrid.h:43
MR_BIND_IGNORE openvdb::CoordBBox toVdbBox(const Box3i &box)
Definition MRVDBFloatGrid.h:48
std::shared_ptr< OpenVdbFloatGrid > FloatGrid
Definition MRVoxels/MRVoxelsFwd.h:25
this class just hides very complex type of typedef openvdb::FloatGrid
Definition MRVDBFloatGrid.h:21
OpenVdbFloatGrid() noexcept=default
size_t heapBytes() const
Definition MRVDBFloatGrid.h:24