Added missing include and merged master into NewAtmosphere.

This commit is contained in:
Jonathas Costa
2017-11-25 22:39:18 -05:00
142 changed files with 5565 additions and 4414 deletions
@@ -81,6 +81,9 @@ public:
void swapBuffer() const override;
int nWindows() const override;
int currentWindowId() const override;
private:
properties::FloatProperty _eyeSeparation;
properties::BoolProperty _showStatsGraph;
@@ -271,8 +271,21 @@ public:
*/
virtual void takeScreenshot(bool applyWarping = false) const;
/**
* Encourages the windowing system to swap the back- and front buffers
*/
virtual void swapBuffer() const;
/**
* Returns the number of windows that are currently instantiated
*/
virtual int nWindows() const;
/**
* Returns the id of the current window (in the range [0, nWindows -1])
*/
virtual int currentWindowId() const;
struct WindowWrapperException : public ghoul::RuntimeError {
explicit WindowWrapperException(const std::string& msg);
};
@@ -159,17 +159,17 @@ namespace openspace::properties {
template <> \
template <> \
bool PropertyDelegate<TemplateProperty<TYPE>>::toLuaValue<TYPE>(lua_State* lua, \
TYPE value) \
TYPE val) \
{ \
return TO_LUA_LAMBDA_EXPRESSION(lua, value); \
return TO_LUA_LAMBDA_EXPRESSION(lua, val); \
} \
\
template <> \
template <> \
bool PropertyDelegate<NumericalProperty<TYPE>>::toLuaValue<TYPE>(lua_State* state, \
TYPE value) \
TYPE val) \
{ \
return PropertyDelegate<TemplateProperty<TYPE>>::toLuaValue<TYPE>(state, value); \
return PropertyDelegate<TemplateProperty<TYPE>>::toLuaValue<TYPE>(state, val); \
} \
\
template <> \
@@ -106,16 +106,17 @@ namespace openspace::properties {
template <> \
template <> \
TYPE PropertyDelegate<TemplateProperty<TYPE>>::fromLuaValue<TYPE>(lua_State* l, \
bool& s) \
bool& successful) \
{ \
return FROM_LUA_LAMBDA_EXPRESSION(l, s); \
return FROM_LUA_LAMBDA_EXPRESSION(l, successful); \
} \
\
template <> \
template <> \
bool PropertyDelegate<TemplateProperty<TYPE>>::toLuaValue<TYPE>(lua_State* l, TYPE v)\
bool PropertyDelegate<TemplateProperty<TYPE>>::toLuaValue<TYPE>(lua_State* l, \
TYPE value) \
{ \
return TO_LUA_LAMBDA_EXPRESSION(l, v); \
return TO_LUA_LAMBDA_EXPRESSION(l, value); \
} \
\
template <> \
@@ -125,10 +126,10 @@ namespace openspace::properties {
\
template <> \
template <> \
TYPE PropertyDelegate<TemplateProperty<TYPE>>::fromString(std::string v, \
bool& s) \
TYPE PropertyDelegate<TemplateProperty<TYPE>>::fromString(std::string value, \
bool& successful) \
{ \
return FROM_STRING_LAMBDA_EXPRESSION(v, s); \
return FROM_STRING_LAMBDA_EXPRESSION(value, successful); \
} \
\
template <> \
@@ -77,6 +77,7 @@ public:
void initialize();
void initializeGL();
void deinitialize();
void deinitializeGL();
void setScene(Scene* scene);
Scene* scene();
@@ -64,7 +64,7 @@ public:
virtual bool deinitialize();
virtual bool deinitializeGL();
virtual void update() = 0;
virtual void update();
virtual bool isReady() const;
bool isEnabled() const;
+9 -10
View File
@@ -25,15 +25,14 @@
#ifndef __OPENSPACE_CORE___DISTANCECONSTANTS___H__
#define __OPENSPACE_CORE___DISTANCECONSTANTS___H__
namespace openspace {
namespace distanceconstants {
const float EarthRadius = 6371;
const float LightYear = 9.4607304725808E15;
const float AstronomicalUnit = 1.495978707E11;
const float Parsec = 3.0856776E16;
}
}
namespace openspace::distanceconstants {
constexpr double EarthRadius = 6371;
constexpr double LightYear = 9.4607304725808E15;
constexpr double LightMonth = LightYear / 12;
constexpr double LightDay = LightYear / 365;
constexpr double LightHour = LightDay / 24;
constexpr double AstronomicalUnit = 1.495978707E11;
constexpr double Parsec = 3.0856776E16;
} // openspace::distanceconstants
#endif // __OPENSPACE_CORE___DISTANCECONSTANTS___H__
@@ -0,0 +1,37 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2017 *
* *
* 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. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___DISTANCECONVERSION___H__
#define __OPENSPACE_CORE___DISTANCECONVERSION___H__
#include <string>
#include <utility>
namespace openspace {
std::pair<double, std::string> simplifyDistance(double meters);
} // namespace openspace
#endif // __OPENSPACE_CORE___DISTANCECONVERSION___H__
+37
View File
@@ -0,0 +1,37 @@
/*****************************************************************************************
* *
* OpenSpace *
* *
* Copyright (c) 2014-2017 *
* *
* 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. *
****************************************************************************************/
#ifndef __OPENSPACE_CORE___TIMECONVERSION___H__
#define __OPENSPACE_CORE___TIMECONVERSION___H__
#include <string>
#include <utility>
namespace openspace {
std::pair<double, std::string> simplifyTime(double seconds);
} // namespace openspace
#endif // __OPENSPACE_CORE___TIMECONVERSION___H__