mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-06 03:29:44 -06:00
more pr comments fixed
This commit is contained in:
@@ -83,9 +83,6 @@ std::unique_ptr<RawVolume<VoxelType>> RawVolumeReader<VoxelType>::read(bool inve
|
||||
std::unique_ptr<RawVolume<VoxelType>> volume = std::make_unique<RawVolume<VoxelType>>(
|
||||
dims
|
||||
);
|
||||
std::unique_ptr<RawVolume<VoxelType>> newVolume = std::make_unique<RawVolume<VoxelType>>(
|
||||
dims
|
||||
);
|
||||
|
||||
std::ifstream file(_path, std::ios::binary);
|
||||
char* buffer = reinterpret_cast<char*>(volume->data());
|
||||
@@ -106,6 +103,9 @@ std::unique_ptr<RawVolume<VoxelType>> RawVolumeReader<VoxelType>::read(bool inve
|
||||
}
|
||||
|
||||
if (invertZ) {
|
||||
std::unique_ptr<RawVolume<VoxelType>> newVolume =
|
||||
std::make_unique<RawVolume<VoxelType>>(dims);
|
||||
|
||||
for (int i = 0; i < volume->nCells(); ++i) {
|
||||
const glm::uvec3& coords = volume->indexToCoords(i);
|
||||
glm::uvec3 newcoords = glm::uvec3(coords.x, coords.y, dims.z - coords.z - 1);
|
||||
@@ -115,12 +115,11 @@ std::unique_ptr<RawVolume<VoxelType>> RawVolumeReader<VoxelType>::read(bool inve
|
||||
|
||||
newVolume->set(newcoords, volume->get(coords));
|
||||
}
|
||||
return newVolume;
|
||||
}
|
||||
else {
|
||||
return volume;
|
||||
}
|
||||
|
||||
return newVolume;
|
||||
}
|
||||
|
||||
} // namespace openspace::volume
|
||||
|
||||
@@ -164,7 +164,7 @@ RenderableTimeVaryingVolume::RenderableTimeVaryingVolume(
|
||||
: Renderable(dictionary)
|
||||
, _gridType(GridTypeInfo, properties::OptionProperty::DisplayType::Dropdown)
|
||||
, _stepSize(StepSizeInfo, 0.02f, 0.001f, 0.1f)
|
||||
, _opacity(OpacityInfo, 10.0f, 0.f, VolumeMaxOpacity)
|
||||
, _opacity(OpacityInfo, 10.f, 0.f, VolumeMaxOpacity)
|
||||
, _rNormalization(rNormalizationInfo, 0.f, 0.f, 2.f)
|
||||
, _rUpperBound(rUpperBoundInfo, 1.f, 0.f, 2.f)
|
||||
, _secondsBefore(SecondsBeforeInfo, 0.f, 0.01f, SecondsInOneDay)
|
||||
|
||||
Reference in New Issue
Block a user