Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gue-ni committed Mar 6, 2024
1 parent 56f04a2 commit 15d0f16
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 30 deletions.
5 changes: 1 addition & 4 deletions app/TerrainRendererItem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company (Giuseppe D'Angelo)
* Copyright (C) 2023 Adam Celarek
* Copyright (C) 2023 Gerald Kimmersdorfer
* Copyright (C) 2024 Jakob Maier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -256,8 +257,6 @@ void TerrainRendererItem::set_gl_preset(const QString& preset_b64_string) {

void TerrainRendererItem::get_upload_file()
{
qDebug() << "get_upload_file";

auto fileContentReady = [this](const QString &fileName, const QByteArray &fileContent) {
(void)fileContent;
if (fileName.isEmpty()) {
Expand Down Expand Up @@ -393,7 +392,6 @@ void TerrainRendererItem::set_field_of_view(float new_field_of_view)

void TerrainRendererItem::set_track_width(float width)
{
// qDebug() << "Set track width " << width;
m_track_width = width;
emit track_width_changed(width);
schedule_update();
Expand All @@ -406,7 +404,6 @@ float TerrainRendererItem::track_width() const

void TerrainRendererItem::set_track_shading(unsigned int shading)
{
qDebug() << "Set track shading " << shading;
m_track_shading = shading;
emit track_shading_changed(shading);
schedule_update();
Expand Down
1 change: 1 addition & 0 deletions app/TerrainRendererItem.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
* Copyright (C) 2017 Klarälvdalens Datakonsult AB, a KDAB Group company (Giuseppe D'Angelo)
* Copyright (C) 2023 Adam Celarek
* Copyright (C) 2023 Gerald Kimmersdorfer
* Copyright (C) 2024 Jakob Maier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
2 changes: 1 addition & 1 deletion gl_engine/TrackManager.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*****************************************************************************
* Alpine Terrain Builder
* Copyright (C) 2022 alpinemaps.org
* Copyright (C) 2024 Jakob Maier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
1 change: 1 addition & 0 deletions gl_engine/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright (C) 2023 Jakob Lindner
* Copyright (C) 2023 Gerald Kimmersdorfer
* Copyright (C) 2024 Lucas Dworschak
* Copyright (C) 2024 Jakob Maier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
1 change: 1 addition & 0 deletions gl_engine/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
* Copyright (C) 2023 Jakob Lindner
* Copyright (C) 2023 Gerald Kimmersdorfer
* Copyright (C) 2024 Lucas Dworschak
* Copyright (C) 2024 Jakob Maier
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
Expand Down
4 changes: 0 additions & 4 deletions gl_engine/shaders/compose.frag
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ highp float calculate_falloff(highp float dist, highp float from, highp float to
#include "overlay_steepness.glsl"
#include "snow.glsl"

#line 1
layout (location = 0) out lowp vec4 out_Color;

in highp vec2 texcoords;
Expand All @@ -47,9 +46,6 @@ uniform highp sampler2D texin_csm2; // f32vec1
uniform highp sampler2D texin_csm3; // f32vec1
uniform highp sampler2D texin_csm4; // f32vec1

uniform highp sampler2D texin_track; // f32vec3
uniform highp usampler2D texin_track_vert_id;


// Calculates the diffuse and specular illumination contribution for the given
// parameters according to the Blinn-Phong lighting model.
Expand Down
2 changes: 1 addition & 1 deletion gl_engine/shaders/tile.frag
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ layout (location = 2) out highp uvec2 texout_normal;
layout (location = 3) out lowp vec4 texout_depth;

in highp vec2 uv;
in highp vec3 var_pos_cws; // camera world space?
in highp vec3 var_pos_cws;
in highp vec3 var_normal;
#if CURTAIN_DEBUG_MODE > 0
in lowp float is_curtain;
Expand Down
2 changes: 0 additions & 2 deletions nucleus/DataQuerier.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ class DataQuerier
public:
DataQuerier(tile_scheduler::MemoryCache* cache);

// use this to snap height of gpx points
// needs to be reloaded if tiles change
[[nodiscard]] float get_altitude(const glm::dvec2& lat_long) const;
};

Expand Down
1 change: 0 additions & 1 deletion nucleus/camera/Definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,6 @@ glm::dvec2 Definition::to_ndc(const glm::dvec2& screen_space_coordinates) const
return ((screen_space_coordinates / glm::dvec2(viewport_size())) * 2.0 - 1.0) * glm::dvec2 { 1.0, -1.0 };
}

// interesting
float Definition::to_screen_space(float world_space_size, float world_space_distance) const
{
return float(m_viewport_size.y) * 0.5f * world_space_size * m_distance_scaling_factor / world_space_distance;
Expand Down
15 changes: 0 additions & 15 deletions nucleus/srs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,19 +89,4 @@ glm::dvec3 lat_long_alt_to_world(const glm::dvec3& lat_long_alt)
return { world_xy.x, world_xy.y, lat_long_alt.z / std::abs(std::cos(lat_rad_)) };
}

double haversine_distance(const glm::dvec2& lat_long_1, const glm::dvec2& lat_long_2)
{
double delta_lat = glm::radians(lat_long_2.x - lat_long_1.x);
double delta_long = glm::radians(lat_long_2.y - lat_long_1.y);

return 2 * cSemiMajorAxis * std::asin(
std::sqrt(
std::pow(std::sin(delta_lat / 2), 2) +
std::cos(glm::radians(lat_long_1.x)) *
std::cos(glm::radians(lat_long_2.x)) *
std::pow(std::sin(delta_long / 2), 2)
)
);
}

}
2 changes: 0 additions & 2 deletions nucleus/srs.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,4 @@ glm::dvec2 lat_long_to_world(const glm::dvec2& lat_long);
glm::dvec3 lat_long_alt_to_world(const glm::dvec3& lat_long_alt);
glm::dvec2 world_to_lat_long(const glm::dvec2& world_pos);
glm::dvec3 world_to_lat_long_alt(const glm::dvec3& world_pos);

double haversine_distance(const glm::dvec2& lat_long_1, const glm::dvec2& lat_long_2);
}

0 comments on commit 15d0f16

Please sign in to comment.