MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / putSimpleVolumeInDenseGrid

Function putSimpleVolumeInDenseGrid

source/MRVoxels/MRVDBConversions.cpp:267–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265
266template <>
267void putSimpleVolumeInDenseGrid(
268 openvdb::FloatGrid& grid,
269 const Vector3i& minCoord, const SimpleVolume& simpleVolume, ProgressCallback cb
270 )
271{
272 MR_TIMER;
273 if ( cb )
274 cb( 0.0f );
275 openvdb::math::Coord dimsCoord( simpleVolume.dims.x, simpleVolume.dims.y, simpleVolume.dims.z );
276 openvdb::math::CoordBBox denseBBox( toVdb( minCoord ), toVdb( minCoord ) + dimsCoord.offsetBy( -1 ) );
277 openvdb::tools::Dense<float, openvdb::tools::LayoutXYZ> dense( denseBBox, const_cast< float* >( simpleVolume.data.data() ) );
278 if ( cb )
279 cb( 0.5f );
280 openvdb::tools::copyFromDense( dense, grid, denseVolumeToGridTolerance );
281 if ( cb )
282 cb( 1.f );
283}
284
285template <>
286void putSimpleVolumeInDenseGrid(

Callers 3

loadSingleFileFunction · 0.85
loadTiffDirFunction · 0.85
simpleVolumeToDenseGridFunction · 0.85

Calls 3

toVdbFunction · 0.85
putVolumeInDenseGridFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected