Introduction of new Dictionary class (#1446)

* Adapting to introduction of new Dictionary class in Ghoul
 * Mainly replacing usage of float instead of doubles as expected
 * Adjust to the lack of the hasKeyAndValue function
This commit is contained in:
Alexander Bock
2021-01-02 15:07:11 +01:00
committed by GitHub
parent 7bf7a25401
commit 067c0f4b27
121 changed files with 2299 additions and 2160 deletions
@@ -1140,13 +1140,10 @@ using TableDeprecatedVerifier = DeprecatedVerifier<TableVerifier>;
// Definitions of external templates that are instantiated in the cpp file
// This cuts down the compilation times as almost all of the possible template types do
// not need to be instantiated multiple times
extern template struct Vector2Verifier<bool>;
extern template struct Vector2Verifier<int>;
extern template struct Vector2Verifier<double>;
extern template struct Vector3Verifier<bool>;
extern template struct Vector3Verifier<int>;
extern template struct Vector3Verifier<double>;
extern template struct Vector4Verifier<bool>;
extern template struct Vector4Verifier<int>;
extern template struct Vector4Verifier<double>;
@@ -1196,13 +1193,10 @@ extern template struct AnnotationVerifier<IntVerifier>;
extern template struct AnnotationVerifier<DoubleVerifier>;
extern template struct AnnotationVerifier<StringVerifier>;
extern template struct AnnotationVerifier<TableVerifier>;
extern template struct AnnotationVerifier<BoolVector2Verifier>;
extern template struct AnnotationVerifier<IntVector2Verifier>;
extern template struct AnnotationVerifier<DoubleVector2Verifier>;
extern template struct AnnotationVerifier<BoolVector3Verifier>;
extern template struct AnnotationVerifier<IntVector3Verifier>;
extern template struct AnnotationVerifier<DoubleVector3Verifier>;
extern template struct AnnotationVerifier<BoolVector4Verifier>;
extern template struct AnnotationVerifier<IntVector4Verifier>;
extern template struct AnnotationVerifier<DoubleVector4Verifier>;
@@ -1211,13 +1205,10 @@ extern template struct DeprecatedVerifier<IntVerifier>;
extern template struct DeprecatedVerifier<DoubleVerifier>;
extern template struct DeprecatedVerifier<StringVerifier>;
extern template struct DeprecatedVerifier<TableVerifier>;
extern template struct DeprecatedVerifier<BoolVector2Verifier>;
extern template struct DeprecatedVerifier<IntVector2Verifier>;
extern template struct DeprecatedVerifier<DoubleVector2Verifier>;
extern template struct DeprecatedVerifier<BoolVector3Verifier>;
extern template struct DeprecatedVerifier<IntVector3Verifier>;
extern template struct DeprecatedVerifier<DoubleVector3Verifier>;
extern template struct DeprecatedVerifier<BoolVector4Verifier>;
extern template struct DeprecatedVerifier<IntVector4Verifier>;
extern template struct DeprecatedVerifier<DoubleVector4Verifier>;
+1 -1
View File
@@ -33,7 +33,7 @@ template <typename T>
TestResult TemplateVerifier<T>::operator()(const ghoul::Dictionary& dict,
const std::string& key) const
{
if (dict.hasKeyAndValue<Type>(key)) {
if (dict.hasValue<Type>(key)) {
return { true, {}, {} };
}
else {
+1
View File
@@ -27,6 +27,7 @@
#include <ghoul/misc/dictionary.h>
#include <ghoul/misc/easing.h>
#include <any>
#include <functional>
#include <string>
+4 -3
View File
@@ -28,6 +28,7 @@
#include <openspace/properties/propertyowner.h>
#include <openspace/properties/scalar/boolproperty.h>
#include <openspace/properties/scalar/doubleproperty.h>
#include <openspace/properties/scalar/floatproperty.h>
#include <openspace/properties/stringproperty.h>
#include <ghoul/misc/managedmemoryuniqueptr.h>
@@ -74,8 +75,8 @@ public:
bool isEnabled() const;
bool shouldUpdateIfDisabled() const;
void setBoundingSphere(float boundingSphere);
float boundingSphere() const;
void setBoundingSphere(double boundingSphere);
double boundingSphere() const;
virtual void render(const RenderData& data, RendererTasks& rendererTask);
virtual void update(const UpdateData& data);
@@ -97,7 +98,7 @@ public:
protected:
properties::BoolProperty _enabled;
properties::FloatProperty _opacity;
properties::FloatProperty _boundingSphere;
properties::DoubleProperty _boundingSphere;
properties::StringProperty _renderableType;
bool _shouldUpdateIfDisabled = false;
+2 -2
View File
@@ -126,7 +126,7 @@ public:
SceneGraphNode* parent() const;
std::vector<SceneGraphNode*> children() const;
float boundingSphere() const;
double boundingSphere() const;
SceneGraphNode* childNode(const std::string& identifier);
@@ -177,7 +177,7 @@ private:
glm::dmat4 _modelTransformCached = glm::dmat4(1.0);
properties::FloatProperty _boundingSphere;
properties::DoubleProperty _boundingSphere;
properties::BoolProperty _computeScreenSpaceValues;
properties::IVec2Property _screenSpacePosition;
properties::BoolProperty _screenVisibility;