Feature/flying fixes (#924)

* Removing various warnings
 * Fix the rendering of the touchbar on Mac
 * More warnings
 * Add ghoul deinitialize
 * Update SGCT repository
This commit is contained in:
Alexander Bock
2019-07-04 09:28:42 +02:00
committed by GitHub
parent 6c98adec31
commit e9fdd31c56
20 changed files with 110 additions and 168 deletions
@@ -45,11 +45,10 @@
#include <locale>
namespace {
constexpr const char* KeyLabels = "Labels";
constexpr const char* KeyLabelsFileName = "FileName";
constexpr const char* _loggerCat = "GlobeLabels";
constexpr const char* KeyLabelsFileName = "FileName";
constexpr const double LabelFadeRangeConst = 1500.0;
constexpr const double RangeAngularCoefConst = 0.8;
constexpr const float MinTransparencyValueConst = 0.009f;
@@ -671,19 +670,10 @@ void GlobeLabelsComponent::renderLabels(const RenderData& data,
float distToCamera,
float fadeInVariable
) {
constexpr double DIST_EPS = 6000.0;
constexpr double SIN_EPS = 0.001;
glm::vec4 textColor = _labelsColor;
textColor.a *= fadeInVariable;
glm::dmat4 invMP = glm::inverse(_globe->modelTransform());
glm::dmat4 invCombinedView = glm::inverse(data.camera.combinedViewMatrix());
glm::dvec4 cameraPosWorld = invCombinedView * glm::dvec4(0.0, 0.0, 0.0, 1.0);
glm::dvec3 cameraPosObj = glm::dvec3(invMP * cameraPosWorld);
glm::dvec4 cameraUpVecWorld = glm::dvec4(data.camera.lookUpVectorWorldSpace(), 0.0);
glm::dvec3 cameraLookUpObj = glm::dvec3(invMP * cameraUpVecWorld);
glm::dmat4 VP = glm::dmat4(data.camera.sgctInternal.projectionMatrix()) *
data.camera.combinedViewMatrix();
@@ -799,7 +789,7 @@ bool GlobeLabelsComponent::isLabelInFrustum(const glm::dmat4& MVMatrix,
double bottomDistance = MVMatrix[3][3] + MVMatrix[3][1];
double topDistance = MVMatrix[3][3] - MVMatrix[3][1];
double nearDistance = MVMatrix[3][3] + MVMatrix[3][2];
double farDistance = MVMatrix[3][3] - MVMatrix[3][2];
// double farDistance = MVMatrix[3][3] - MVMatrix[3][2];
// Normalize Planes
const double invMagLeft = 1.0 / glm::length(leftNormal);
@@ -824,7 +814,7 @@ bool GlobeLabelsComponent::isLabelInFrustum(const glm::dmat4& MVMatrix,
const double invMagFar = 1.0 / glm::length(farNormal);
farNormal *= invMagFar;
farDistance *= invMagFar;
// farDistance *= invMagFar;
constexpr const float Radius = 1.0;
@@ -173,8 +173,10 @@ void GlobeTranslation::fillAttachedNode() {
"GlobeTranslation",
"Could not set attached node as it does not have a RenderableGlobe"
);
// Reset the globe name to it's previous name
_globe = _attachedNode->identifier();
if (_attachedNode) {
// Reset the globe name to it's previous name
_globe = _attachedNode->identifier();
}
}
}
+3 -1
View File
@@ -1123,7 +1123,9 @@ void update(TileProvider& tp) {
if (newCurrent) {
t.currentTileProvider = newCurrent;
}
update(*t.currentTileProvider);
if (t.currentTileProvider) {
update(*t.currentTileProvider);
}
}
break;
}