-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from dpaulat/feature/placefiles
Placefiles
- Loading branch information
Showing
155 changed files
with
13,888 additions
and
865 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule mapbox-gl-native
updated
3303 files
Submodule stb
updated
4 files
+4 −4 | README.md | |
+117 −27 | stb_image.h | |
+3 −2 | tests/image_test.dsp | |
+1 −0 | tools/README.list |
Submodule textflowcpp
added at
12010d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
set(PROJECT_NAME scwx-textflowcpp) | ||
|
||
set(TEXTFLOWCPP_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/textflowcpp PARENT_SCOPE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
cmake_minimum_required(VERSION 3.20) | ||
set(PROJECT_NAME scwx-units) | ||
|
||
add_subdirectory(units) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
#version 330 core | ||
in vec4 color; | ||
smooth in vec4 color; | ||
|
||
layout (location = 0) out vec4 fragColor; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
#version 330 core | ||
|
||
#define DEGREES_MAX 360.0f | ||
#define LATITUDE_MAX 85.051128779806604f | ||
#define LONGITUDE_MAX 180.0f | ||
#define PI 3.1415926535897932384626433f | ||
#define RAD2DEG 57.295779513082320876798156332941f | ||
#define DEG2RAD 0.0174532925199432957692369055556f | ||
|
||
layout (location = 0) in vec2 aLatLong; | ||
layout (location = 1) in vec2 aXYOffset; | ||
layout (location = 2) in vec3 aTexCoord; | ||
layout (location = 3) in vec4 aModulate; | ||
layout (location = 4) in float aAngleDeg; | ||
layout (location = 5) in int aThreshold; | ||
layout (location = 6) in ivec2 aTimeRange; | ||
|
||
uniform mat4 uMVPMatrix; | ||
uniform mat4 uMapMatrix; | ||
uniform vec2 uMapScreenCoord; | ||
|
||
out VertexData | ||
{ | ||
int threshold; | ||
vec3 texCoord; | ||
vec4 color; | ||
ivec2 timeRange; | ||
} vsOut; | ||
|
||
smooth out vec3 texCoord; | ||
smooth out vec4 color; | ||
|
||
vec2 latLngToScreenCoordinate(in vec2 latLng) | ||
{ | ||
vec2 p; | ||
latLng.x = clamp(latLng.x, -LATITUDE_MAX, LATITUDE_MAX); | ||
p.xy = vec2(LONGITUDE_MAX + latLng.y, | ||
-(LONGITUDE_MAX - RAD2DEG * log(tan(PI / 4 + latLng.x * PI / DEGREES_MAX)))); | ||
return p; | ||
} | ||
|
||
void main() | ||
{ | ||
// Pass the threshold and time range to the geometry shader | ||
vsOut.threshold = aThreshold; | ||
vsOut.timeRange = aTimeRange; | ||
|
||
// Pass the texture coordinate and color modulate to the geometry and | ||
// fragment shaders | ||
vsOut.texCoord = aTexCoord; | ||
vsOut.color = aModulate; | ||
texCoord = aTexCoord; | ||
color = aModulate; | ||
|
||
vec2 p = latLngToScreenCoordinate(aLatLong) - uMapScreenCoord; | ||
|
||
// Rotate clockwise | ||
float angle = aAngleDeg * DEG2RAD; | ||
mat2 rotate = mat2(cos(angle), -sin(angle), | ||
sin(angle), cos(angle)); | ||
|
||
// Transform the position to screen coordinates | ||
gl_Position = uMapMatrix * vec4(p, 0.0f, 1.0f) + | ||
uMVPMatrix * vec4(rotate * aXYOffset, 0.0f, 0.0f); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#version 330 core | ||
|
||
layout (location = 0) in vec2 aScreenCoord; | ||
layout (location = 1) in vec2 aXYOffset; | ||
layout (location = 2) in vec4 aColor; | ||
layout (location = 3) in int aThreshold; | ||
layout (location = 4) in ivec2 aTimeRange; | ||
|
||
uniform mat4 uMVPMatrix; | ||
uniform mat4 uMapMatrix; | ||
uniform vec2 uMapScreenCoord; | ||
|
||
out VertexData | ||
{ | ||
int threshold; | ||
vec3 texCoord; | ||
vec4 color; | ||
ivec2 timeRange; | ||
} vsOut; | ||
|
||
smooth out vec4 color; | ||
|
||
void main() | ||
{ | ||
// Pass the threshold and time range to the geometry shader | ||
vsOut.threshold = aThreshold; | ||
vsOut.timeRange = aTimeRange; | ||
|
||
// Pass the color to the geometry and fragment shaders | ||
vsOut.color = aColor; | ||
color = aColor; | ||
|
||
vec2 p = aScreenCoord - uMapScreenCoord; | ||
|
||
// Transform the position to screen coordinates | ||
gl_Position = uMapMatrix * vec4(p, 0.0f, 1.0f) + | ||
uMVPMatrix * vec4(aXYOffset, 0.0f, 0.0f); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#version 330 core | ||
|
||
// Lower the default precision to medium | ||
precision mediump float; | ||
|
||
uniform sampler2DArray uTexture; | ||
|
||
smooth in vec3 texCoord; | ||
smooth in vec4 color; | ||
|
||
layout (location = 0) out vec4 fragColor; | ||
|
||
void main() | ||
{ | ||
fragColor = texture(uTexture, texCoord) * color; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#version 330 core | ||
|
||
layout (triangles) in; | ||
layout (triangle_strip, max_vertices = 3) out; | ||
|
||
uniform float uMapDistance; | ||
uniform int uSelectedTime; | ||
|
||
in VertexData | ||
{ | ||
int threshold; | ||
vec3 texCoord; | ||
vec4 color; | ||
ivec2 timeRange; | ||
} gsIn[]; | ||
|
||
smooth out vec3 texCoord; | ||
smooth out vec4 color; | ||
|
||
void main() | ||
{ | ||
if ((gsIn[0].threshold <= 0 || // If Threshold: 0 was specified, no threshold | ||
gsIn[0].threshold >= uMapDistance || // If Threshold is above current map distance | ||
gsIn[0].threshold >= 999) && // If Threshold: 999 was specified (or greater), no threshold | ||
(gsIn[0].timeRange[0] == 0 || // If there is no start time specified | ||
(gsIn[0].timeRange[0] <= uSelectedTime && // If the selected time is after the start time | ||
uSelectedTime < gsIn[0].timeRange[1]))) // If the selected time is before the end time | ||
{ | ||
gl_Position = gl_in[0].gl_Position; | ||
texCoord = gsIn[0].texCoord; | ||
color = gsIn[0].color; | ||
EmitVertex(); | ||
|
||
gl_Position = gl_in[1].gl_Position; | ||
texCoord = gsIn[1].texCoord; | ||
color = gsIn[1].color; | ||
|
||
EmitVertex(); | ||
gl_Position = gl_in[2].gl_Position; | ||
texCoord = gsIn[2].texCoord; | ||
color = gsIn[2].color; | ||
|
||
EmitVertex(); | ||
EndPrimitive(); | ||
} | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.