Skip to content

Commit c97acb4

Browse files
authored
Merge pull request #2016 from sideeffects/sendupstream_nanovdbtranspose
Transpose on NanoToOpenVDB allowing round tripping
2 parents 4b38fba + 75133a8 commit c97acb4

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

nanovdb/nanovdb/tools/NanoToOpenVDB.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ NanoToOpenVDB<NanoBuildT>::operator()(const NanoGrid<NanoBuildT>& grid, int /*ve
160160
const nanovdb::Map& nanoMap = reinterpret_cast<const GridData*>(srcGrid)->mMap;
161161
auto mat = openvdb::math::Mat4<double>::identity();
162162
mat.setMat3(openvdb::math::Mat3<double>(nanoMap.mMatD));
163-
mat.transpose(); // the 3x3 in nanovdb is transposed relative to openvdb's 3x3
163+
mat = mat.transpose(); // the 3x3 in nanovdb is transposed relative to openvdb's 3x3
164164
mat.setTranslation(openvdb::math::Vec3<double>(nanoMap.mVecD));
165165
dstGrid->setTransform(openvdb::math::Transform::createLinearTransform(mat)); // calls simplify!
166166

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
NanoVDB:
2+
Bug fix:
3+
Map is now properly transposed when converting NanoVDB to OpenVDB.

0 commit comments

Comments
 (0)