Merge pull request #7 from OpenVR-Advanced-Settings/travis-ci
add travis config for linux ci build
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
language: cpp
|
||||
dist: xenial
|
||||
compiler:
|
||||
- clang
|
||||
- gcc
|
||||
|
||||
install:
|
||||
- sudo add-apt-repository ppa:kubuntu-ppa/backports -y
|
||||
- sudo apt-get update -qq
|
||||
- sudo apt-get install build-essential qtbase5-dev qttools5-dev qtdeclarative5-dev qtmultimedia5-dev qt5-default qttools5-dev-tools
|
||||
|
||||
script:
|
||||
- mkdir build && cd build
|
||||
- qmake ..
|
||||
- make
|
||||
@@ -5,6 +5,7 @@
|
||||
#-------------------------------------------------
|
||||
|
||||
QT += core gui qml quick multimedia
|
||||
CONFIG += c++11
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#include "ChaperoneTabController.h"
|
||||
#include <QQuickWindow>
|
||||
#include "../overlaycontroller.h"
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
// application namespace
|
||||
namespace advsettings {
|
||||
@@ -361,7 +361,7 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseHmd.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseHmd.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceHmd)) {
|
||||
if (!std::isnan(distanceHmd)) {
|
||||
minDistance = distanceHmd;
|
||||
}
|
||||
}
|
||||
@@ -374,7 +374,7 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseLeft.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseLeft.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceLeft) && (isnan(minDistance) || distanceLeft < minDistance)) {
|
||||
if (!std::isnan(distanceLeft) && (std::isnan(minDistance) || distanceLeft < minDistance)) {
|
||||
minDistance = distanceLeft;
|
||||
}
|
||||
}
|
||||
@@ -388,12 +388,12 @@ void ChaperoneTabController::eventLoopTick(vr::TrackedDevicePose_t* devicePoses,
|
||||
poseRight.mDeviceToAbsoluteTracking.m[1][3],
|
||||
poseRight.mDeviceToAbsoluteTracking.m[2][3]
|
||||
});
|
||||
if (!isnan(distanceRight) && (isnan(minDistance) || distanceRight < minDistance)) {
|
||||
if (!std::isnan(distanceRight) && (std::isnan(minDistance) || distanceRight < minDistance)) {
|
||||
minDistance = distanceRight;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!isnan(minDistance)) {
|
||||
if (!std::isnan(minDistance)) {
|
||||
handleChaperoneWarnings(minDistance);
|
||||
}
|
||||
}
|
||||
@@ -1002,7 +1002,7 @@ float ChaperoneTabController::getBoundsMaxY() {
|
||||
} else {
|
||||
ci = 2;
|
||||
}
|
||||
if (isnan(result) || result < collisionBounds[b].vCorners[ci].v[1]) {
|
||||
if (std::isnan(result) || result < collisionBounds[b].vCorners[ci].v[1]) {
|
||||
result = collisionBounds[b].vCorners[ci].v[1];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
|
||||
#include "ChaperoneUtils.h"
|
||||
#include <iostream>
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
|
||||
namespace utils {
|
||||
|
||||
@@ -43,7 +42,7 @@ float ChaperoneUtils::_getDistanceToChaperone(const vr::HmdVector3_t & x, vr::Hm
|
||||
float d_z = x1_z - x.v[2];
|
||||
d = sqrt(d_x*d_x + d_z*d_z);
|
||||
}
|
||||
if (isnan(distance) || d < distance) {
|
||||
if (std::isnan(distance) || d < distance) {
|
||||
distance = d;
|
||||
if (projectedPoint) {
|
||||
projectedPoint->v[0] = x1_x;
|
||||
|
||||
Reference in New Issue
Block a user