Untabify the rest of the source files

Update Ghoul repository
This commit is contained in:
Alexander Bock
2016-04-18 20:14:29 +02:00
parent 248014b6c2
commit 906470f28e
244 changed files with 10507 additions and 10507 deletions

View File

@@ -48,8 +48,8 @@ private:
void updateVertices();
std::vector<float> _vertices;
bool _initialized;
GLuint _vaoId;
GLuint _vBufferId;
GLuint _vaoId;
GLuint _vBufferId;
glm::vec3 _size;
glm::vec3 _normal;
float _planeDistance;

View File

@@ -39,8 +39,8 @@ public:
bool initialize();
void render();
GLuint _vaoId;
GLuint _vBufferId;
GLuint _vaoId;
GLuint _vBufferId;
glm::vec3 _size;
};

View File

@@ -90,7 +90,7 @@ namespace openspace {
// mutable bool _viewMatrixIsDirty;
//};
class SyncBuffer;
class SyncBuffer;
class Camera {
public:
@@ -99,38 +99,38 @@ public:
void setPosition(psc pos);
const psc& position() const;
const psc& unsynchedPosition() const;
const psc& unsynchedPosition() const;
void setModelMatrix(glm::mat4 modelMatrix);
const glm::mat4& modelMatrix() const;
void setModelMatrix(glm::mat4 modelMatrix);
const glm::mat4& modelMatrix() const;
void setViewMatrix(glm::mat4 viewMatrix);
const glm::mat4& viewMatrix() const;
void setViewMatrix(glm::mat4 viewMatrix);
const glm::mat4& viewMatrix() const;
void setProjectionMatrix(glm::mat4 projectionMatrix);
const glm::mat4& projectionMatrix() const;
void setProjectionMatrix(glm::mat4 projectionMatrix);
const glm::mat4& projectionMatrix() const;
const glm::mat4& viewProjectionMatrix() const;
void setCameraDirection(glm::vec3 cameraDirection);
glm::vec3 cameraDirection() const;
void setFocusPosition(psc pos);
const psc& focusPosition() const;
void setFocusPosition(psc pos);
const psc& focusPosition() const;
void setViewRotationMatrix(glm::mat4 m);
const glm::mat4& viewRotationMatrix() const;
void setViewRotationMatrix(glm::mat4 m);
const glm::mat4& viewRotationMatrix() const;
void compileViewRotationMatrix();
void rotate(const glm::quat& rotation);
void setRotation(glm::quat rotation);
// const glm::quat& rotation() const;
void setRotation(glm::mat4 rotation);
void setRotation(glm::mat4 rotation);
const glm::vec3& viewDirection() const;
const glm::vec3& viewDirection() const;
const float& maxFov() const;
const float& maxFov() const;
const float& sinMaxFov() const;
void setMaxFov(float fov);
void setScaling(glm::vec2 scaling);
@@ -139,43 +139,43 @@ public:
void setLookUpVector(glm::vec3 lookUp);
const glm::vec3& lookUpVector() const;
void postSynchronizationPreDraw();
void preSynchronization();
void serialize(SyncBuffer* syncBuffer);
void deserialize(SyncBuffer* syncBuffer);
void postSynchronizationPreDraw();
void preSynchronization();
void serialize(SyncBuffer* syncBuffer);
void deserialize(SyncBuffer* syncBuffer);
private:
float _maxFov;
float _sinMaxFov;
mutable glm::mat4 _viewProjectionMatrix;
glm::mat4 _modelMatrix;
glm::mat4 _viewMatrix;
glm::mat4 _projectionMatrix;
glm::mat4 _modelMatrix;
glm::mat4 _viewMatrix;
glm::mat4 _projectionMatrix;
mutable bool _dirtyViewProjectionMatrix;
glm::vec3 _viewDirection;
glm::vec3 _cameraDirection;
psc _focusPosition;
psc _focusPosition;
// glm::quat _viewRotation;
glm::vec3 _lookUp;
mutable std::mutex _mutex;
//local variables
glm::mat4 _localViewRotationMatrix;
glm::vec2 _localScaling;
psc _localPosition;
mutable std::mutex _mutex;
//local variables
glm::mat4 _localViewRotationMatrix;
glm::vec2 _localScaling;
psc _localPosition;
//shared copies of local variables
glm::vec2 _sharedScaling;
psc _sharedPosition;
glm::mat4 _sharedViewRotationMatrix;
//shared copies of local variables
glm::vec2 _sharedScaling;
psc _sharedPosition;
glm::mat4 _sharedViewRotationMatrix;
//synced copies of local variables
glm::vec2 _syncedScaling;
psc _syncedPosition;
glm::mat4 _syncedViewRotationMatrix;
//synced copies of local variables
glm::vec2 _syncedScaling;
psc _syncedPosition;
glm::mat4 _syncedViewRotationMatrix;
};
} // namespace openspace

View File

@@ -61,8 +61,8 @@ namespace openspace {
enum class MouseAction {
Release = 0,
Press = 1,
Repeat = 2
Press = 1,
Repeat = 2
};
// The X11 library header files define Button1-Button5 as defines, so they have to be
@@ -85,7 +85,7 @@ enum class MouseButton {
Button7 = 6,
Button8 = 8,
Last = Button8,
Left = Button1,
Left = Button1,
Right = Button2,
Middle = Button3
};

View File

@@ -44,7 +44,7 @@ public:
PowerScaledCoordinate();
PowerScaledCoordinate(PowerScaledCoordinate&& rhs);
PowerScaledCoordinate(const PowerScaledCoordinate& rhs);
PowerScaledCoordinate(const PowerScaledCoordinate& rhs);
// Sets the power scaled coordinates directly
PowerScaledCoordinate(glm::vec4 v);
@@ -61,11 +61,11 @@ public:
// returns the rescaled, "normal" coordinates
glm::vec3 vec3() const;
// return the full psc as dvec4()
glm::dvec4 dvec4() const;
// return the full psc as dvec4()
glm::dvec4 dvec4() const;
// rescaled return as dvec3
glm::dvec3 dvec3() const;
// rescaled return as dvec3
glm::dvec3 dvec3() const;
// length of the vector as a pss
PowerScaledScalar length() const;

View File

@@ -36,52 +36,52 @@ namespace openspace {
class PowerScaledScalar {
public:
// constructors
PowerScaledScalar();
PowerScaledScalar(const glm::vec2 &v);
PowerScaledScalar(float f1, float f2);
static PowerScaledScalar CreatePSS(double d1);
// constructors
PowerScaledScalar();
PowerScaledScalar(const glm::vec2 &v);
PowerScaledScalar(float f1, float f2);
static PowerScaledScalar CreatePSS(double d1);
const glm::vec2& vec2() const;
float lengthf() const;
const glm::vec2& vec2() const;
float lengthf() const;
// operator overloading
PowerScaledScalar& operator=(const PowerScaledScalar& rhs);
PowerScaledScalar& operator+=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator+(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator-=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator-(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator*=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator*(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator*=(const float& rhs);
const PowerScaledScalar operator*(const float& rhs) const;
float& operator[](unsigned int idx);
float operator[](unsigned int idx) const;
// operator overloading
PowerScaledScalar& operator=(const PowerScaledScalar& rhs);
PowerScaledScalar& operator+=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator+(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator-=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator-(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator*=(const PowerScaledScalar& rhs);
const PowerScaledScalar operator*(const PowerScaledScalar& rhs) const;
PowerScaledScalar& operator*=(const float& rhs);
const PowerScaledScalar operator*(const float& rhs) const;
float& operator[](unsigned int idx);
float operator[](unsigned int idx) const;
// comparison
bool operator==(const PowerScaledScalar& other) const;
bool operator<(const PowerScaledScalar& other) const;
bool operator>(const PowerScaledScalar& other) const;
bool operator<=(const PowerScaledScalar& other) const;
bool operator>=(const PowerScaledScalar& other) const;
bool operator==(double other) const;
bool operator<(double other) const;
bool operator>(double other) const;
bool operator<=(double other) const;
bool operator>=(double other) const;
// comparison
bool operator==(const PowerScaledScalar& other) const;
bool operator<(const PowerScaledScalar& other) const;
bool operator>(const PowerScaledScalar& other) const;
bool operator<=(const PowerScaledScalar& other) const;
bool operator>=(const PowerScaledScalar& other) const;
bool operator==(double other) const;
bool operator<(double other) const;
bool operator>(double other) const;
bool operator<=(double other) const;
bool operator>=(double other) const;
// glm integration
PowerScaledScalar& operator=(const glm::vec2& rhs);
PowerScaledScalar& operator=(float rhs);
// glm integration
PowerScaledScalar& operator=(const glm::vec2& rhs);
PowerScaledScalar& operator=(float rhs);
friend std::ostream& operator<<(std::ostream& os, const PowerScaledScalar& rhs);
// allow the power scaled coordinates to access private members
friend class PowerScaledCoordinate;
// allow the power scaled coordinates to access private members
friend class PowerScaledCoordinate;
private:
// float vector used when returning float values
glm::vec2 _data;
// float vector used when returning float values
glm::vec2 _data;
};

View File

@@ -37,9 +37,9 @@ class PowerScaledSphere {
public:
// initializers
PowerScaledSphere(const PowerScaledScalar& radius,
int segments = 8);
PowerScaledSphere(properties::Vec4Property &radius,
int segments, std::string planetName);
int segments = 8);
PowerScaledSphere(properties::Vec4Property &radius,
int segments, std::string planetName);
~PowerScaledSphere();
PowerScaledSphere(const PowerScaledSphere& cpy);
@@ -57,9 +57,9 @@ public:
GLubyte padding[28]; // Pads the struct out to 64 bytes for performance increase
} Vertex;
GLuint _vaoID;
GLuint _vBufferID;
GLuint _iBufferID;
GLuint _vaoID;
GLuint _vBufferID;
GLuint _iBufferID;
unsigned int _isize;
unsigned int _vsize;

View File

@@ -31,18 +31,18 @@ namespace openspace {
class ProgressBar {
public:
ProgressBar(int end, int width = 70, std::ostream& stream = std::cout);
~ProgressBar();
ProgressBar(int end, int width = 70, std::ostream& stream = std::cout);
~ProgressBar();
ProgressBar& operator=(const ProgressBar& rhs) = delete;
void print(int current);
void print(int current);
private:
int _width;
int _previous;
int _end;
std::ostream& _stream;
int _width;
int _previous;
int _end;
std::ostream& _stream;
};

View File

@@ -45,22 +45,22 @@ public:
* This struct stores the incoming log entries with their #level, #timeString,
* #category, #message, and the generated #timeStamp used for the expiry calculation.
*/
struct LogEntry {
struct LogEntry {
/// The ghoul::logging::LogManager::LogLevel of the log message
LogLevel level;
LogLevel level;
/// The timepoint when the log message arrived at the ScreenLog
std::chrono::time_point<std::chrono::steady_clock> timeStamp;
/// The time string as retrieved from the log message
std::string timeString;
std::string timeString;
/// The category as retrieved from the log message
std::string category;
std::string category;
/// The actual message of the log entry
std::string message;
};
std::string message;
};
/**
* Constructor that creates a ScreenLog with the provided \p timeToLive, and the
@@ -80,8 +80,8 @@ public:
* \param category The category of the log message
* \param message The actual log message that was transmitted
*/
void log(ghoul::logging::LogManager::LogLevel level, const std::string& category,
const std::string& message) override;
void log(ghoul::logging::LogManager::LogLevel level, const std::string& category,
const std::string& message) override;
/**
* This method removes all the stored LogEntry%s that have expired, calculated by
@@ -100,7 +100,7 @@ public:
private:
/// The list of all LogEntry%s stored by this ScreenLog
std::vector<LogEntry> _entries;
std::vector<LogEntry> _entries;
/// The time-to-live for the LogEntry%s in this ScreenLog. Is used by the
/// #removeExpiredEntries method to remove expired entries.

View File

@@ -58,85 +58,85 @@ class SyncBuffer;
class Time {
public:
/**
* Initializes the Time singleton.
* \return <code>true</code> if the initialization succeeded, <code>false</code>
* otherwise
/**
* Initializes the Time singleton.
* \return <code>true</code> if the initialization succeeded, <code>false</code>
* otherwise
* \pre The Time singleton must not have been initialized
*/
static void initialize();
*/
static void initialize();
/**
* Deinitializes the Time singleton. This method will not unload the kernel that was
* possibly loaded during the initialize method.
/**
* Deinitializes the Time singleton. This method will not unload the kernel that was
* possibly loaded during the initialize method.
* \pre The Time singleton must have been initialized
*/
static void deinitialize();
*/
static void deinitialize();
/**
* Returns the reference to the Time singleton object.
* \return The reference to the Time singleton object
/**
* Returns the reference to the Time singleton object.
* \return The reference to the Time singleton object
* \pre The Time singleton must have been initialized
*/
*/
static Time& ref();
/**
* Returns <code>true</code> if the singleton has been successfully initialized,
* <code>false</code> otherwise
* \return <code>true</code> if the singleton has been successfully initialized,
* <code>false</code> otherwise
*/
static bool isInitialized();
/**
* Sets the current time to the specified value in seconds past the J2000 epoch. This
* value can be negative to represent dates before the epoch.
* \param value The number of seconds after the J2000 epoch
/**
* Returns <code>true</code> if the singleton has been successfully initialized,
* <code>false</code> otherwise
* \return <code>true</code> if the singleton has been successfully initialized,
* <code>false</code> otherwise
*/
static bool isInitialized();
/**
* Sets the current time to the specified value in seconds past the J2000 epoch. This
* value can be negative to represent dates before the epoch.
* \param value The number of seconds after the J2000 epoch
* \param requireJump Whether or not the time change is big enough to require a
* time-jump; defaults to true as most calls to set time will require recomputation of
* planetary paths etc.
*/
void setTime(double value, bool requireJump = true);
*/
void setTime(double value, bool requireJump = true);
/**
* Sets the current time to the specified value given as a Spice compliant string as
* described in the Spice documentation
* (http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html)
* \param time The time to be set as a date string
/**
* Sets the current time to the specified value given as a Spice compliant string as
* described in the Spice documentation
* (http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/str2et_c.html)
* \param time The time to be set as a date string
* \param requireJump Whether or not the time change is big enough to require a
* time-jump; defaults to true as most calls to set time will require recomputation of
* planetary paths etc.
*/
void setTime(std::string time, bool requireJump = true);
*/
void setTime(std::string time, bool requireJump = true);
/**
* Returns the current time as the number of seconds past the J2000 epoch. If the
* current time is a date before that epoch, the returned value will be negative.
* \return The current time as the number of seconds past the J2000 epoch
*/
double currentTime() const;
/**
* Returns the current time as the number of seconds past the J2000 epoch. If the
* current time is a date before that epoch, the returned value will be negative.
* \return The current time as the number of seconds past the J2000 epoch
*/
double currentTime() const;
/**
* Returns the current time as a formatted date string compliant with ISO 8601 and
* thus also compliant with the Spice library.
* \return The current time as a formatted date string
*/
std::string currentTimeUTC() const;
/**
* Returns the current time as a formatted date string compliant with ISO 8601 and
* thus also compliant with the Spice library.
* \return The current time as a formatted date string
*/
std::string currentTimeUTC() const;
/**
* Sets the delta time value that is the number of seconds that should pass for each
* real-time second. This value is used in the advanceTime(double) method to easily
* advance the simulation time.
* \param deltaT The number of seconds that should pass for each real-time second
*/
void setDeltaTime(double deltaT);
/**
* Sets the delta time value that is the number of seconds that should pass for each
* real-time second. This value is used in the advanceTime(double) method to easily
* advance the simulation time.
* \param deltaT The number of seconds that should pass for each real-time second
*/
void setDeltaTime(double deltaT);
/**
* Returns the delta time, that is the number of seconds that pass in the simulation
* for each real-time second
* \return The number of seconds that pass for each real-time second
*/
double deltaTime() const;
/**
* Returns the delta time, that is the number of seconds that pass in the simulation
* for each real-time second
* \return The number of seconds that pass for each real-time second
*/
double deltaTime() const;
/**
* Sets the pause function, i.e. setting the deltaTime to 0 (<code>pause</code> =
@@ -156,67 +156,67 @@ public:
*/
bool togglePause();
/**
* Advances the simulation time using the deltaTime() and the <code>tickTime</code>.
* The deltaTime() is the number of simulation seconds that pass for each real-time
* second. <code>tickTime</code> is the number of real-time seconds that passed since
* the last call to this method. If this method is called in the render loop, the
* <code>tickTime</code> should be equivalent to the frame time.
* \param tickTime The number of real-time seconds that passed since the last call
* to this method
* \return The new time value after advancing the time
*/
double advanceTime(double tickTime);
/**
* Advances the simulation time using the deltaTime() and the <code>tickTime</code>.
* The deltaTime() is the number of simulation seconds that pass for each real-time
* second. <code>tickTime</code> is the number of real-time seconds that passed since
* the last call to this method. If this method is called in the render loop, the
* <code>tickTime</code> should be equivalent to the frame time.
* \param tickTime The number of real-time seconds that passed since the last call
* to this method
* \return The new time value after advancing the time
*/
double advanceTime(double tickTime);
void serialize(SyncBuffer* syncBuffer);
void serialize(SyncBuffer* syncBuffer);
void deserialize(SyncBuffer* syncBuffer);
void deserialize(SyncBuffer* syncBuffer);
void postSynchronizationPreDraw();
void postSynchronizationPreDraw();
void preSynchronization();
void preSynchronization();
bool timeJumped() const;
bool timeJumped() const;
void setTimeJumped(bool jumped);
void setTimeJumped(bool jumped);
bool paused() const;
/**
* Returns the Lua library that contains all Lua functions available to change the
* current time, retrieve the current time etc. The functions contained are
* - openspace::luascriptfunctions::time_setDeltaTime
* - openspace::luascriptfunctions::time_deltaTime
* - openspace::luascriptfunctions::time_setTime
* - openspace::luascriptfunctions::time_currentTime
* - openspace::luascriptfunctions::time_currentTimeUTC
* \return The Lua library that contains all Lua functions available to change the
* Time singleton
*/
static scripting::ScriptEngine::LuaLibrary luaLibrary();
/**
* Returns the Lua library that contains all Lua functions available to change the
* current time, retrieve the current time etc. The functions contained are
* - openspace::luascriptfunctions::time_setDeltaTime
* - openspace::luascriptfunctions::time_deltaTime
* - openspace::luascriptfunctions::time_setTime
* - openspace::luascriptfunctions::time_currentTime
* - openspace::luascriptfunctions::time_currentTimeUTC
* \return The Lua library that contains all Lua functions available to change the
* Time singleton
*/
static scripting::ScriptEngine::LuaLibrary luaLibrary();
private:
static Time* _instance; ///< The singleton instance
//local copies
static Time* _instance; ///< The singleton instance
//local copies
/// The time stored as the number of seconds past the J2000 epoch
double _time = -1.0;
double _dt = 1.0;
bool _timeJumped = false;
double _time = -1.0;
double _dt = 1.0;
bool _timeJumped = false;
bool _timePaused = false;
bool _jockeHasToFixThisLater;
//shared copies
double _sharedTime = -1.0;
double _sharedDt = 1.0;
bool _sharedTimeJumped = false;
//shared copies
double _sharedTime = -1.0;
double _sharedDt = 1.0;
bool _sharedTimeJumped = false;
//synced copies
double _syncedTime = -1.0;
double _syncedDt = 1.0;
bool _syncedTimeJumped = false;
std::mutex _syncMutex;
//synced copies
double _syncedTime = -1.0;
double _syncedDt = 1.0;
bool _syncedTimeJumped = false;
std::mutex _syncMutex;
};
} // namespace openspace

View File

@@ -37,16 +37,16 @@ struct InitializeData {
};
struct UpdateData {
double time;
double time;
bool isTimeJump;
double delta;
bool doPerformanceMeasurement;
double delta;
bool doPerformanceMeasurement;
};
struct RenderData {
const Camera& camera;
psc position;
bool doPerformanceMeasurement;
const Camera& camera;
psc position;
bool doPerformanceMeasurement;
};
struct RaycasterTask {