Linux fixes clang (#1216)

* Changes to work on Linux.

* Multiple small fixes for Linux.

* Changes to have trails working on Linux again.

* Bring back AA Trail Lines on Linux.

* Included new branch with correction in cfitsio library linking.

* Updated SGCT.

* Changes to work on Linux.

* Remove extra #endif

* Changes to compile in Clang on Linux.

* Other fixes.

* Bring back some of the changes lost and updated clang building commands.

* requiring 10.15 for sgct, upadating sgct

Co-authored-by: Jonathas <jon.costa@gmail.com>
Co-authored-by: Tom Schober <tom@tomschober.com>
Co-authored-by: Alexander Bock <mail@alexanderbock.eu>
This commit is contained in:
Micah Acinapura
2020-06-25 18:55:20 -04:00
committed by GitHub
parent 7e143cec31
commit 6db7d503a3
17 changed files with 148 additions and 32 deletions
+3 -1
View File
@@ -29,6 +29,8 @@
#include <openspace/scripting/scriptengine.h>
#include <utility>
#include <cmath>
namespace openspace::interaction {
JoystickCameraStates::JoystickCameraStates(double sensitivity, double velocityScaleFactor)
@@ -53,7 +55,7 @@ void JoystickCameraStates::updateStateFromInput(const InputState& inputState,
bool hasValue = true;
float value = inputState.joystickAxis(i);
if (abs(value) <= t.deadzone) {
if (std::fabs(value) <= t.deadzone) {
value = 0.f;
hasValue = false;
}
+6 -4
View File
@@ -29,6 +29,8 @@
#include <ghoul/logging/logmanager.h>
#include <glm/gtx/vector_angle.hpp>
#include <cmath>
namespace {
constexpr const char* _loggerCat = "OrbitalNavigator";
@@ -244,10 +246,10 @@ OrbitalNavigator::OrbitalNavigator()
, _retargetAim(RetargetAimInfo)
, _followAnchorNodeRotationDistance(FollowAnchorNodeInfo, 5.0f, 0.0f, 20.f)
, _minimumAllowedDistance(MinimumDistanceInfo, 10.0f, 0.0f, 10000.f)
, _velocitySensitivity(VelocityZoomControlInfo, 0.02f, 0.01f, 0.15f)
, _applyLinearFlight(ApplyLinearFlightInfo, false)
, _flightDestinationDistance(FlightDestinationDistInfo, 2e8f, 0.0f, 1e10f)
, _flightDestinationFactor(FlightDestinationFactorInfo, 1E-4, 1E-6, 0.5)
, _applyLinearFlight(ApplyLinearFlightInfo, false)
, _velocitySensitivity(VelocityZoomControlInfo, 0.02f, 0.01f, 0.15f)
, _mouseSensitivity(MouseSensitivityInfo, 15.0f, 1.0f, 50.f)
, _joystickSensitivity(JoystickSensitivityInfo, 10.0f, 1.0f, 50.f)
, _websocketSensitivity(WebsocketSensitivityInfo, 10.0f, 1.0f, 50.f)
@@ -467,7 +469,7 @@ void OrbitalNavigator::updateCameraStateFromStates(double deltaTime) {
// Fly towards the flight destination distance. When getting closer than
// arrivalThreshold terminate the flight
if (abs(distFromCameraToFocus - _flightDestinationDistance) > arrivalThreshold) {
if (std::fabs(distFromCameraToFocus - _flightDestinationDistance) > arrivalThreshold) {
pose.position = moveCameraAlongVector(
pose.position,
distFromCameraToFocus,
@@ -1080,7 +1082,7 @@ glm::dquat OrbitalNavigator::interpolateLocalRotation(double deltaTime,
// Retrieving the angle of a quaternion uses acos on the w component, which can
// have numerical instability for values close to 1.0
constexpr double Epsilon = 1.0e-13;
if (abs((abs(result.w) - 1.0)) < Epsilon || angle(result) < 0.01) {
if (std::fabs((std::fabs(result.w) - 1.0)) < Epsilon || angle(result) < 0.01) {
_retargetAnchorInterpolator.end();
}
return result;
+2 -1
View File
@@ -29,6 +29,7 @@
#include <openspace/scripting/scriptengine.h>
#include <ghoul/misc/stringconversion.h>
#include <utility>
#include <cmath>
namespace openspace::interaction {
@@ -54,7 +55,7 @@ void WebsocketCameraStates::updateStateFromInput(const InputState& inputState,
}
float value = inputState.websocketAxis(i);
bool hasValue = abs(value) > t.deadzone;
bool hasValue = std::fabs(value) > t.deadzone;
if (!hasValue) {
value = 0.f;