mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-01-05 19:19:39 -06:00
fixup
This commit is contained in:
@@ -76,7 +76,7 @@ public:
|
||||
|
||||
void setVolumeTexture(std::shared_ptr<ghoul::opengl::Texture> texture);
|
||||
std::shared_ptr<ghoul::opengl::Texture> volumeTexture() const;
|
||||
void setTransferFunction(std::shared_ptr<TransferFunction> transferFunction);
|
||||
void setTransferFunction(std::shared_ptr<openspace::TransferFunction> transferFunction);
|
||||
|
||||
void setStepSize(float stepSize);
|
||||
float opacity() const;
|
||||
@@ -94,7 +94,7 @@ private:
|
||||
|
||||
std::shared_ptr<VolumeClipPlanes> _clipPlanes;
|
||||
std::shared_ptr<ghoul::opengl::Texture> _volumeTexture;
|
||||
std::shared_ptr<TransferFunction> _transferFunction;
|
||||
std::shared_ptr<openspace::TransferFunction> _transferFunction;
|
||||
BoxGeometry _boundingBox;
|
||||
VolumeGridType _gridType;
|
||||
glm::mat4 _modelTransform = glm::mat4(1.f);
|
||||
|
||||
@@ -219,30 +219,32 @@ namespace openspace::volume {
|
||||
});
|
||||
_gridType = static_cast<int>(volume::VolumeGridType::Cartesian);
|
||||
|
||||
if (dictionary.hasKeyAndValue<float>(KeyStepSize)) {
|
||||
_stepSize = dictionary.value<float>(KeyStepSize);
|
||||
if (dictionary.hasValue<double>(KeyStepSize)) {
|
||||
_stepSize = static_cast<float>(dictionary.value<double>(KeyStepSize));
|
||||
}
|
||||
|
||||
if (dictionary.hasValue<float>(KeyOpacity)) {
|
||||
_opacity = dictionary.value<float>(KeyOpacity) * VolumeMaxOpacity;
|
||||
if (dictionary.hasValue<double>(KeyOpacity)) {
|
||||
_opacity = static_cast<float>(dictionary.value<double>(KeyOpacity) * VolumeMaxOpacity);
|
||||
}
|
||||
|
||||
if (dictionary.hasKeyAndValue<float>(KeySecondsBefore)) {
|
||||
_secondsBefore = dictionary.value<float>(KeySecondsBefore);
|
||||
if (dictionary.hasValue<double>(KeySecondsBefore)) {
|
||||
_secondsBefore = static_cast<float>(dictionary.value<double>(KeySecondsBefore));
|
||||
}
|
||||
_secondsAfter = dictionary.value<float>(KeySecondsAfter);
|
||||
_secondsAfter = static_cast<float>(dictionary.value<double>(KeySecondsAfter));
|
||||
|
||||
if (dictionary.hasKey(KeyInvertDataAtZ)) {
|
||||
if (dictionary.hasKey(static_cast<std::string>(KeyInvertDataAtZ))) {
|
||||
_invertDataAtZ = dictionary.value<bool>(KeyInvertDataAtZ);
|
||||
}
|
||||
|
||||
ghoul::Dictionary clipPlanesDictionary;
|
||||
dictionary.getValue(KeyClipPlanes, clipPlanesDictionary);
|
||||
if (dictionary.hasValue<ghoul::Dictionary>(KeyClipPlanes)) {
|
||||
clipPlanesDictionary = dictionary.value<ghoul::Dictionary>(KeyClipPlanes);
|
||||
}
|
||||
_clipPlanes = std::make_shared<volume::VolumeClipPlanes>(clipPlanesDictionary);
|
||||
_clipPlanes->setIdentifier("clipPlanes");
|
||||
_clipPlanes->setGuiName("Clip Planes");
|
||||
|
||||
if (dictionary.hasKeyAndValue<std::string>(KeyGridType)) {
|
||||
if (dictionary.hasValue<std::string>(KeyGridType)) {
|
||||
VolumeGridType gridType = volume::parseGridType(
|
||||
dictionary.value<std::string>(KeyGridType)
|
||||
);
|
||||
@@ -363,9 +365,9 @@ namespace openspace::volume {
|
||||
_transferFunctionPath.onChange([this] {
|
||||
_transferFunction = std::make_shared<openspace::TransferFunction>(
|
||||
_transferFunctionPath
|
||||
);
|
||||
);
|
||||
_raycaster->setTransferFunction(_transferFunction);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
void RenderableTimeVaryingVolume::loadTimestepMetadata(const std::string& path) {
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <openspace/properties/scalar/intproperty.h>
|
||||
#include <openspace/properties/triggerproperty.h>
|
||||
// #include <modules/volume/rawvolume.h>
|
||||
#include <modules/volume/rawvolumemetadata.h>
|
||||
// #include <modules/volume/rawvolumemetadata.h>
|
||||
// #include <modules/volume/rendering/basicvolumeraycaster.h>
|
||||
// #include <modules/volume/rendering/volumeclipplanes.h>
|
||||
|
||||
@@ -43,16 +43,16 @@
|
||||
// #include <openspace/properties/stringproperty.h>
|
||||
// #include <openspace/util/boxgeometry.h>
|
||||
// #include <openspace/util/histogram.h>
|
||||
// #include <openspace/rendering/transferfunction.h>
|
||||
#include <openspace/rendering/transferfunction.h>
|
||||
|
||||
namespace openspace {
|
||||
class Histogram;
|
||||
struct RenderData;
|
||||
class TransferFunction;
|
||||
} // namespace openspace
|
||||
|
||||
namespace openspace::volume {
|
||||
|
||||
//class TransferFunction;
|
||||
class BasicVolumeRaycaster;
|
||||
template <typename T> class RawVolume;
|
||||
class VolumeClipPlanes;
|
||||
|
||||
Reference in New Issue
Block a user