From 2446080a237e70faeb71632295f4217c967cba74 Mon Sep 17 00:00:00 2001 From: Brad Davis Date: Wed, 30 Jan 2019 10:35:56 -0800 Subject: [PATCH] Removing dead code --- .../gvrinterface/InterfaceActivity.java | 42 ---- gvr-interface/CMakeLists.txt | 85 -------- gvr-interface/res/drawable/icon.png | Bin 9914 -> 0 bytes gvr-interface/src/Client.cpp | 73 ------- gvr-interface/src/Client.h | 33 --- gvr-interface/src/GVRInterface.cpp | 191 ------------------ gvr-interface/src/GVRInterface.h | 72 ------- gvr-interface/src/GVRMainWindow.cpp | 176 ---------------- gvr-interface/src/GVRMainWindow.h | 58 ------ gvr-interface/src/InterfaceView.cpp | 18 -- gvr-interface/src/InterfaceView.h | 23 --- gvr-interface/src/LoginDialog.cpp | 69 ------- gvr-interface/src/LoginDialog.h | 34 ---- gvr-interface/src/RenderingClient.cpp | 156 -------------- gvr-interface/src/RenderingClient.h | 57 ------ .../gvrinterface/InterfaceActivity.java | 41 ---- gvr-interface/src/main.cpp | 28 --- .../templates/InterfaceBetaActivity.java.in | 51 ----- gvr-interface/templates/hockeyapp.xml.in | 5 - 19 files changed, 1212 deletions(-) delete mode 100644 android/apps/interface/src/main/java/io/highfidelity/gvrinterface/InterfaceActivity.java delete mode 100644 gvr-interface/CMakeLists.txt delete mode 100644 gvr-interface/res/drawable/icon.png delete mode 100644 gvr-interface/src/Client.cpp delete mode 100644 gvr-interface/src/Client.h delete mode 100644 gvr-interface/src/GVRInterface.cpp delete mode 100644 gvr-interface/src/GVRInterface.h delete mode 100644 gvr-interface/src/GVRMainWindow.cpp delete mode 100644 gvr-interface/src/GVRMainWindow.h delete mode 100644 gvr-interface/src/InterfaceView.cpp delete mode 100644 gvr-interface/src/InterfaceView.h delete mode 100644 gvr-interface/src/LoginDialog.cpp delete mode 100644 gvr-interface/src/LoginDialog.h delete mode 100644 gvr-interface/src/RenderingClient.cpp delete mode 100644 gvr-interface/src/RenderingClient.h delete mode 100644 gvr-interface/src/java/io/highfidelity/gvrinterface/InterfaceActivity.java delete mode 100644 gvr-interface/src/main.cpp delete mode 100644 gvr-interface/templates/InterfaceBetaActivity.java.in delete mode 100644 gvr-interface/templates/hockeyapp.xml.in diff --git a/android/apps/interface/src/main/java/io/highfidelity/gvrinterface/InterfaceActivity.java b/android/apps/interface/src/main/java/io/highfidelity/gvrinterface/InterfaceActivity.java deleted file mode 100644 index aad769de70..0000000000 --- a/android/apps/interface/src/main/java/io/highfidelity/gvrinterface/InterfaceActivity.java +++ /dev/null @@ -1,42 +0,0 @@ -// -// InterfaceActivity.java -// gvr-interface/java -// -// Created by Stephen Birarda on 1/26/15. -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -package io.highfidelity.gvrinterface; - -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.view.View; -import android.view.WindowManager; -import android.util.Log; -import org.qtproject.qt5.android.bindings.QtActivity; - -public class InterfaceActivity extends QtActivity { - - public static native void handleHifiURL(String hifiURLString); - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - // Get the intent that started this activity in case we have a hifi:// URL to parse - Intent intent = getIntent(); - if (intent.getAction() == Intent.ACTION_VIEW) { - Uri data = intent.getData(); - - if (data.getScheme().equals("hifi")) { - handleHifiURL(data.toString()); - } - } - - } -} \ No newline at end of file diff --git a/gvr-interface/CMakeLists.txt b/gvr-interface/CMakeLists.txt deleted file mode 100644 index 72f1096881..0000000000 --- a/gvr-interface/CMakeLists.txt +++ /dev/null @@ -1,85 +0,0 @@ -set(TARGET_NAME gvr-interface) - -if (ANDROID) - set(ANDROID_APK_BUILD_DIR "${CMAKE_CURRENT_BINARY_DIR}/apk-build") - set(ANDROID_APK_OUTPUT_DIR "${CMAKE_CURRENT_BINARY_DIR}/apk") - - set(ANDROID_SDK_ROOT $ENV{ANDROID_HOME}) - set(ANDROID_APP_DISPLAY_NAME Interface) - set(ANDROID_API_LEVEL 19) - set(ANDROID_APK_PACKAGE io.highfidelity.gvrinterface) - set(ANDROID_ACTIVITY_NAME io.highfidelity.gvrinterface.InterfaceActivity) - set(ANDROID_APK_VERSION_NAME "0.1") - set(ANDROID_APK_VERSION_CODE 1) - set(ANDROID_APK_FULLSCREEN TRUE) - set(ANDROID_DEPLOY_QT_INSTALL "--install") - - set(BUILD_SHARED_LIBS ON) - set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${ANDROID_APK_OUTPUT_DIR}/libs/${ANDROID_ABI}") - - setup_hifi_library(Gui AndroidExtras) -else () - setup_hifi_project(Gui) -endif () - -include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS}) - -link_hifi_libraries(shared networking audio-client avatars) - -if (ANDROID) - find_package(LibOVR) - - if (LIBOVR_FOUND) - add_definitions(-DHAVE_LIBOVR) - target_link_libraries(${TARGET_NAME} ${LIBOVR_LIBRARIES} ${LIBOVR_ANDROID_LIBRARIES} ${TURBOJPEG_LIBRARY}) - include_directories(SYSTEM ${LIBOVR_INCLUDE_DIRS}) - - # we need VRLib, so add a project.properties to our apk build folder that says that - file(RELATIVE_PATH RELATIVE_VRLIB_PATH ${ANDROID_APK_OUTPUT_DIR} "${LIBOVR_VRLIB_DIR}") - file(WRITE "${ANDROID_APK_BUILD_DIR}/project.properties" "android.library.reference.1=${RELATIVE_VRLIB_PATH}") - - list(APPEND IGNORE_COPY_LIBS ${LIBOVR_ANDROID_LIBRARIES}) - endif () - -endif () - -# the presence of a HOCKEY_APP_ID means we are making a beta build -if (ANDROID AND HOCKEY_APP_ID) - set(HOCKEY_APP_ENABLED true) - set(HOCKEY_APP_ACTIVITY "\n") - set(ANDROID_ACTIVITY_NAME io.highfidelity.gvrinterface.InterfaceBetaActivity) - set(ANDROID_DEPLOY_QT_INSTALL "") - set(ANDROID_APK_CUSTOM_NAME "Interface-beta.apk") - - # set the ANDROID_APK_VERSION_CODE to the number of git commits - execute_process( - COMMAND git rev-list --first-parent --count HEAD - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - OUTPUT_VARIABLE GIT_COMMIT_COUNT - OUTPUT_STRIP_TRAILING_WHITESPACE - ) - - set(ANDROID_APK_VERSION_CODE ${GIT_COMMIT_COUNT}) - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/templates/InterfaceBetaActivity.java.in" "${ANDROID_APK_BUILD_DIR}/src/io/highfidelity/gvrinterface/InterfaceBetaActivity.java") -elseif (ANDROID) - set(HOCKEY_APP_ENABLED false) -endif () - -if (ANDROID) - - set(HIFI_URL_INTENT "\ - \n \ - \n \ - \n \ - \n \ - \n " - ) - - set(ANDROID_EXTRA_APPLICATION_XML "${HOCKEY_APP_ACTIVITY}") - set(ANDROID_EXTRA_ACTIVITY_XML "${HIFI_URL_INTENT}") - - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/templates/hockeyapp.xml.in" "${ANDROID_APK_BUILD_DIR}/res/values/hockeyapp.xml") - qt_create_apk() - -endif (ANDROID) diff --git a/gvr-interface/res/drawable/icon.png b/gvr-interface/res/drawable/icon.png deleted file mode 100644 index 70aaf9b4ed60a80081821907d53086beb249eb3b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9914 zcmbWddpuO%7eBnt%rFyT3Q=grMP5-NQz2*x*%jKL~?6f ziexC%M|SBn$x40ga0Qu-0#%o!=2}H$VTA7fyrmDQ}n4)C1>Eo;iK^^vP3Kd_SMw z39#|RfxX5y0qw(`mbXqcC25Qg-H9CM(6v;5IQ@97|oFbH>4Jh1_)^0;pbeqX-GC0(CQU zLW-zioJuJXKM^{h73`%^tMW0~hk<1&dqNqGu|NP>^?B1sk@v?!*yqHB!lrNt4)QNv z=N=sw3iI-8qelV)>yC}f9C?a)1dhr|Uk<8Cp^v+W5WcF?0bM7}SDiGCjM{a}lPvtT z!|Db=)0V|=?aZChA?&MZO$z$Sw6Dk2=zuP);g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Lu$pr3n9!{rVS5_mbaqcLld4f4mqtAoV4uRib_IXkbZNTga;s?|=d_ zuzqN2zDe}S6X7256Pe{+u`Js&9xq59Yu>7wQD1$Y$DI)sl+9o#?#1(GgohTRcH!WQ zs@PtVzD>ke&gExXWQ8ze`uzQnqOLXFUB&-UJf|jj)tf2PXQslj?8Od^+G&mceb_tO z)d=)=tWE#8-Pk(3FT8x}{Z4r?i|t+&4HYaMEb?70rY=2Qj(JMiw z{V@88L-kopWoPuowoLD-V3zbVDO(Js22F-HSiCP;oJ|M{(a6gbwATeqJ>GLst#G~b z^%>rTi<=S!2aW1tThhpyB)r1&iuG)s@i%9G{CWboTTtx|8h2R*I%%tA6~>DQDs9FK zW>*1gUnnCt-sb?-eP20uzYz8=EC#@Q(8`R7=hYFJ zx@;l>e^!eLJBIBUyz+VAgsW2R9}V%^QRzT3u@cap?!&%a1BeI&y3 zDd+lR8Igc9Yy8x3I{CxW%JUs*_cd#~G*5hrJTp3$N|SIK{lEWcVJaM;h=d-vW20vZ P0B~TR#op}QjIjR)wK5d} diff --git a/gvr-interface/src/Client.cpp b/gvr-interface/src/Client.cpp deleted file mode 100644 index 8f064c7fd5..0000000000 --- a/gvr-interface/src/Client.cpp +++ /dev/null @@ -1,73 +0,0 @@ -// -// Client.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/15. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "Client.h" - -#include -#include -#include -#include -#include - -Client::Client(QObject* parent) : - QObject(parent) -{ - // we need to make sure that required dependencies are created - DependencyManager::set(); - - setupNetworking(); -} - -void Client::setupNetworking() { - // once Application order of instantiation is fixed this should be done from AccountManager - AccountManager::getInstance().setAuthURL(DEFAULT_NODE_AUTH_URL); - - // setup the NodeList for this client - DependencyManager::registerInheritance(); - auto nodeList = DependencyManager::set(NodeType::Agent, 0); - - // while datagram processing remains simple for targets using Client, we'll handle datagrams - connect(&nodeList->getNodeSocket(), &QUdpSocket::readyRead, this, &Client::processDatagrams); - - // every second, ask the NodeList to check in with the domain server - QTimer* domainCheckInTimer = new QTimer(this); - domainCheckInTimer->setInterval(DOMAIN_SERVER_CHECK_IN_MSECS); - connect(domainCheckInTimer, &QTimer::timeout, nodeList.data(), &NodeList::sendDomainServerCheckIn); - - // TODO: once the Client knows its Address on start-up we should be able to immediately send a check in here - domainCheckInTimer->start(); - - // handle the case where the domain stops talking to us - // TODO: can we just have the nodelist do this when it sets up? Is there a user of the NodeList that wouldn't want this? - connect(nodeList.data(), &NodeList::limitOfSilentDomainCheckInsReached, nodeList.data(), &NodeList::reset); -} - -void Client::processVerifiedPacket(const HifiSockAddr& senderSockAddr, const QByteArray& incomingPacket) { - DependencyManager::get()->processNodeData(senderSockAddr, incomingPacket); -} - -void Client::processDatagrams() { - HifiSockAddr senderSockAddr; - - static QByteArray incomingPacket; - - auto nodeList = DependencyManager::get(); - - while (DependencyManager::get()->getNodeSocket().hasPendingDatagrams()) { - incomingPacket.resize(nodeList->getNodeSocket().pendingDatagramSize()); - nodeList->getNodeSocket().readDatagram(incomingPacket.data(), incomingPacket.size(), - senderSockAddr.getAddressPointer(), senderSockAddr.getPortPointer()); - - if (nodeList->packetVersionAndHashMatch(incomingPacket)) { - processVerifiedPacket(senderSockAddr, incomingPacket); - } - } -} diff --git a/gvr-interface/src/Client.h b/gvr-interface/src/Client.h deleted file mode 100644 index 6fbe40f165..0000000000 --- a/gvr-interface/src/Client.h +++ /dev/null @@ -1,33 +0,0 @@ -// -// Client.h -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/15. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_Client_h -#define hifi_Client_h - -#include - -#include - -class Client : public QObject { - Q_OBJECT -public: - Client(QObject* parent = 0); - - virtual void cleanupBeforeQuit() = 0; -protected: - - void setupNetworking(); - virtual void processVerifiedPacket(const HifiSockAddr& senderSockAddr, const QByteArray& incomingPacket); -private slots: - void processDatagrams(); -}; - -#endif // hifi_Client_h diff --git a/gvr-interface/src/GVRInterface.cpp b/gvr-interface/src/GVRInterface.cpp deleted file mode 100644 index f9a29d4ac4..0000000000 --- a/gvr-interface/src/GVRInterface.cpp +++ /dev/null @@ -1,191 +0,0 @@ -// -// GVRInterface.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 11/18/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "GVRInterface.h" - -#ifdef ANDROID - -#include - -#include -#include -#include - -#ifdef HAVE_LIBOVR - -#include -#include - -#endif -#endif - -#include -#include -#include - -#include "GVRMainWindow.h" -#include "RenderingClient.h" - -static QString launchURLString = QString(); - -#ifdef ANDROID - -extern "C" { - -JNIEXPORT void Java_io_highfidelity_gvrinterface_InterfaceActivity_handleHifiURL(JNIEnv *jni, jclass clazz, jstring hifiURLString) { - launchURLString = QAndroidJniObject(hifiURLString).toString(); -} - -} - -#endif - -GVRInterface::GVRInterface(int argc, char* argv[]) : - QApplication(argc, argv), - _mainWindow(NULL), - _inVRMode(false) -{ - setApplicationName("gvr-interface"); - setOrganizationName("highfidelity"); - setOrganizationDomain("io"); - - if (!launchURLString.isEmpty()) { - // did we get launched with a lookup URL? If so it is time to give that to the AddressManager - qDebug() << "We were opened via a hifi URL -" << launchURLString; - } - - _client = new RenderingClient(this, launchURLString); - - launchURLString = QString(); - - connect(this, &QGuiApplication::applicationStateChanged, this, &GVRInterface::handleApplicationStateChange); - -#if defined(ANDROID) && defined(HAVE_LIBOVR) - QAndroidJniEnvironment jniEnv; - - QPlatformNativeInterface* interface = QApplication::platformNativeInterface(); - jobject activity = (jobject) interface->nativeResourceForIntegration("QtActivity"); - - ovr_RegisterHmtReceivers(&*jniEnv, activity); - - // PLATFORMACTIVITY_REMOVAL: Temp workaround for PlatformActivity being - // stripped from UnityPlugin. Alternate is to use LOCAL_WHOLE_STATIC_LIBRARIES - // but that increases the size of the plugin by ~1MiB - OVR::linkerPlatformActivity++; -#endif - - // call our idle function whenever we can - QTimer* idleTimer = new QTimer(this); - connect(idleTimer, &QTimer::timeout, this, &GVRInterface::idle); - idleTimer->start(0); - - // call our quit handler before we go down - connect(this, &QCoreApplication::aboutToQuit, this, &GVRInterface::handleApplicationQuit); -} - -void GVRInterface::handleApplicationQuit() { - _client->cleanupBeforeQuit(); -} - -void GVRInterface::idle() { -#if defined(ANDROID) && defined(HAVE_LIBOVR) - if (!_inVRMode && ovr_IsHeadsetDocked()) { - qDebug() << "The headset just got docked - enter VR mode."; - enterVRMode(); - } else if (_inVRMode) { - - if (ovr_IsHeadsetDocked()) { - static int counter = 0; - - // Get the latest head tracking state, predicted ahead to the midpoint of the time - // it will be displayed. It will always be corrected to the real values by - // time warp, but the closer we get, the less black will be pulled in at the edges. - const double now = ovr_GetTimeInSeconds(); - static double prev; - const double rawDelta = now - prev; - prev = now; - const double clampedPrediction = std::min( 0.1, rawDelta * 2); - ovrSensorState sensor = ovrHmd_GetSensorState(OvrHmd, now + clampedPrediction, true ); - - auto ovrOrientation = sensor.Predicted.Pose.Orientation; - glm::quat newOrientation(ovrOrientation.w, ovrOrientation.x, ovrOrientation.y, ovrOrientation.z); - _client->setOrientation(newOrientation); - - if (counter++ % 100000 == 0) { - qDebug() << "GetSensorState in frame" << counter << "-" - << ovrOrientation.x << ovrOrientation.y << ovrOrientation.z << ovrOrientation.w; - } - } else { - qDebug() << "The headset was undocked - leaving VR mode."; - - leaveVRMode(); - } - } - - OVR::KeyState& backKeyState = _mainWindow->getBackKeyState(); - auto backEvent = backKeyState.Update(ovr_GetTimeInSeconds()); - - if (backEvent == OVR::KeyState::KEY_EVENT_LONG_PRESS) { - qDebug() << "Attemping to start the Platform UI Activity."; - ovr_StartPackageActivity(_ovr, PUI_CLASS_NAME, PUI_GLOBAL_MENU); - } else if (backEvent == OVR::KeyState::KEY_EVENT_DOUBLE_TAP || backEvent == OVR::KeyState::KEY_EVENT_SHORT_PRESS) { - qDebug() << "Got an event we should cancel for!"; - } else if (backEvent == OVR::KeyState::KEY_EVENT_DOUBLE_TAP) { - qDebug() << "The button is down!"; - } -#endif -} - -void GVRInterface::handleApplicationStateChange(Qt::ApplicationState state) { - switch(state) { - case Qt::ApplicationActive: - qDebug() << "The application is active."; - break; - case Qt::ApplicationSuspended: - qDebug() << "The application is being suspended."; - break; - default: - break; - } -} - -void GVRInterface::enterVRMode() { -#if defined(ANDROID) && defined(HAVE_LIBOVR) - // Default vrModeParms - ovrModeParms vrModeParms; - vrModeParms.AsynchronousTimeWarp = true; - vrModeParms.AllowPowerSave = true; - vrModeParms.DistortionFileName = NULL; - vrModeParms.EnableImageServer = false; - vrModeParms.CpuLevel = 2; - vrModeParms.GpuLevel = 2; - vrModeParms.GameThreadTid = 0; - - QAndroidJniEnvironment jniEnv; - - QPlatformNativeInterface* interface = QApplication::platformNativeInterface(); - jobject activity = (jobject) interface->nativeResourceForIntegration("QtActivity"); - - vrModeParms.ActivityObject = activity; - - ovrHmdInfo hmdInfo; - _ovr = ovr_EnterVrMode(vrModeParms, &hmdInfo); - - _inVRMode = true; -#endif -} - -void GVRInterface::leaveVRMode() { -#if defined(ANDROID) && defined(HAVE_LIBOVR) - ovr_LeaveVrMode(_ovr); - _inVRMode = false; -#endif -} diff --git a/gvr-interface/src/GVRInterface.h b/gvr-interface/src/GVRInterface.h deleted file mode 100644 index 9ffbd52909..0000000000 --- a/gvr-interface/src/GVRInterface.h +++ /dev/null @@ -1,72 +0,0 @@ -// -// GVRInterface.h -// gvr-interface/src -// -// Created by Stephen Birarda on 11/18/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_GVRInterface_h -#define hifi_GVRInterface_h - -#include - -#if defined(ANDROID) && defined(HAVE_LIBOVR) -class ovrMobile; -class ovrHmdInfo; - -// This is set by JNI_OnLoad() when the .so is initially loaded. -// Must use to attach each thread that will use JNI: -namespace OVR { - // PLATFORMACTIVITY_REMOVAL: Temp workaround for PlatformActivity being - // stripped from UnityPlugin. Alternate is to use LOCAL_WHOLE_STATIC_LIBRARIES - // but that increases the size of the plugin by ~1MiB - extern int linkerPlatformActivity; -} - -#endif - -class GVRMainWindow; -class RenderingClient; -class QKeyEvent; - -#if defined(qApp) -#undef qApp -#endif -#define qApp (static_cast(QApplication::instance())) - -class GVRInterface : public QApplication { - Q_OBJECT -public: - GVRInterface(int argc, char* argv[]); - RenderingClient* getClient() { return _client; } - - void setMainWindow(GVRMainWindow* mainWindow) { _mainWindow = mainWindow; } - -protected: - void keyPressEvent(QKeyEvent* event); - -private slots: - void handleApplicationStateChange(Qt::ApplicationState state); - void idle(); -private: - void handleApplicationQuit(); - - void enterVRMode(); - void leaveVRMode(); - -#if defined(ANDROID) && defined(HAVE_LIBOVR) - ovrMobile* _ovr; - ovrHmdInfo* _hmdInfo; -#endif - - GVRMainWindow* _mainWindow; - - RenderingClient* _client; - bool _inVRMode; -}; - -#endif // hifi_GVRInterface_h diff --git a/gvr-interface/src/GVRMainWindow.cpp b/gvr-interface/src/GVRMainWindow.cpp deleted file mode 100644 index 5495354233..0000000000 --- a/gvr-interface/src/GVRMainWindow.cpp +++ /dev/null @@ -1,176 +0,0 @@ -// -// GVRMainWindow.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "GVRMainWindow.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#ifndef ANDROID - -#include - -#elif defined(HAVE_LIBOVR) - -#include - -const float LIBOVR_DOUBLE_TAP_DURATION = 0.25f; -const float LIBOVR_LONG_PRESS_DURATION = 0.75f; - -#endif - -#include - -#include "InterfaceView.h" -#include "LoginDialog.h" -#include "RenderingClient.h" - - - -GVRMainWindow::GVRMainWindow(QWidget* parent) : - QMainWindow(parent), -#if defined(ANDROID) && defined(HAVE_LIBOVR) - _backKeyState(LIBOVR_DOUBLE_TAP_DURATION, LIBOVR_LONG_PRESS_DURATION), - _wasBackKeyDown(false), -#endif - _mainLayout(NULL), - _menuBar(NULL), - _loginAction(NULL) -{ - -#ifndef ANDROID - const int NOTE_4_WIDTH = 2560; - const int NOTE_4_HEIGHT = 1440; - setFixedSize(NOTE_4_WIDTH / 2, NOTE_4_HEIGHT / 2); -#endif - - setupMenuBar(); - - QWidget* baseWidget = new QWidget(this); - - // setup a layout so we can vertically align to top - _mainLayout = new QVBoxLayout(baseWidget); - _mainLayout->setAlignment(Qt::AlignTop); - - // set the layout on the base widget - baseWidget->setLayout(_mainLayout); - - setCentralWidget(baseWidget); - - // add the interface view - new InterfaceView(baseWidget); -} - -GVRMainWindow::~GVRMainWindow() { - delete _menuBar; -} - -void GVRMainWindow::keyPressEvent(QKeyEvent* event) { -#ifdef ANDROID - if (event->key() == Qt::Key_Back) { - // got the Android back key, hand off to OVR KeyState - _backKeyState.HandleEvent(ovr_GetTimeInSeconds(), true, (_wasBackKeyDown ? 1 : 0)); - _wasBackKeyDown = true; - return; - } -#endif - QWidget::keyPressEvent(event); -} - -void GVRMainWindow::keyReleaseEvent(QKeyEvent* event) { -#ifdef ANDROID - if (event->key() == Qt::Key_Back) { - // release on the Android back key, hand off to OVR KeyState - _backKeyState.HandleEvent(ovr_GetTimeInSeconds(), false, 0); - _wasBackKeyDown = false; - } -#endif - QWidget::keyReleaseEvent(event); -} - -void GVRMainWindow::setupMenuBar() { - QMenu* fileMenu = new QMenu("File"); - QMenu* helpMenu = new QMenu("Help"); - - _menuBar = new QMenuBar(0); - - _menuBar->addMenu(fileMenu); - _menuBar->addMenu(helpMenu); - - QAction* goToAddress = new QAction("Go to Address", fileMenu); - connect(goToAddress, &QAction::triggered, this, &GVRMainWindow::showAddressBar); - fileMenu->addAction(goToAddress); - - _loginAction = new QAction("Login", fileMenu); - fileMenu->addAction(_loginAction); - - // change the login action depending on our logged in/out state - AccountManager& accountManager = AccountManager::getInstance(); - connect(&accountManager, &AccountManager::loginComplete, this, &GVRMainWindow::refreshLoginAction); - connect(&accountManager, &AccountManager::logoutComplete, this, &GVRMainWindow::refreshLoginAction); - - // refresh the state now - refreshLoginAction(); - - QAction* aboutQt = new QAction("About Qt", helpMenu); - connect(aboutQt, &QAction::triggered, qApp, &QApplication::aboutQt); - helpMenu->addAction(aboutQt); - - setMenuBar(_menuBar); -} - -void GVRMainWindow::showAddressBar() { - // setup the address QInputDialog - QInputDialog* addressDialog = new QInputDialog(this); - addressDialog->setLabelText("Address"); - - // add the address dialog to the main layout - _mainLayout->addWidget(addressDialog); - - connect(addressDialog, &QInputDialog::textValueSelected, - DependencyManager::get().data(), &AddressManager::handleLookupString); -} - -void GVRMainWindow::showLoginDialog() { - LoginDialog* loginDialog = new LoginDialog(this); - - // have the acccount manager handle credentials from LoginDialog - AccountManager& accountManager = AccountManager::getInstance(); - connect(loginDialog, &LoginDialog::credentialsEntered, &accountManager, &AccountManager::requestAccessToken); - connect(&accountManager, &AccountManager::loginFailed, this, &GVRMainWindow::showLoginFailure); - - _mainLayout->addWidget(loginDialog); -} - -void GVRMainWindow::showLoginFailure() { - QMessageBox::warning(this, "Login Failed", - "Could not log in with that username and password. Please try again!"); -} - -void GVRMainWindow::refreshLoginAction() { - AccountManager& accountManager = AccountManager::getInstance(); - disconnect(_loginAction, &QAction::triggered, &accountManager, 0); - - if (accountManager.isLoggedIn()) { - _loginAction->setText("Logout"); - connect(_loginAction, &QAction::triggered, &accountManager, &AccountManager::logout); - } else { - _loginAction->setText("Login"); - connect(_loginAction, &QAction::triggered, this, &GVRMainWindow::showLoginDialog); - } - -} diff --git a/gvr-interface/src/GVRMainWindow.h b/gvr-interface/src/GVRMainWindow.h deleted file mode 100644 index c28c19a6c1..0000000000 --- a/gvr-interface/src/GVRMainWindow.h +++ /dev/null @@ -1,58 +0,0 @@ -// -// GVRMainWindow.h -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_GVRMainWindow_h -#define hifi_GVRMainWindow_h - -#include - -#if defined(ANDROID) && defined(HAVE_LIBOVR) -#include -#endif - -class QKeyEvent; -class QMenuBar; -class QVBoxLayout; - -class GVRMainWindow : public QMainWindow { - Q_OBJECT -public: - GVRMainWindow(QWidget* parent = 0); - ~GVRMainWindow(); -public slots: - void showAddressBar(); - void showLoginDialog(); - - void showLoginFailure(); - -#if defined(ANDROID) && defined(HAVE_LIBOVR) - OVR::KeyState& getBackKeyState() { return _backKeyState; } -#endif - -protected: - void keyPressEvent(QKeyEvent* event); - void keyReleaseEvent(QKeyEvent* event); -private slots: - void refreshLoginAction(); -private: - void setupMenuBar(); - -#if defined(ANDROID) && defined(HAVE_LIBOVR) - OVR::KeyState _backKeyState; - bool _wasBackKeyDown; -#endif - - QVBoxLayout* _mainLayout; - QMenuBar* _menuBar; - QAction* _loginAction; -}; - -#endif // hifi_GVRMainWindow_h diff --git a/gvr-interface/src/InterfaceView.cpp b/gvr-interface/src/InterfaceView.cpp deleted file mode 100644 index e7992d3921..0000000000 --- a/gvr-interface/src/InterfaceView.cpp +++ /dev/null @@ -1,18 +0,0 @@ -// -// InterfaceView.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 1/28/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "InterfaceView.h" - -InterfaceView::InterfaceView(QWidget* parent, Qt::WindowFlags flags) : - QOpenGLWidget(parent, flags) -{ - -} \ No newline at end of file diff --git a/gvr-interface/src/InterfaceView.h b/gvr-interface/src/InterfaceView.h deleted file mode 100644 index 3d358a3e64..0000000000 --- a/gvr-interface/src/InterfaceView.h +++ /dev/null @@ -1,23 +0,0 @@ -// -// InterfaceView.h -// gvr-interface/src -// -// Created by Stephen Birarda on 1/28/14. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_InterfaceView_h -#define hifi_InterfaceView_h - -#include - -class InterfaceView : public QOpenGLWidget { - Q_OBJECT -public: - InterfaceView(QWidget* parent = 0, Qt::WindowFlags flags = 0); -}; - -#endif // hifi_InterfaceView_h diff --git a/gvr-interface/src/LoginDialog.cpp b/gvr-interface/src/LoginDialog.cpp deleted file mode 100644 index d4efd425bd..0000000000 --- a/gvr-interface/src/LoginDialog.cpp +++ /dev/null @@ -1,69 +0,0 @@ -// -// LoginDialog.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 2015-02-03. -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "LoginDialog.h" - -#include -#include -#include -#include -#include - -LoginDialog::LoginDialog(QWidget* parent) : - QDialog(parent) -{ - setupGUI(); - setWindowTitle("Login"); - setModal(true); -} - -void LoginDialog::setupGUI() { - // setup a grid layout - QGridLayout* formGridLayout = new QGridLayout(this); - - _usernameLineEdit = new QLineEdit(this); - - QLabel* usernameLabel = new QLabel(this); - usernameLabel->setText("Username"); - usernameLabel->setBuddy(_usernameLineEdit); - - formGridLayout->addWidget(usernameLabel, 0, 0); - formGridLayout->addWidget(_usernameLineEdit, 1, 0); - - _passwordLineEdit = new QLineEdit(this); - _passwordLineEdit->setEchoMode(QLineEdit::Password); - - QLabel* passwordLabel = new QLabel(this); - passwordLabel->setText("Password"); - passwordLabel->setBuddy(_passwordLineEdit); - - formGridLayout->addWidget(passwordLabel, 2, 0); - formGridLayout->addWidget(_passwordLineEdit, 3, 0); - - QDialogButtonBox* buttons = new QDialogButtonBox(this); - - QPushButton* okButton = buttons->addButton(QDialogButtonBox::Ok); - QPushButton* cancelButton = buttons->addButton(QDialogButtonBox::Cancel); - - okButton->setText("Login"); - - connect(cancelButton, &QPushButton::clicked, this, &QDialog::close); - connect(okButton, &QPushButton::clicked, this, &LoginDialog::loginButtonClicked); - - formGridLayout->addWidget(buttons, 4, 0, 1, 2); - - setLayout(formGridLayout); -} - -void LoginDialog::loginButtonClicked() { - emit credentialsEntered(_usernameLineEdit->text(), _passwordLineEdit->text()); - close(); -} diff --git a/gvr-interface/src/LoginDialog.h b/gvr-interface/src/LoginDialog.h deleted file mode 100644 index 13f630818d..0000000000 --- a/gvr-interface/src/LoginDialog.h +++ /dev/null @@ -1,34 +0,0 @@ -// -// LoginDialog.h -// gvr-interface/src -// -// Created by Stephen Birarda on 2015-02-03. -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#ifndef hifi_LoginDialog_h -#define hifi_LoginDialog_h - -#include - -class QLineEdit; - -class LoginDialog : public QDialog { - Q_OBJECT -public: - LoginDialog(QWidget* parent = 0); -signals: - void credentialsEntered(const QString& username, const QString& password); -private slots: - void loginButtonClicked(); -private: - void setupGUI(); - - QLineEdit* _usernameLineEdit; - QLineEdit* _passwordLineEdit; -}; - -#endif // hifi_LoginDialog_h \ No newline at end of file diff --git a/gvr-interface/src/RenderingClient.cpp b/gvr-interface/src/RenderingClient.cpp deleted file mode 100644 index 4c691a48e6..0000000000 --- a/gvr-interface/src/RenderingClient.cpp +++ /dev/null @@ -1,156 +0,0 @@ -// -// RenderingClient.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/15. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "RenderingClient.h" - -#include -#include - -#include -#include -#include -#include - -RenderingClient* RenderingClient::_instance = NULL; - -RenderingClient::RenderingClient(QObject *parent, const QString& launchURLString) : - Client(parent) -{ - _instance = this; - - // connect to AddressManager and pass it the launch URL, if we have one - auto addressManager = DependencyManager::get(); - connect(addressManager.data(), &AddressManager::locationChangeRequired, this, &RenderingClient::goToLocation); - addressManager->loadSettings(launchURLString); - - // tell the NodeList which node types all rendering clients will want to know about - DependencyManager::get()->addSetOfNodeTypesToNodeInterestSet(NodeSet() << NodeType::AudioMixer << NodeType::AvatarMixer); - - DependencyManager::set(); - - // get our audio client setup on its own thread - auto audioClient = DependencyManager::set(); - audioClient->setPositionGetter(getPositionForAudio); - audioClient->setOrientationGetter(getOrientationForAudio); - audioClient->startThread(); - - - connect(&_avatarTimer, &QTimer::timeout, this, &RenderingClient::sendAvatarPacket); - _avatarTimer.setInterval(16); // 60 FPS - _avatarTimer.start(); - _fakeAvatar.setDisplayName("GearVR"); - _fakeAvatar.setFaceModelURL(QUrl(DEFAULT_HEAD_MODEL_URL)); - _fakeAvatar.setSkeletonModelURL(QUrl(DEFAULT_BODY_MODEL_URL)); - _fakeAvatar.toByteArray(); // Creates HeadData -} - -void RenderingClient::sendAvatarPacket() { - _fakeAvatar.setPosition(_position); - _fakeAvatar.setHeadOrientation(_orientation); - - QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData); - packet.append(_fakeAvatar.toByteArray()); - DependencyManager::get()->broadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer); - _fakeAvatar.sendIdentityPacket(); -} - -void RenderingClient::cleanupBeforeQuit() { - DependencyManager::get()->cleanupBeforeQuit(); - // destroy the AudioClient so it and its thread will safely go down - DependencyManager::destroy(); -} - -void RenderingClient::processVerifiedPacket(const HifiSockAddr& senderSockAddr, const QByteArray& incomingPacket) { - auto nodeList = DependencyManager::get(); - PacketType incomingType = packetTypeForPacket(incomingPacket); - - switch (incomingType) { - case PacketTypeAudioEnvironment: - case PacketTypeAudioStreamStats: - case PacketTypeMixedAudio: - case PacketTypeSilentAudioFrame: { - - if (incomingType == PacketTypeAudioStreamStats) { - QMetaObject::invokeMethod(DependencyManager::get().data(), "parseAudioStreamStatsPacket", - Qt::QueuedConnection, - Q_ARG(QByteArray, incomingPacket)); - } else if (incomingType == PacketTypeAudioEnvironment) { - QMetaObject::invokeMethod(DependencyManager::get().data(), "parseAudioEnvironmentData", - Qt::QueuedConnection, - Q_ARG(QByteArray, incomingPacket)); - } else { - QMetaObject::invokeMethod(DependencyManager::get().data(), "addReceivedAudioToStream", - Qt::QueuedConnection, - Q_ARG(QByteArray, incomingPacket)); - } - - // update having heard from the audio-mixer and record the bytes received - SharedNodePointer audioMixer = nodeList->sendingNodeForPacket(incomingPacket); - - if (audioMixer) { - audioMixer->setLastHeardMicrostamp(usecTimestampNow()); - } - - break; - } - case PacketTypeBulkAvatarData: - case PacketTypeKillAvatar: - case PacketTypeAvatarIdentity: - case PacketTypeAvatarBillboard: { - // update having heard from the avatar-mixer and record the bytes received - SharedNodePointer avatarMixer = nodeList->sendingNodeForPacket(incomingPacket); - - if (avatarMixer) { - avatarMixer->setLastHeardMicrostamp(usecTimestampNow()); - - QMetaObject::invokeMethod(DependencyManager::get().data(), - "processAvatarMixerDatagram", - Q_ARG(const QByteArray&, incomingPacket), - Q_ARG(const QWeakPointer&, avatarMixer)); - } - break; - } - default: - Client::processVerifiedPacket(senderSockAddr, incomingPacket); - break; - } -} - -void RenderingClient::goToLocation(const glm::vec3& newPosition, - bool hasOrientationChange, const glm::quat& newOrientation, - bool shouldFaceLocation) { - qDebug().nospace() << "RenderingClient goToLocation - moving to " << newPosition.x << ", " - << newPosition.y << ", " << newPosition.z; - - glm::vec3 shiftedPosition = newPosition; - - if (hasOrientationChange) { - qDebug().nospace() << "RenderingClient goToLocation - new orientation is " - << newOrientation.x << ", " << newOrientation.y << ", " << newOrientation.z << ", " << newOrientation.w; - - // orient the user to face the target - glm::quat quatOrientation = newOrientation; - - if (shouldFaceLocation) { - - quatOrientation = newOrientation * glm::angleAxis(PI, glm::vec3(0.0f, 1.0f, 0.0f)); - - // move the user a couple units away - const float DISTANCE_TO_USER = 2.0f; - shiftedPosition = newPosition - quatOrientation * glm::vec3( 0.0f, 0.0f,-1.0f) * DISTANCE_TO_USER; - } - - _orientation = quatOrientation; - } - - _position = shiftedPosition; - -} diff --git a/gvr-interface/src/RenderingClient.h b/gvr-interface/src/RenderingClient.h deleted file mode 100644 index c4724bc086..0000000000 --- a/gvr-interface/src/RenderingClient.h +++ /dev/null @@ -1,57 +0,0 @@ -// -// RenderingClient.h -// gvr-interface/src -// -// Created by Stephen Birarda on 1/20/15. -// Copyright 2013 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - - -#ifndef hifi_RenderingClient_h -#define hifi_RenderingClient_h - -#include -#include - -#include - -#include - -#include "Client.h" - -class RenderingClient : public Client { - Q_OBJECT -public: - RenderingClient(QObject* parent = 0, const QString& launchURLString = QString()); - - const glm::vec3& getPosition() const { return _position; } - const glm::quat& getOrientation() const { return _orientation; } - void setOrientation(const glm::quat& orientation) { _orientation = orientation; } - - static glm::vec3 getPositionForAudio() { return _instance->getPosition(); } - static glm::quat getOrientationForAudio() { return _instance->getOrientation(); } - - virtual void cleanupBeforeQuit(); - -private slots: - void goToLocation(const glm::vec3& newPosition, - bool hasOrientationChange, const glm::quat& newOrientation, - bool shouldFaceLocation); - void sendAvatarPacket(); - -private: - virtual void processVerifiedPacket(const HifiSockAddr& senderSockAddr, const QByteArray& incomingPacket); - - static RenderingClient* _instance; - - glm::vec3 _position; - glm::quat _orientation; - - QTimer _avatarTimer; - AvatarData _fakeAvatar; -}; - -#endif // hifi_RenderingClient_h diff --git a/gvr-interface/src/java/io/highfidelity/gvrinterface/InterfaceActivity.java b/gvr-interface/src/java/io/highfidelity/gvrinterface/InterfaceActivity.java deleted file mode 100644 index c7cbdd3dff..0000000000 --- a/gvr-interface/src/java/io/highfidelity/gvrinterface/InterfaceActivity.java +++ /dev/null @@ -1,41 +0,0 @@ -// -// InterfaceActivity.java -// gvr-interface/java -// -// Created by Stephen Birarda on 1/26/15. -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -package io.highfidelity.gvrinterface; - -import android.content.Intent; -import android.net.Uri; -import android.os.Bundle; -import android.view.WindowManager; -import android.util.Log; -import org.qtproject.qt5.android.bindings.QtActivity; - -public class InterfaceActivity extends QtActivity { - - public static native void handleHifiURL(String hifiURLString); - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON); - - // Get the intent that started this activity in case we have a hifi:// URL to parse - Intent intent = getIntent(); - if (intent.getAction() == Intent.ACTION_VIEW) { - Uri data = intent.getData(); - - if (data.getScheme().equals("hifi")) { - handleHifiURL(data.toString()); - } - } - - } -} \ No newline at end of file diff --git a/gvr-interface/src/main.cpp b/gvr-interface/src/main.cpp deleted file mode 100644 index 26576393fb..0000000000 --- a/gvr-interface/src/main.cpp +++ /dev/null @@ -1,28 +0,0 @@ -// -// main.cpp -// gvr-interface/src -// -// Created by Stephen Birarda on 11/17/14. -// Copyright 2014 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -#include "GVRMainWindow.h" -#include "GVRInterface.h" - -int main(int argc, char* argv[]) { - GVRInterface app(argc, argv); - - GVRMainWindow mainWindow; -#ifdef ANDROID - mainWindow.showFullScreen(); -#else - mainWindow.showMaximized(); -#endif - - app.setMainWindow(&mainWindow); - - return app.exec(); -} \ No newline at end of file diff --git a/gvr-interface/templates/InterfaceBetaActivity.java.in b/gvr-interface/templates/InterfaceBetaActivity.java.in deleted file mode 100644 index 6698cfa409..0000000000 --- a/gvr-interface/templates/InterfaceBetaActivity.java.in +++ /dev/null @@ -1,51 +0,0 @@ -// -// InterfaceBetaActivity.java -// gvr-interface/java -// -// Created by Stephen Birarda on 1/27/15. -// Copyright 2015 High Fidelity, Inc. -// -// Distributed under the Apache License, Version 2.0. -// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html -// - -package io.highfidelity.gvrinterface; - -import android.os.Bundle; -import net.hockeyapp.android.CrashManager; -import net.hockeyapp.android.UpdateManager; - -public class InterfaceBetaActivity extends InterfaceActivity { - - public String _hockeyAppID; - - @Override - public void onCreate(Bundle savedInstanceState) { - super.onCreate(savedInstanceState); - - _hockeyAppID = getString(R.string.HockeyAppID); - - checkForUpdates(); - } - - @Override - protected void onPause() { - super.onPause(); - UpdateManager.unregister(); - } - - @Override - protected void onResume() { - super.onResume(); - checkForCrashes(); - } - - private void checkForCrashes() { - CrashManager.register(this, _hockeyAppID); - } - - private void checkForUpdates() { - // Remove this for store / production builds! - UpdateManager.register(this, _hockeyAppID); - } -} \ No newline at end of file diff --git a/gvr-interface/templates/hockeyapp.xml.in b/gvr-interface/templates/hockeyapp.xml.in deleted file mode 100644 index edf2d0a8aa..0000000000 --- a/gvr-interface/templates/hockeyapp.xml.in +++ /dev/null @@ -1,5 +0,0 @@ - - - ${HOCKEY_APP_ID} - ${HOCKEY_APP_ENABLED} -