Position the camera better so that the scaled volume is actually visible

This commit is contained in:
Martin committed 2025-01-08 22:57:06 +01:00
1 parent d3b88aed30
commit c5b8b6cff0
4 files changed
+16 -16

No files matched your search

-13
View File
@@ -78,17 +78,4 @@ __host__ void generateVolume(float* volumeData, int volW, int volH, int volD) {
}
}
}
}
// Samples the voxel nearest to the given coordinates. TODO: Can be re-used in other places so move
__device__ float sampleVolumeNearest(float* volumeData, const int volW, const int volH, const int volD, int vx, int vy, int vz) {
if (vx < 0) vx = 0;
if (vy < 0) vy = 0;
if (vz < 0) vz = 0;
if (vx >= volW) vx = volW - 1;
if (vy >= volH) vy = volH - 1;
if (vz >= volD) vz = volD - 1;
int idx = vz * volW * volH + vy * volD + vx;
return volumeData[idx];
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.