mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-04 10:40:09 -06:00
Cleanup for coding style
Add strict mode to check_style_guide script
This commit is contained in:
@@ -24,8 +24,7 @@
|
||||
|
||||
#include "volumeutils.h"
|
||||
|
||||
namespace openspace {
|
||||
namespace volume {
|
||||
namespace openspace::volume {
|
||||
|
||||
size_t coordsToIndex(const glm::uvec3& coords, const glm::uvec3& dims) {
|
||||
size_t w = dims.x;
|
||||
@@ -35,20 +34,19 @@ size_t coordsToIndex(const glm::uvec3& coords, const glm::uvec3& dims) {
|
||||
// size_t x = coords.x;
|
||||
// size_t y = coords.y;
|
||||
// size_t z = coords.z;
|
||||
|
||||
|
||||
return coords.z * (h * w) + coords.y * w + coords.x;
|
||||
}
|
||||
|
||||
glm::uvec3 indexToCoords(size_t index, const glm::uvec3& dims) {
|
||||
size_t w = dims.x;
|
||||
size_t h = dims.y;
|
||||
|
||||
|
||||
size_t x = index % w;
|
||||
size_t y = (index / w) % h;
|
||||
size_t z = index / w / h;
|
||||
|
||||
|
||||
return glm::uvec3(x, y, z);
|
||||
}
|
||||
|
||||
} // namespace volume
|
||||
} // namespace openspace
|
||||
} // namespace openspace::volume
|
||||
|
||||
Reference in New Issue
Block a user