diff --git a/include/openspace/engine/wrapper/sgctwindowwrapper.h b/include/openspace/engine/wrapper/sgctwindowwrapper.h
index 2b6ab89b61..7a07e2e5b2 100644
--- a/include/openspace/engine/wrapper/sgctwindowwrapper.h
+++ b/include/openspace/engine/wrapper/sgctwindowwrapper.h
@@ -42,7 +42,7 @@ public:
bool windowHasResized() const override;
double averageDeltaTime() const override;
- double deltaTime() const override;
+ double deltaTime() const override;
glm::vec2 mousePosition() const override;
uint32_t mouseButtons(int maxNumber) const override;
glm::ivec2 currentWindowSize() const override;
diff --git a/include/openspace/engine/wrapper/windowwrapper.h b/include/openspace/engine/wrapper/windowwrapper.h
index 567a419417..cb931bc87c 100644
--- a/include/openspace/engine/wrapper/windowwrapper.h
+++ b/include/openspace/engine/wrapper/windowwrapper.h
@@ -79,11 +79,11 @@ public:
*/
virtual double averageDeltaTime() const;
- /**
- * Returns the frametime in seconds. On default, this method returns 0.0.
- * \return The frametime in seconds
- */
- virtual double deltaTime() const;
+ /**
+ * Returns the frametime in seconds. On default, this method returns 0.0.
+ * \return The frametime in seconds
+ */
+ virtual double deltaTime() const;
/**
* Returns the location of the mouse cursor in pixel screen coordinates. On default,
diff --git a/include/openspace/rendering/renderengine.h b/include/openspace/rendering/renderengine.h
index d33d3ede7f..bd25619d07 100644
--- a/include/openspace/rendering/renderengine.h
+++ b/include/openspace/rendering/renderengine.h
@@ -68,15 +68,15 @@ public:
Post
};
- enum class FrametimeType {
- DtTimeAvg = 0,
- FPS,
- FPSAvg
- };
+ enum class FrametimeType {
+ DtTimeAvg = 0,
+ FPS,
+ FPSAvg
+ };
static const std::string KeyFontMono;
static const std::string KeyFontLight;
- static const std::vector FrametimeTypes;
+ static const std::vector FrametimeTypes;
RenderEngine();
~RenderEngine();
@@ -104,7 +104,7 @@ public:
void takeScreenshot();
void toggleInfoText(bool b);
- void toggleFrametimeType(int t);
+ void toggleFrametimeType(int t);
// Performance measurements
void setPerformanceMeasurements(bool performanceMeasurements);
@@ -207,7 +207,7 @@ private:
ghoul::Dictionary _resolveData;
ScreenLog* _log;
- FrametimeType _frametimeType;
+ FrametimeType _frametimeType;
bool _showInfo;
bool _showLog;
diff --git a/include/openspace/util/transformationmanager.h b/include/openspace/util/transformationmanager.h
index 61378c816a..abc6cfb741 100644
--- a/include/openspace/util/transformationmanager.h
+++ b/include/openspace/util/transformationmanager.h
@@ -41,16 +41,16 @@ namespace openspace {
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
#endif
class TransformationManager : public ghoul::Singleton {
- friend class ghoul::Singleton;
+ friend class ghoul::Singleton;
public:
- TransformationManager();
- ~TransformationManager();
+ TransformationManager();
+ ~TransformationManager();
- glm::dmat3 frameTransformationMatrix(std::string from, std::string to, double ephemerisTime) const;
+ glm::dmat3 frameTransformationMatrix(std::string from, std::string to, double ephemerisTime) const;
private:
- glm::dmat3 kameleonTransformationMatrix(std::string from, std::string to, double ephemerisTime) const;
+ glm::dmat3 kameleonTransformationMatrix(std::string from, std::string to, double ephemerisTime) const;
#ifdef OPENSPACE_MODULE_KAMELEON_ENABLED
std::shared_ptr _kameleon;
diff --git a/modules/base/shaders/atmosphere_fs.glsl b/modules/base/shaders/atmosphere_fs.glsl
index 3dcd2ca5f7..efbccdc3a7 100644
--- a/modules/base/shaders/atmosphere_fs.glsl
+++ b/modules/base/shaders/atmosphere_fs.glsl
@@ -205,7 +205,7 @@ float phaseFunctionR(float mu) {
// Mie phase function
float phaseFunctionM(float mu) {
- return 1.5 * 1.0 / (4.0 * M_PI) * (1.0 - mieG*mieG) * pow(1.0 + (mieG*mieG) - 2.0*mieG*mu, -3.0/2.0) * (1.0 + mu * mu) / (2.0 + mieG*mieG);
+ return 1.5 * 1.0 / (4.0 * M_PI) * (1.0 - mieG*mieG) * pow(1.0 + (mieG*mieG) - 2.0*mieG*mu, -3.0/2.0) * (1.0 + mu * mu) / (2.0 + mieG*mieG);
}
float opticalDepth(float H, float r, float mu, float d) {
@@ -225,7 +225,7 @@ vec4 texture4D(sampler3D table, float r, float mu, float muS, float nu)
float rmu = r * mu;
float delta = rmu * rmu - r * r + Rg * Rg;
vec4 cst = rmu < 0.0 && delta > 0.0 ? vec4(1.0, 0.0, 0.0, 0.5 - 0.5 / float(RES_MU)) : vec4(-1.0, H * H, H, 0.5 + 0.5 / float(RES_MU));
- float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
+ float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
float uMu = cst.w + (rmu * cst.x + sqrt(delta + cst.y)) / (rho + cst.z) * (0.5 - 1.0 / float(RES_MU));
float uMuS = 0.5 / float(RES_MU_S) + (atan(max(muS, -0.1975) * tan(1.26 * 1.1)) / 1.1 + (1.0 - 0.26)) * 0.5 * (1.0 - 1.0 / float(RES_MU_S));
float lerp = (nu + 1.0) / 2.0 * (float(RES_NU) - 1.0);
@@ -240,18 +240,18 @@ vec3 analyticTransmittance(float r, float mu, float d) {
}
vec3 getMie(vec4 rayMie) {
- return rayMie.rgb * rayMie.a / max(rayMie.r, 1e-4) * (betaR.r / betaR);
+ return rayMie.rgb * rayMie.a / max(rayMie.r, 1e-4) * (betaR.r / betaR);
}
vec2 getTransmittanceUV(float r, float mu) {
float uR, uMu;
- uR = sqrt((r - Rg) / (Rt - Rg));
- uMu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
+ uR = sqrt((r - Rg) / (Rt - Rg));
+ uMu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
return vec2(uMu, uR);
}
vec3 transmittanceFromTexture(float r, float mu) {
- vec2 uv = getTransmittanceUV(r, mu);
+ vec2 uv = getTransmittanceUV(r, mu);
return texture(transmittanceTexture, uv).rgb;
}
diff --git a/modules/base/shaders/deltaJ_calc_fs.glsl b/modules/base/shaders/deltaJ_calc_fs.glsl
index c170ff6ccb..b087cd7b11 100644
--- a/modules/base/shaders/deltaJ_calc_fs.glsl
+++ b/modules/base/shaders/deltaJ_calc_fs.glsl
@@ -59,9 +59,9 @@ void getMuMuSNu(const float r, vec4 dhdH, out float mu, out float mu_s, out floa
}
vec3 transmittanceFromTexture(const float r, const float mu) {
- float u_r = sqrt((r - Rg) / (Rt - Rg));
+ float u_r = sqrt((r - Rg) / (Rt - Rg));
// See Colliene to understand the different mapping.
- float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
+ float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
return texture(transmittanceTexture, vec2(u_mu, u_r)).rgb;
}
@@ -106,7 +106,7 @@ vec4 texture4D(sampler3D table, const float r, const float mu,
float rmu = r * mu;
float delta = rmu * rmu - r * r + Rg * Rg;
vec4 cst = rmu < 0.0 && delta > 0.0 ? vec4(1.0, 0.0, 0.0, 0.5 - 0.5 / float(RES_MU)) : vec4(-1.0, H * H, H, 0.5 + 0.5 / float(RES_MU));
- float u_r = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
+ float u_r = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
float u_mu = cst.w + (rmu * cst.x + sqrt(delta + cst.y)) / (rho + cst.z) * (0.5 - 1.0 / float(RES_MU));
float u_mu_s = 0.5 / float(RES_MU_S) + (atan(max(mu_s, -0.1975) * tan(1.26 * 1.1)) / 1.1 + (1.0 - 0.26)) * 0.5 * (1.0 - 1.0 / float(RES_MU_S));
float lerp = (nu + 1.0) / 2.0 * (float(RES_NU) - 1.0);
diff --git a/modules/base/shaders/imageplane_vs.glsl b/modules/base/shaders/imageplane_vs.glsl
index 43ba44216d..e98713c544 100644
--- a/modules/base/shaders/imageplane_vs.glsl
+++ b/modules/base/shaders/imageplane_vs.glsl
@@ -37,7 +37,7 @@ out float s;
void main()
{
- vec4 position = vec4(in_position.xyz * pow(10, in_position.w), 1);
+ vec4 position = vec4(in_position.xyz * pow(10, in_position.w), 1);
vec4 positionClipSpace = modelViewProjectionTransform * position;
// Write output
diff --git a/modules/base/shaders/inScattering_calc_fs.glsl b/modules/base/shaders/inScattering_calc_fs.glsl
index 5144c92bce..1eec8a78e2 100644
--- a/modules/base/shaders/inScattering_calc_fs.glsl
+++ b/modules/base/shaders/inScattering_calc_fs.glsl
@@ -59,9 +59,9 @@ void getMuMuSNu(const float r, vec4 dhdH, out float mu, out float mu_s, out floa
}
vec3 transmittanceFromTexture(const float r, const float mu) {
- float u_r = sqrt((r - Rg) / (Rt - Rg));
+ float u_r = sqrt((r - Rg) / (Rt - Rg));
// See Colliene to understand the different mapping.
- float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
+ float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
return texture(transmittanceTexture, vec2(u_mu, u_r)).rgb;
}
diff --git a/modules/base/shaders/inScattering_sup_calc_fs.glsl b/modules/base/shaders/inScattering_sup_calc_fs.glsl
index 71f5943c04..13551e5abe 100644
--- a/modules/base/shaders/inScattering_sup_calc_fs.glsl
+++ b/modules/base/shaders/inScattering_sup_calc_fs.glsl
@@ -59,7 +59,7 @@ vec4 texture4D(sampler3D table, float r, float mu, float muS, float nu)
float rmu = r * mu;
float delta = rmu * rmu - r * r + Rg * Rg;
vec4 cst = rmu < 0.0 && delta > 0.0 ? vec4(1.0, 0.0, 0.0, 0.5 - 0.5 / float(RES_MU)) : vec4(-1.0, H * H, H, 0.5 + 0.5 / float(RES_MU));
- float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
+ float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
float uMu = cst.w + (rmu * cst.x + sqrt(delta + cst.y)) / (rho + cst.z) * (0.5 - 1.0 / float(RES_MU));
float uMuS = 0.5 / float(RES_MU_S) + (atan(max(muS, -0.1975) * tan(1.26 * 1.1)) / 1.1 + (1.0 - 0.26)) * 0.5 * (1.0 - 1.0 / float(RES_MU_S));
float lerp = (nu + 1.0) / 2.0 * (float(RES_NU) - 1.0);
@@ -82,9 +82,9 @@ float limit(float r, float mu) {
}
vec3 transmittanceFromTexture(const float r, const float mu) {
- float u_r = sqrt((r - Rg) / (Rt - Rg));
+ float u_r = sqrt((r - Rg) / (Rt - Rg));
// See Colliene to understand the different mapping.
- float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
+ float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
return texture(transmittanceTexture, vec2(u_mu, u_r)).rgb;
}
diff --git a/modules/base/shaders/irradiance_calc_fs.glsl b/modules/base/shaders/irradiance_calc_fs.glsl
index 62d0a2122c..329fe2de7d 100644
--- a/modules/base/shaders/irradiance_calc_fs.glsl
+++ b/modules/base/shaders/irradiance_calc_fs.glsl
@@ -37,9 +37,9 @@ void getRAndMu(out float r, out float mu) {
}
vec3 transmittance(const float r, const float mu) {
- float u_r = sqrt((r - Rg) / (Rt - Rg));
+ float u_r = sqrt((r - Rg) / (Rt - Rg));
// See Colliene to understand the different mapping.
- float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
+ float u_mu = atan((mu + 0.15) / (1.0 + 0.15) * tan(1.5)) / 1.5;
return texture(transmittanceTexture, vec2(u_mu, u_r)).rgb;
}
diff --git a/modules/base/shaders/irradiance_sup_calc_fs.glsl b/modules/base/shaders/irradiance_sup_calc_fs.glsl
index dceedff870..cf87003e1c 100644
--- a/modules/base/shaders/irradiance_sup_calc_fs.glsl
+++ b/modules/base/shaders/irradiance_sup_calc_fs.glsl
@@ -57,7 +57,7 @@ vec4 texture4D(sampler3D table, const float r, const float mu,
float rmu = r * mu;
float delta = rmu * rmu - r * r + Rg * Rg;
vec4 cst = rmu < 0.0 && delta > 0.0 ? vec4(1.0, 0.0, 0.0, 0.5 - 0.5 / float(RES_MU)) : vec4(-1.0, H * H, H, 0.5 + 0.5 / float(RES_MU));
- float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
+ float uR = 0.5 / float(RES_R) + rho / H * (1.0 - 1.0 / float(RES_R));
float uMu = cst.w + (rmu * cst.x + sqrt(delta + cst.y)) / (rho + cst.z) * (0.5 - 1.0 / float(RES_MU));
float uMuS = 0.5 / float(RES_MU_S) + (atan(max(muS, -0.1975) * tan(1.26 * 1.1)) / 1.1 + (1.0 - 0.26)) * 0.5 * (1.0 - 1.0 / float(RES_MU_S));
float lerp = (nu + 1.0) / 2.0 * (float(RES_NU) - 1.0);
diff --git a/modules/debugging/rendering/debugshader_fs.glsl b/modules/debugging/rendering/debugshader_fs.glsl
index c5ba8102c8..5a395b10e7 100644
--- a/modules/debugging/rendering/debugshader_fs.glsl
+++ b/modules/debugging/rendering/debugshader_fs.glsl
@@ -31,8 +31,8 @@ in vec4 fs_vertexPosition;
uniform vec4 color;
Fragment getFragment(){
- Fragment frag;
- frag.color = color;
- frag.depth = fs_vertexPosition.w;
- return frag;
+ Fragment frag;
+ frag.color = color;
+ frag.depth = fs_vertexPosition.w;
+ return frag;
}
\ No newline at end of file
diff --git a/modules/debugging/rendering/debugshader_vs.glsl b/modules/debugging/rendering/debugshader_vs.glsl
index 88be6de0f5..b68e20f682 100644
--- a/modules/debugging/rendering/debugshader_vs.glsl
+++ b/modules/debugging/rendering/debugshader_vs.glsl
@@ -31,6 +31,6 @@ layout(location = 0) in vec4 vertexPositionClippingSpace;
out vec4 fs_vertexPosition;
void main(){
- fs_vertexPosition = z_normalization(vertexPositionClippingSpace);
- gl_Position = fs_vertexPosition;
+ fs_vertexPosition = z_normalization(vertexPositionClippingSpace);
+ gl_Position = fs_vertexPosition;
}
\ No newline at end of file
diff --git a/modules/globebrowsing/chunk/culling.cpp b/modules/globebrowsing/chunk/culling.cpp
index ff352f58fb..88a3d802dd 100644
--- a/modules/globebrowsing/chunk/culling.cpp
+++ b/modules/globebrowsing/chunk/culling.cpp
@@ -44,7 +44,7 @@ namespace {
namespace openspace {
//////////////////////////////////////////////////////////////////////////////////////
- // FRUSTUM CULLER //
+ // FRUSTUM CULLER //
//////////////////////////////////////////////////////////////////////////////////////
FrustumCuller::FrustumCuller(const AABB3 viewFrustum)
: _viewFrustum(viewFrustum){
@@ -81,7 +81,7 @@ namespace openspace {
//////////////////////////////////////////////////////////////////////////////////////
- // HORIZON CULLER //
+ // HORIZON CULLER //
//////////////////////////////////////////////////////////////////////////////////////
HorizonCuller::HorizonCuller() {
diff --git a/modules/globebrowsing/geometry/angle.h b/modules/globebrowsing/geometry/angle.h
index 38af821533..18996b0abf 100644
--- a/modules/globebrowsing/geometry/angle.h
+++ b/modules/globebrowsing/geometry/angle.h
@@ -36,137 +36,137 @@ template
class Angle {
public:
- //////////////////////////////////////////////////////////////////////////////////////
- // STATIC CONSTANTS //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // STATIC CONSTANTS //
+ //////////////////////////////////////////////////////////////////////////////////////
- static const T PI;
- static const T EPSILON;
+ static const T PI;
+ static const T EPSILON;
-
- /** = 0 radians = 0 degrees = no revolution */
- static const Angle ZERO;
+
+ /** = 0 radians = 0 degrees = no revolution */
+ static const Angle ZERO;
- /** = PI/2 radians = 90 degrees = quarter of a revolution */
- static const Angle QUARTER;
+ /** = PI/2 radians = 90 degrees = quarter of a revolution */
+ static const Angle QUARTER;
- /** = PI radians = 180 degrees = half a revolution */
- static const Angle HALF;
+ /** = PI radians = 180 degrees = half a revolution */
+ static const Angle HALF;
- /** = 2PI radians = 360 degrees = a full revolution */
- static const Angle FULL;
+ /** = 2PI radians = 360 degrees = a full revolution */
+ static const Angle FULL;
- //////////////////////////////////////////////////////////////////////////////////////
- // Factory Methods //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Factory Methods //
+ //////////////////////////////////////////////////////////////////////////////////////
- static Angle fromRadians(T radians);
- static Angle fromDegrees(T degrees);
- static Angle fromRevolutions(T revs);
+ static Angle fromRadians(T radians);
+ static Angle fromDegrees(T degrees);
+ static Angle fromRevolutions(T revs);
public:
- /** Copy constructor */
- Angle(const Angle& other);
+ /** Copy constructor */
+ Angle(const Angle& other);
private:
- /** Private constructor. Use factory methods to avoid unit confusion */
- Angle(T rad);
+ /** Private constructor. Use factory methods to avoid unit confusion */
+ Angle(T rad);
- //////////////////////////////////////////////////////////////////////////////////////
- // Conversions //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Conversions //
+ //////////////////////////////////////////////////////////////////////////////////////
public:
- inline T asRadians() const;
- inline T asDegrees() const;
- inline T asRevolutions() const;
+ inline T asRadians() const;
+ inline T asDegrees() const;
+ inline T asRevolutions() const;
- //////////////////////////////////////////////////////////////////////////////////////
- // Operators (boilerplate, I know.. /eb) //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Operators (boilerplate, I know.. /eb) //
+ //////////////////////////////////////////////////////////////////////////////////////
- Angle operator+(const Angle& rhs) const;
- Angle operator-(const Angle& rhs) const;
- Angle operator*(T rhs) const;
- Angle operator/(T rhs) const;
+ Angle operator+(const Angle& rhs) const;
+ Angle operator-(const Angle& rhs) const;
+ Angle operator*(T rhs) const;
+ Angle operator/(T rhs) const;
- Angle operator-() const;
+ Angle operator-() const;
- void operator+=(const Angle& rhs);
- void operator-=(const Angle& rhs);
- void operator*=(T rhs);
- void operator/=(T rhs);
+ void operator+=(const Angle& rhs);
+ void operator-=(const Angle& rhs);
+ void operator*=(T rhs);
+ void operator/=(T rhs);
- bool operator<(const Angle& rhs) const;
- bool operator<=(const Angle& rhs) const;
- bool operator>(const Angle& rhs) const;
- bool operator>=(const Angle& rhs) const;
- bool operator==(const Angle& rhs) const;
- bool operator!=(const Angle& rhs) const;
+ bool operator<(const Angle& rhs) const;
+ bool operator<=(const Angle& rhs) const;
+ bool operator>(const Angle& rhs) const;
+ bool operator>=(const Angle& rhs) const;
+ bool operator==(const Angle& rhs) const;
+ bool operator!=(const Angle& rhs) const;
- //////////////////////////////////////////////////////////////////////////////////////
- // Chainable Relative Mutators //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Chainable Relative Mutators //
+ //////////////////////////////////////////////////////////////////////////////////////
- /**
- * Normalizes the angle to the interval [0, 2pi[
- */
- Angle& normalize();
+ /**
+ * Normalizes the angle to the interval [0, 2pi[
+ */
+ Angle& normalize();
- /**
- * Normalizes the angle to the interval [center - pi, center + pi[
- */
- Angle& normalizeAround(const Angle& center);
+ /**
+ * Normalizes the angle to the interval [center - pi, center + pi[
+ */
+ Angle& normalizeAround(const Angle& center);
- /**
- * Clamps the angle to the interval [min, max].
- * Default arguments are [0, 2pi].
- */
- Angle& clamp(const Angle& min = ZERO, const Angle& max = FULL);
+ /**
+ * Clamps the angle to the interval [min, max].
+ * Default arguments are [0, 2pi].
+ */
+ Angle& clamp(const Angle& min = ZERO, const Angle& max = FULL);
- Angle& abs();
+ Angle& abs();
- //////////////////////////////////////////////////////////////////////////////////////
- // Chainable Relative Factory Methods //
- //////////////////////////////////////////////////////////////////////////////////////
+ //////////////////////////////////////////////////////////////////////////////////////
+ // Chainable Relative Factory Methods //
+ //////////////////////////////////////////////////////////////////////////////////////
- /**
- * Returns a new angle normalized to the interval [0, 2pi[
- */
- Angle getNormalized() const;
+ /**
+ * Returns a new angle normalized to the interval [0, 2pi[
+ */
+ Angle getNormalized() const;
- /**
- * Returns a new angle normalized to the interval [center - pi, center + pi[
- */
- Angle getNormalizedAround(const Angle& center) const;
+ /**
+ * Returns a new angle normalized to the interval [center - pi, center + pi[
+ */
+ Angle getNormalizedAround(const Angle& center) const;
- /**
- * Returns a new angle clamped to the interval [min, max].
- * Default arguments are [0, 2pi].
- */
- Angle getClamped(const Angle& min = ZERO, const Angle& max = FULL) const;
+ /**
+ * Returns a new angle clamped to the interval [min, max].
+ * Default arguments are [0, 2pi].
+ */
+ Angle getClamped(const Angle& min = ZERO, const Angle& max = FULL) const;
- Angle getAbs() const;
-
+ Angle getAbs() const;
+
private:
- T _radians;
+ T _radians;
};
diff --git a/modules/globebrowsing/geometry/angle.inl b/modules/globebrowsing/geometry/angle.inl
index a4cc312198..0478f94257 100644
--- a/modules/globebrowsing/geometry/angle.inl
+++ b/modules/globebrowsing/geometry/angle.inl
@@ -61,10 +61,10 @@ const Angle Angle::FULL = Angle::fromRadians(2*PI);
//////////////////////////////////////////////////////////////////////////////////////////
template Angle::Angle(const Angle& other)
- : _radians(other._radians) { }
+ : _radians(other._radians) { }
template Angle::Angle(T radians)
- : _radians(radians) { }
+ : _radians(radians) { }
@@ -75,17 +75,17 @@ template Angle::Angle(T radians)
template
Angle Angle::fromRadians(T rads) {
- return Angle(rads);
+ return Angle(rads);
}
template
Angle Angle::fromDegrees(T degrees) {
- return Angle(degrees * PI / 180.0);
+ return Angle(degrees * PI / 180.0);
}
template
Angle Angle::fromRevolutions(T revs) {
- return Angle(revs * 2 * PI);
+ return Angle(revs * 2 * PI);
}
@@ -96,17 +96,17 @@ Angle Angle::fromRevolutions(T revs) {
template
T Angle::asRadians() const {
- return _radians;
+ return _radians;
}
template
T Angle::asDegrees() const {
- return _radians * 180.0 / PI;
+ return _radians * 180.0 / PI;
}
template
T Angle::asRevolutions() const {
- return _radians / (2 * PI);
+ return _radians / (2 * PI);
}
@@ -117,49 +117,49 @@ T Angle::asRevolutions() const {
template
Angle Angle::operator+(const Angle& rhs) const{
- return Angle(_radians + rhs._radians);
+ return Angle(_radians + rhs._radians);
}
template
Angle Angle::operator-(const Angle& rhs) const{
- return Angle(_radians - rhs._radians);
+ return Angle(_radians - rhs._radians);
}
template
Angle Angle::operator*(T multiplier) const{
- return Angle(_radians * multiplier);
+ return Angle(_radians * multiplier);
}
template
Angle Angle::operator/(T divisor) const{
- return Angle(_radians / divisor);
+ return Angle(_radians / divisor);
}
template
Angle Angle::operator-() const {
- return Angle(-_radians);
+ return Angle(-_radians);
}
template
void Angle::operator+=(const Angle& rhs){
- _radians += rhs._radians;
+ _radians += rhs._radians;
}
template
void Angle::operator-=(const Angle& rhs){
- _radians -= rhs._radians;
+ _radians -= rhs._radians;
}
template
void Angle::operator*=(T multiplier){
- _radians *= multiplier;
+ _radians *= multiplier;
}
template
void Angle::operator/=(T divisor){
- _radians /= divisor;
+ _radians /= divisor;
}
@@ -167,32 +167,32 @@ void Angle::operator/=(T divisor){
template
bool Angle::operator<(const Angle& rhs) const{
- return _radians < rhs._radians;
+ return _radians < rhs._radians;
}
template
bool Angle::operator<=(const Angle& rhs) const{
- return _radians <= rhs._radians;
+ return _radians <= rhs._radians;
}
template
bool Angle::operator>(const Angle& rhs) const{
- return _radians > rhs._radians;
+ return _radians > rhs._radians;
}
template
bool Angle::operator>=(const Angle& rhs) const{
- return _radians >= rhs._radians;
+ return _radians >= rhs._radians;
}
template
bool Angle::operator==(const Angle& rhs) const{
- return _radians == rhs._radians;
+ return _radians == rhs._radians;
}
template
bool Angle::operator!=(const Angle& rhs) const{
- return _radians != rhs._radians;
+ return _radians != rhs._radians;
}
@@ -203,38 +203,38 @@ bool Angle::operator!=(const Angle& rhs) const{
template
Angle& Angle::normalize() {
- // this will cause _radians to be in value range ]-2pi, 2pi[
- _radians = fmod(_radians, 2*PI);
+ // this will cause _radians to be in value range ]-2pi, 2pi[
+ _radians = fmod(_radians, 2*PI);
- // ensure _radians are positive, ie in value range [0, 2pi[
- if (_radians < 0.0){
- _radians += 2 * PI;
- }
+ // ensure _radians are positive, ie in value range [0, 2pi[
+ if (_radians < 0.0){
+ _radians += 2 * PI;
+ }
- return *this;
+ return *this;
}
template
Angle& Angle::normalizeAround(const Angle& center) {
- _radians -= center._radians + PI;
- normalize();
- _radians += center._radians - PI;
- return *this;
+ _radians -= center._radians + PI;
+ normalize();
+ _radians += center._radians - PI;
+ return *this;
}
template
Angle& Angle::clamp(const Angle& min, const Angle& max) {
- _radians = _radians < min._radians ? min._radians
- : _radians > max._radians ? max._radians
- : _radians;
- return *this;
+ _radians = _radians < min._radians ? min._radians
+ : _radians > max._radians ? max._radians
+ : _radians;
+ return *this;
}
template
Angle& Angle::abs(){
- _radians = glm::abs(_radians);
- return *this;
+ _radians = glm::abs(_radians);
+ return *this;
}
@@ -245,24 +245,24 @@ Angle& Angle::abs(){
template
Angle Angle::getNormalized() const {
- return Angle(*this).normalize();
+ return Angle(*this).normalize();
}
template
Angle Angle::getNormalizedAround(const Angle& center) const {
- return Angle(*this).normalizeAround(center);
+ return Angle(*this).normalizeAround(center);
}
template
Angle Angle::getClamped(const Angle& min, const Angle& max) const {
- return Angle(*this).clamp(min, max);
+ return Angle(*this).clamp(min, max);
}
template
Angle Angle::getAbs() const {
- return Angle(*this).abs();
+ return Angle(*this).abs();
}
} // namespace openspace
diff --git a/modules/globebrowsing/geometry/ellipsoid.cpp b/modules/globebrowsing/geometry/ellipsoid.cpp
index 9c8fc8270f..2dc96f427d 100644
--- a/modules/globebrowsing/geometry/ellipsoid.cpp
+++ b/modules/globebrowsing/geometry/ellipsoid.cpp
@@ -143,8 +143,8 @@ namespace openspace {
{
Vec3 normal = geodeticSurfaceNormalForGeocentricallyProjectedPoint(p);
return Geodetic2(
- asin(normal.z / length(normal)), // Latitude
- atan2(normal.y, normal.x)); // Longitude
+ asin(normal.z / length(normal)), // Latitude
+ atan2(normal.y, normal.x)); // Longitude
}
Vec3 Ellipsoid::cartesianSurfacePosition(const Geodetic2& geodetic2) const
diff --git a/modules/globebrowsing/geometry/geodetic2.cpp b/modules/globebrowsing/geometry/geodetic2.cpp
index 66279858eb..4b0eb79519 100644
--- a/modules/globebrowsing/geometry/geodetic2.cpp
+++ b/modules/globebrowsing/geometry/geodetic2.cpp
@@ -36,7 +36,7 @@ namespace {
namespace openspace {
//////////////////////////////////////////////////////////////////////////////////////
- // GEODETIC2 //
+ // GEODETIC2 //
//////////////////////////////////////////////////////////////////////////////////////
Geodetic2::Geodetic2()
@@ -84,7 +84,7 @@ namespace openspace {
//////////////////////////////////////////////////////////////////////////////////////
- // GEODETICPATCH //
+ // GEODETICPATCH //
//////////////////////////////////////////////////////////////////////////////////////
GeodeticPatch::GeodeticPatch(
diff --git a/modules/globebrowsing/geometry/geodetic2.h b/modules/globebrowsing/geometry/geodetic2.h
index 5286ed8995..60e2fbca16 100644
--- a/modules/globebrowsing/geometry/geodetic2.h
+++ b/modules/globebrowsing/geometry/geodetic2.h
@@ -88,7 +88,7 @@ struct Geodetic3 {
//////////////////////////////////////////////////////////////////////////////////////
-// GEODETICPATCH //
+// GEODETICPATCH //
//////////////////////////////////////////////////////////////////////////////////////
class GeodeticPatch {
public:
@@ -108,7 +108,7 @@ public:
void setCenter(const Geodetic2&);
- void setHalfSize(const Geodetic2&);
+ void setHalfSize(const Geodetic2&);
/**
returns the latitude boundary which is closest to the equator
diff --git a/modules/globebrowsing/globebrowsingmodule.cpp b/modules/globebrowsing/globebrowsingmodule.cpp
index 510938e4cc..c4bdc00a2b 100644
--- a/modules/globebrowsing/globebrowsingmodule.cpp
+++ b/modules/globebrowsing/globebrowsingmodule.cpp
@@ -35,33 +35,33 @@
namespace openspace {
- GlobeBrowsingModule::GlobeBrowsingModule()
- : OpenSpaceModule("GlobeBrowsing")
+ GlobeBrowsingModule::GlobeBrowsingModule()
+ : OpenSpaceModule("GlobeBrowsing")
{}
void GlobeBrowsingModule::internalInitialize() {
- /*
- auto fRenderable = FactoryManager::ref().factory();
- ghoul_assert(fRenderable, "Renderable factory was not created");
+ /*
+ auto fRenderable = FactoryManager::ref().factory();
+ ghoul_assert(fRenderable, "Renderable factory was not created");
- fRenderable->registerClass("Planet");
- fRenderable->registerClass("RenderableTestPlanet");
- //fRenderable->registerClass("PlanetTestGeometry");
+ fRenderable->registerClass("Planet");
+ fRenderable->registerClass("RenderableTestPlanet");
+ //fRenderable->registerClass("PlanetTestGeometry");
- auto fPlanetGeometry = FactoryManager::ref().factory();
- ghoul_assert(fPlanetGeometry, "Planet test geometry factory was not created");
- fPlanetGeometry->registerClass("SimpleSphereTest");
+ auto fPlanetGeometry = FactoryManager::ref().factory();
+ ghoul_assert(fPlanetGeometry, "Planet test geometry factory was not created");
+ fPlanetGeometry->registerClass("SimpleSphereTest");
- */
+ */
- auto fRenderable = FactoryManager::ref().factory();
- ghoul_assert(fRenderable, "Renderable factory was not created");
+ auto fRenderable = FactoryManager::ref().factory();
+ ghoul_assert(fRenderable, "Renderable factory was not created");
- fRenderable->registerClass("RenderableGlobe");
+ fRenderable->registerClass("RenderableGlobe");
}
} // namespace openspace
diff --git a/modules/globebrowsing/globebrowsingmodule.h b/modules/globebrowsing/globebrowsingmodule.h
index 0ecb7b593c..95c0ef2039 100644
--- a/modules/globebrowsing/globebrowsingmodule.h
+++ b/modules/globebrowsing/globebrowsingmodule.h
@@ -31,7 +31,7 @@ namespace openspace {
class GlobeBrowsingModule : public OpenSpaceModule {
public:
- GlobeBrowsingModule();
+ GlobeBrowsingModule();
protected:
void internalInitialize() override;
diff --git a/modules/globebrowsing/meshes/basicgrid.cpp b/modules/globebrowsing/meshes/basicgrid.cpp
index f9eb432b40..98061deb00 100644
--- a/modules/globebrowsing/meshes/basicgrid.cpp
+++ b/modules/globebrowsing/meshes/basicgrid.cpp
@@ -25,39 +25,39 @@
#include
namespace {
- const std::string _loggerCat = "BasicGrid";
+ const std::string _loggerCat = "BasicGrid";
}
namespace openspace {
BasicGrid::BasicGrid(
- unsigned int xSegments,
- unsigned int ySegments,
- TriangleSoup::Positions usePositions,
- TriangleSoup::TextureCoordinates useTextureCoordinates,
- TriangleSoup::Normals useNormals)
- : Grid(
- xSegments,
- ySegments,
- usePositions,
- useTextureCoordinates,
- useNormals)
+ unsigned int xSegments,
+ unsigned int ySegments,
+ TriangleSoup::Positions usePositions,
+ TriangleSoup::TextureCoordinates useTextureCoordinates,
+ TriangleSoup::Normals useNormals)
+ : Grid(
+ xSegments,
+ ySegments,
+ usePositions,
+ useTextureCoordinates,
+ useNormals)
{
- _geometry = std::unique_ptr(new TriangleSoup(
- CreateElements(xSegments, ySegments),
- usePositions,
- useTextureCoordinates,
- useNormals));
+ _geometry = std::unique_ptr(new TriangleSoup(
+ CreateElements(xSegments, ySegments),
+ usePositions,
+ useTextureCoordinates,
+ useNormals));
- if (usePositions == TriangleSoup::Positions::Yes) {
- _geometry->setVertexPositions(CreatePositions(_xSegments, _ySegments));
- }
- if (useTextureCoordinates == TriangleSoup::TextureCoordinates::Yes) {
- _geometry->setVertexTextureCoordinates(CreateTextureCoordinates(_xSegments, _ySegments));
- }
- if (useNormals == TriangleSoup::Normals::Yes) {
- _geometry->setVertexNormals(CreateNormals(_xSegments, _ySegments));
- }
+ if (usePositions == TriangleSoup::Positions::Yes) {
+ _geometry->setVertexPositions(CreatePositions(_xSegments, _ySegments));
+ }
+ if (useTextureCoordinates == TriangleSoup::TextureCoordinates::Yes) {
+ _geometry->setVertexTextureCoordinates(CreateTextureCoordinates(_xSegments, _ySegments));
+ }
+ if (useNormals == TriangleSoup::Normals::Yes) {
+ _geometry->setVertexNormals(CreateNormals(_xSegments, _ySegments));
+ }
}
BasicGrid::~BasicGrid()
@@ -66,110 +66,110 @@ BasicGrid::~BasicGrid()
}
int BasicGrid::xSegments() const {
- return _xSegments;
+ return _xSegments;
}
int BasicGrid::ySegments() const {
- return _ySegments;
+ return _ySegments;
}
void BasicGrid::validate(int xSegments, int ySegments) {
- ghoul_assert(xSegments > 0 && ySegments > 0,
- "Resolution must be at least 1x1. (" << xSegments << ", " << ySegments << ")");
+ ghoul_assert(xSegments > 0 && ySegments > 0,
+ "Resolution must be at least 1x1. (" << xSegments << ", " << ySegments << ")");
}
inline size_t BasicGrid::numElements(int xSegments, int ySegments){
- return 3 * 2 * xSegments * ySegments;
+ return 3 * 2 * xSegments * ySegments;
}
inline size_t BasicGrid::numVertices(int xSegments, int ySegments) {
- return (xSegments + 1) * (ySegments + 1);
+ return (xSegments + 1) * (ySegments + 1);
}
std::vector BasicGrid::CreateElements(int xSegments, int ySegments) {
- validate(xSegments, ySegments);
+ validate(xSegments, ySegments);
- std::vector elements;
- elements.reserve(numElements(xSegments, ySegments));
- for (unsigned int y = 0; y < ySegments; y++) {
- for (unsigned int x = 0; x < xSegments; x++) {
+ std::vector elements;
+ elements.reserve(numElements(xSegments, ySegments));
+ for (unsigned int y = 0; y < ySegments; y++) {
+ for (unsigned int x = 0; x < xSegments; x++) {
- // x v01---v11 x ..
- // | / |
- // x v00---v10 x ..
- //
- // x x x x ..
- // : : : :
+ // x v01---v11 x ..
+ // | / |
+ // x v00---v10 x ..
+ //
+ // x x x x ..
+ // : : : :
- GLuint v00 = (y + 0) * (xSegments + 1) + x + 0;
- GLuint v10 = (y + 0) * (xSegments + 1) + x + 1;
- GLuint v01 = (y + 1) * (xSegments + 1) + x + 0;
- GLuint v11 = (y + 1) * (xSegments + 1) + x + 1;
+ GLuint v00 = (y + 0) * (xSegments + 1) + x + 0;
+ GLuint v10 = (y + 0) * (xSegments + 1) + x + 1;
+ GLuint v01 = (y + 1) * (xSegments + 1) + x + 0;
+ GLuint v11 = (y + 1) * (xSegments + 1) + x + 1;
- // add upper triangle
- elements.push_back(v00);
- elements.push_back(v10);
- elements.push_back(v11);
+ // add upper triangle
+ elements.push_back(v00);
+ elements.push_back(v10);
+ elements.push_back(v11);
- // add lower triangle
- elements.push_back(v00);
- elements.push_back(v11);
- elements.push_back(v01);
- }
- }
+ // add lower triangle
+ elements.push_back(v00);
+ elements.push_back(v11);
+ elements.push_back(v01);
+ }
+ }
- return elements;
+ return elements;
}
std::vector BasicGrid::CreatePositions(
- int xSegments,
- int ySegments)
+ int xSegments,
+ int ySegments)
{
- validate(xSegments, ySegments);
- std::vector positions;
- positions.reserve(numVertices(xSegments, ySegments));
+ validate(xSegments, ySegments);
+ std::vector positions;
+ positions.reserve(numVertices(xSegments, ySegments));
- // Copy from 2d texture coordinates and use as template to create positions
- std::vector templateTextureCoords = CreateTextureCoordinates(xSegments, ySegments);
- for (unsigned int i = 0; i < templateTextureCoords.size(); i++)
- {
- positions.push_back(glm::vec4(
- templateTextureCoords[i],
- 0.0f,
- 1.0f
- ));
- }
- return positions;
+ // Copy from 2d texture coordinates and use as template to create positions
+ std::vector templateTextureCoords = CreateTextureCoordinates(xSegments, ySegments);
+ for (unsigned int i = 0; i < templateTextureCoords.size(); i++)
+ {
+ positions.push_back(glm::vec4(
+ templateTextureCoords[i],
+ 0.0f,
+ 1.0f
+ ));
+ }
+ return positions;
}
std::vector BasicGrid::CreateTextureCoordinates(int xSegments, int ySegments){
- validate(xSegments, ySegments);
- std::vector textureCoordinates;
- textureCoordinates.reserve(numVertices(xSegments, ySegments));
+ validate(xSegments, ySegments);
+ std::vector textureCoordinates;
+ textureCoordinates.reserve(numVertices(xSegments, ySegments));
- for (unsigned int y = 0; y < ySegments + 1; y++) {
- for (unsigned int x = 0; x < xSegments + 1; x++) {
- textureCoordinates.push_back(glm::vec2(
- static_cast(x) / static_cast(xSegments),
- static_cast(y) / static_cast(ySegments)
- ));
- }
- }
- return textureCoordinates;
+ for (unsigned int y = 0; y < ySegments + 1; y++) {
+ for (unsigned int x = 0; x < xSegments + 1; x++) {
+ textureCoordinates.push_back(glm::vec2(
+ static_cast(x) / static_cast(xSegments),
+ static_cast(y) / static_cast(ySegments)
+ ));
+ }
+ }
+ return textureCoordinates;
}
std::vector