13 #include <openvdb/openvdb.h> 20 template <
class T_VDBGr
idType>
23 VDBWriter(
const std::shared_ptr<T_VDBGridType>& Grid_Ptr,
const std::string &FileName) {
24 std::string FileNameExt = FileName +
".vdb";
27 openvdb::io::File file(FileNameExt);
29 openvdb::GridPtrVec grids;
30 grids.push_back(Grid_Ptr);
34 std::cout <<
"Grid was saved successfully in VDB file: ----> " << FileNameExt << std::endl;
40 static std::shared_ptr<MF::RW::VDBWriter<T_VDBGridType>>
New(
const std::shared_ptr<T_VDBGridType>& Grid_Ptr,
const std::string &FileName) {
41 auto VDBWriter_Ptr = std::make_shared<MF::RW::VDBWriter<T_VDBGridType>>(Grid_Ptr, FileName);
VDBWriter(const std::shared_ptr< T_VDBGridType > &Grid_Ptr, const std::string &FileName)
static std::shared_ptr< MF::RW::VDBWriter< T_VDBGridType > > New(const std::shared_ptr< T_VDBGridType > &Grid_Ptr, const std::string &FileName)
The VDBWriter class provides a write interface for OpenVDB grid.