mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-21 20:09:00 -05:00
merge
This commit is contained in:
@@ -29,6 +29,7 @@ set(HEADER_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanet.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesatellites.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablerings.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.h
|
||||
@@ -44,8 +45,9 @@ source_group("Header Files" FILES ${HEADER_FILES})
|
||||
set(SOURCE_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesatellites.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/planetgeometry.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableconstellationbounds.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderableplanet.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablesatellites.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablerings.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/renderablestars.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/rendering/simplespheregeometry.cpp
|
||||
@@ -62,6 +64,8 @@ set(SHADER_FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/constellationbounds_vs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/nighttexture_fs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/nighttexture_vs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablekeplerorbits_fs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderablekeplerorbits_vs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableplanet_fs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/renderableplanet_vs.glsl
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/shaders/rings_vs.glsl
|
||||
|
||||
@@ -232,7 +232,6 @@ RenderableSatellites::RenderableSatellites(const ghoul::Dictionary& dictionary)
|
||||
int lineNum = 1;
|
||||
if (dictionary.hasKeyAndValue)<double>(KeyLineNum) {
|
||||
lineNum = static_cast<int>(dictionary.value<double>(KeyLineNum));
|
||||
}
|
||||
readTLEFile(file, lineNum);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2018 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#include "fragment.glsl"
|
||||
#include "floatoperations.glsl"
|
||||
|
||||
uniform vec3 color;
|
||||
uniform float opacity = 1.0;
|
||||
uniform bool useLineFade;
|
||||
uniform float lineFade;
|
||||
|
||||
in vec4 viewSpacePosition;
|
||||
|
||||
Fragment getFragment() {
|
||||
Fragment frag;
|
||||
frag.color = vec4(color, opacity);
|
||||
frag.depth = safeLength(viewSpacePosition);
|
||||
frag.blend = BLEND_MODE_ADDITIVE;
|
||||
frag.gPosition = viewSpacePosition;
|
||||
|
||||
// There is no normal here
|
||||
frag.gNormal = vec4(0.0, 0.0, -1.0, 1.0);
|
||||
|
||||
return frag;
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
/*****************************************************************************************
|
||||
* *
|
||||
* OpenSpace *
|
||||
* *
|
||||
* Copyright (c) 2014-2018 *
|
||||
* *
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy of this *
|
||||
* software and associated documentation files (the "Software"), to deal in the Software *
|
||||
* without restriction, including without limitation the rights to use, copy, modify, *
|
||||
* merge, publish, distribute, sublicense, and/or sell copies of the Software, and to *
|
||||
* permit persons to whom the Software is furnished to do so, subject to the following *
|
||||
* conditions: *
|
||||
* *
|
||||
* The above copyright notice and this permission notice shall be included in all copies *
|
||||
* or substantial portions of the Software. *
|
||||
* *
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
|
||||
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT *
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF *
|
||||
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE *
|
||||
* OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
|
||||
****************************************************************************************/
|
||||
|
||||
#version __CONTEXT__
|
||||
|
||||
layout(location = 0) in vec4 vertexData;
|
||||
|
||||
uniform dmat4 modelViewTransform;
|
||||
uniform mat4 projectionTransform;
|
||||
uniform bool useLineFade;
|
||||
uniform float lineFade;
|
||||
uniform int vertexSortingMethod;
|
||||
uniform int pointSize;
|
||||
|
||||
out vec4 viewSpacePosition;
|
||||
|
||||
void main() {
|
||||
dvec4 position = dvec4(vertexData.xyz, 1.0);
|
||||
float timeOffset = vertexData.w;
|
||||
|
||||
viewSpacePosition = vec4(modelViewTransform * position);
|
||||
gl_Position = projectionTransform * viewSpacePosition;
|
||||
}
|
||||
@@ -47,6 +47,27 @@ public:
|
||||
std::string offender;
|
||||
};
|
||||
|
||||
struct KeplerOrbit {
|
||||
/// The period of the orbit in seconds
|
||||
double period() const;
|
||||
/// The eccentricity of the orbit in [0, 1)
|
||||
double eccentricity;
|
||||
/// The semi-major axis in km
|
||||
double semiMajorAxis;
|
||||
/// The inclination of the orbit in [0, 360]
|
||||
double inclination;
|
||||
/// The right ascension of the ascending node in [0, 360]
|
||||
double ascendingNode;
|
||||
/// The argument of periapsis in [0, 360]
|
||||
double argumentOfPeriapsis;
|
||||
/// The mean anomaly at the epoch in [0, 360]
|
||||
double meanAnomalyAtEpoch;
|
||||
/// The epoch in seconds relative to the J2000 epoch
|
||||
double epoch;
|
||||
/// The mass of the more massive body
|
||||
double massiveBodyMass = 1.989E30; // Sun's mass in kg
|
||||
};
|
||||
|
||||
/**
|
||||
* The constructor that retrieves the required Keplerian elements from the passed
|
||||
* \p dictionary. These values are then apssed to the setKeplerElements method for
|
||||
|
||||
Reference in New Issue
Block a user