mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-08 20:50:19 -06:00
fix compile errors for osx
This commit is contained in:
@@ -15,7 +15,7 @@ public:
|
||||
glm::ivec3 dimensions() const;
|
||||
void setDimensions(const glm::ivec3& dimensions);
|
||||
void write(const std::function<VoxelType(const glm::ivec3&)>& fn,
|
||||
const std::function<void(float t)>& onProgress = [&](float t) {});
|
||||
const std::function<void(float t)>& onProgress = [](float t) {});
|
||||
void write(const RawVolume<VoxelType>& volume);
|
||||
|
||||
size_t coordsToIndex(const glm::ivec3& coords) const;
|
||||
|
||||
@@ -63,7 +63,7 @@ void RawVolumeWriter<VoxelType>::write(const std::function<VoxelType(const glm::
|
||||
template <typename VoxelType>
|
||||
void RawVolumeWriter<VoxelType>::write(const RawVolume<VoxelType>& volume) {
|
||||
glm::ivec3 dims = dimensions();
|
||||
ghoul_assert(dims == volume.dims());
|
||||
ghoul_assert(dims == volume.dims(), "Dimensions of input and output volume must agree");
|
||||
|
||||
const char* buffer = reinterpret_cast<char*>(volume.data());
|
||||
size_t length = static_cast<size_t>(dims.x) *
|
||||
|
||||
@@ -18,7 +18,6 @@ public:
|
||||
VoxelType get(const glm::ivec3& coordinates) const;
|
||||
virtual glm::ivec3 dimensions() const;
|
||||
void setPaths(const std::vector<std::string> paths);
|
||||
void setCacheSize(size_t size);
|
||||
void initialize();
|
||||
private:
|
||||
ghoul::opengl::Texture& getSlice(int sliceIndex) const;
|
||||
|
||||
@@ -38,11 +38,6 @@ void TextureSliceVolumeReader<VoxelType>::setPaths(const std::vector<std::string
|
||||
_paths = paths;
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
void TextureSliceVolumeReader<VoxelType>::setCacheSize(size_t sliceCacheSize) {
|
||||
_cache.resize(sliceCacheSize);
|
||||
}
|
||||
|
||||
template <typename VoxelType>
|
||||
ghoul::opengl::Texture& TextureSliceVolumeReader<VoxelType>::getSlice(int sliceIndex) const {
|
||||
ghoul_assert(_initialized, "Volume is not initialized");
|
||||
|
||||
@@ -20,7 +20,7 @@ typename VolumeType::VoxelType VolumeSampler<VolumeType>::sample(const glm::vec3
|
||||
glm::ivec3 maxCoords = minCoords + _filterSize; // max coords to sample from, including interpolation.
|
||||
glm::ivec3 clampCeiling = _volume->dimensions() - glm::ivec3(1);
|
||||
|
||||
VolumeType::VoxelType value;
|
||||
typename VolumeType::VoxelType value;
|
||||
for (int z = minCoords.z; z <= maxCoords.z; z++) {
|
||||
for (int y = minCoords.y; y <= maxCoords.y; y++) {
|
||||
for (int x = minCoords.x; x <= maxCoords.x; x++) {
|
||||
|
||||
Reference in New Issue
Block a user