Commit 7d0e82bd authored by Marc R.'s avatar Marc R.

skew-t actor code cleanup: renamed variables/methods to improve readability; no functional changes

parent bf9de023
This diff is collapsed.
......@@ -146,8 +146,8 @@ private:
*/
struct VertexRange
{
int start = 0;
int size = 0;
int startIndex = 0;
int indexCount = 0;
};
/**
......@@ -161,7 +161,7 @@ private:
VertexRange dryAdiabates;
VertexRange moistAdiabates;
VertexRange outline;
VertexRange pressure;
VertexRange isobars;
};
struct VARIABLES
......@@ -251,7 +251,7 @@ private:
QVector2D clipPos;
struct Area area;
float layer;
struct Amplitude pressure;
struct Amplitude vertical_p_hPa;
struct Amplitude temperature;
struct Size offscreenTextureSize;
GLint maxTextureSize;
......@@ -301,7 +301,7 @@ private:
ModeSpecificDiagramConfiguration() {}
void init(DiagramConfiguration *dconfig, QString bufferNameSuffix);
float skew(float x, float y) const;
float temperaturePosition() const;
float temperatureReferenceZCoord() const;
/**
Returns @p z in pressure (hPa) coordinates depending on the actual
configuration of the diagram @p dconfig.
......@@ -326,14 +326,14 @@ private:
bool pressureEqualsWorldPressure = false;
struct Area area;
struct Area drawingRegionClipSpace;
QVector2D clipPos;
float layer;
DiagramConfiguration *dconfig;
bool regenerateAdiabates = true;
VertexRanges vertexRanges;
bool recomputeAdiabateGeometries = true;
VertexRanges vertexArrayDrawRanges;
QVector<QVector2D> dryAdiabatesVertices;
QVector<QVector2D> moistAdiabatesVertices;
QString bufferNameSuffix;
......@@ -404,7 +404,7 @@ private:
void updateVariableEnums(MNWPActorVariable *deletedVar = nullptr);
void drawDragPoint(MSceneViewGLWidget *sceneView);
void drawDiagramHandle(MSceneViewGLWidget *sceneView);
void setShaderGeneralVars(MSceneViewGLWidget *sceneView,
ModeSpecificDiagramConfiguration *config);
void drawProbabilityTube(MNWPSkewTActorVariable *max,
......@@ -415,7 +415,7 @@ private:
bool isHumidity, QColor deviationColor);
void setDiagramConfiguration();
void drawDiagramLabels(MSceneViewGLWidget*sceneView,
void drawDiagramGeometryAndLabels(MSceneViewGLWidget*sceneView,
GL::MVertexBuffer *vbDiagramVertices,
ModeSpecificDiagramConfiguration *config);
......@@ -433,9 +433,9 @@ private:
void drawDiagramFullScreen(MSceneViewGLWidget* sceneView);
void drawDiagramLabels3DView(MSceneViewGLWidget* sceneView);
void drawDiagramGeometryAndLabels3DView(MSceneViewGLWidget* sceneView);
void drawDiagramLabelsFullScreen(MSceneViewGLWidget* sceneView);
void drawDiagramGeometryAndLabelsFullScreen(MSceneViewGLWidget* sceneView);
// If the user picks the handle not in its centre, we cannot move the handle
// by setting the centre point to the mouse position so we need this offset
......
......@@ -171,6 +171,7 @@ float calculateDewpoint(float humidity, float pressure)
}
//TODO (mr 09Jan2019) -- adapt to user-definable isotherm spacing.
float projection2D(float scalar, float y)
{
// (temperature + temperature legend center) / (abs(min) + abs(max)) *
......@@ -351,6 +352,8 @@ shader VSVariables(out vec2 worldPos)
if (pressureEqualsWorldPressure)
{
//TODO (mr 09Jan2019) -- these hardcoded values must not be used - also at
// other locations!
float slopePtoZ = 36.0f / (log(20.) - log(1050.));
worldPos.y = exp(((worldPos.y) / slopePtoZ) + log(1050.));
worldPos.y = ((log(worldPos.y) - pToWorldZParams2.x) * pToWorldZParams2.y);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment