Merge remote-tracking branch 'upstream/master' into fix/shader_length

This commit is contained in:
Bradley Austin Davis 2018-02-06 15:55:01 -08:00
commit 0455fb37b6
59 changed files with 143 additions and 94 deletions

View file

@ -138,12 +138,15 @@ def scribeLocalFile='scribe' + EXEC_SUFFIX
def scribeFile='scribe_linux_x86_64'
def scribeChecksum='c98678d9726bd8bbf1bab792acf3ff6c'
def scribeVersion='onfeBkJWcJiTwiGOyZPVBjlyhoYQ4Axn'
if (Os.isFamily(Os.FAMILY_MAC)) {
scribeFile = 'scribe_osx_x86_64'
scribeChecksum='a137ad62c1bf7cca739da219544a9a16'
scribeVersion='kU.Aq512HVe65uRnkFEWQEqeQfaYF2c0'
} else if (Os.isFamily(Os.FAMILY_WINDOWS)) {
scribeFile = 'scribe_win32_x86_64.exe'
scribeChecksum='75c2ce9ed45d17de375e3988bfaba816'
scribeVersion='24TfWFh1FBY.t6i_LdzAXZYeQOtmQNZp'
}
def options = [
@ -398,7 +401,7 @@ task copyDependencies(dependsOn: [ extractDependencies ]) {
}
task downloadScribe(type: Download) {
src baseUrl + scribeFile
src baseUrl + scribeFile + '?versionId=' + scribeVersion
dest new File(baseFolder, scribeLocalFile)
onlyIfNewer true
}

View file

@ -1,6 +1,6 @@
set(TARGET_NAME assignment-client)
setup_hifi_project(Core Gui Network Script Quick Widgets WebSockets)
setup_hifi_project(Core Gui Network Script Quick WebSockets)
# Fix up the rpath so macdeployqt works
if (APPLE)

View file

@ -129,6 +129,12 @@ bool AudioMixerSlave::prepareMix(const SharedNodePointer& listener) {
AvatarAudioStream* listenerAudioStream = static_cast<AudioMixerClientData*>(listener->getLinkedData())->getAvatarAudioStream();
AudioMixerClientData* listenerData = static_cast<AudioMixerClientData*>(listener->getLinkedData());
// if we received an invalid position from this listener, then refuse to make them a mix
// because we don't know how to do it properly
if (!listenerAudioStream->hasValidPosition()) {
return false;
}
// zero out the mix for this listener
memset(_mixSamples, 0, sizeof(_mixSamples));
@ -244,12 +250,18 @@ bool AudioMixerSlave::prepareMix(const SharedNodePointer& listener) {
void AudioMixerSlave::throttleStream(AudioMixerClientData& listenerNodeData, const QUuid& sourceNodeID,
const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd) {
addStream(listenerNodeData, sourceNodeID, listeningNodeStream, streamToAdd, true);
// only throttle this stream to the mix if it has a valid position, we won't know how to mix it otherwise
if (streamToAdd.hasValidPosition()) {
addStream(listenerNodeData, sourceNodeID, listeningNodeStream, streamToAdd, true);
}
}
void AudioMixerSlave::mixStream(AudioMixerClientData& listenerNodeData, const QUuid& sourceNodeID,
const AvatarAudioStream& listeningNodeStream, const PositionalAudioStream& streamToAdd) {
addStream(listenerNodeData, sourceNodeID, listeningNodeStream, streamToAdd, false);
// only add the stream to the mix if it has a valid position, we won't know how to mix it otherwise
if (streamToAdd.hasValidPosition()) {
addStream(listenerNodeData, sourceNodeID, listeningNodeStream, streamToAdd, false);
}
}
void AudioMixerSlave::addStream(AudioMixerClientData& listenerNodeData, const QUuid& sourceNodeID,

View file

@ -161,7 +161,7 @@ NodePermissions DomainGatekeeper::setPermissionsForUser(bool isLocalUser, QStrin
} else if (_server->_settingsManager.hasPermissionsForMachineFingerprint(machineFingerprint)) {
userPerms = _server->_settingsManager.getPermissionsForMachineFingerprint(machineFingerprint);
#ifdef WANT_DEBUG
qDebug(() << "| user-permissions: specific Machine Fingerprint matches, so: " << userPerms;
qDebug() << "| user-permissions: specific Machine Fingerprint matches, so: " << userPerms;
#endif
} else if (_server->_settingsManager.hasPermissionsForIP(senderAddress)) {
// this user comes from an IP we have in our permissions table, apply those permissions
@ -187,7 +187,7 @@ NodePermissions DomainGatekeeper::setPermissionsForUser(bool isLocalUser, QStrin
} else if (_server->_settingsManager.hasPermissionsForMachineFingerprint(machineFingerprint)) {
userPerms = _server->_settingsManager.getPermissionsForMachineFingerprint(machineFingerprint);
#ifdef WANT_DEBUG
qDebug(() << "| user-permissions: specific Machine Fingerprint matches, so: " << userPerms;
qDebug() << "| user-permissions: specific Machine Fingerprint matches, so: " << userPerms;
#endif
} else if (_server->_settingsManager.hasPermissionsForIP(senderAddress)) {
// this user comes from an IP we have in our permissions table, apply those permissions
@ -393,9 +393,12 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
QString verifiedUsername; // if this remains empty, consider this an anonymous connection attempt
if (!username.isEmpty()) {
if (usernameSignature.isEmpty()) {
const QUuid& connectionToken = _connectionTokenHash.value(username.toLower());
if (usernameSignature.isEmpty() || connectionToken.isNull()) {
// user is attempting to prove their identity to us, but we don't have enough information
sendConnectionTokenPacket(username, nodeConnection.senderSockAddr);
// ask for their public key right now to make sure we have it
requestUserPublicKey(username, true);
getGroupMemberships(username); // optimistically get started on group memberships

View file

@ -17,9 +17,9 @@ if (ANDROID)
set(BUILD_SHARED_LIBS ON)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${ANDROID_APK_OUTPUT_DIR}/libs/${ANDROID_ABI}")
setup_hifi_library(Gui Widgets AndroidExtras)
setup_hifi_library(Gui AndroidExtras)
else ()
setup_hifi_project(Gui Widgets)
setup_hifi_project(Gui)
endif ()
include_directories(${Qt5Gui_PRIVATE_INCLUDE_DIRS})

View file

@ -78,7 +78,7 @@ endif ()
find_package(
Qt5 COMPONENTS
Gui Multimedia Network OpenGL Qml Quick Script Svg
Gui Widgets Multimedia Network Qml Quick Script Svg
${PLATFORM_QT_COMPONENTS}
WebChannel WebSockets
)
@ -269,7 +269,7 @@ endif ()
target_link_libraries(
${TARGET_NAME}
Qt5::Gui Qt5::Network Qt5::Multimedia Qt5::OpenGL
Qt5::Gui Qt5::Network Qt5::Multimedia Qt5::Widgets
Qt5::Qml Qt5::Quick Qt5::Script Qt5::Svg
Qt5::WebChannel
${PLATFORM_QT_LIBRARIES}

View file

@ -1046,7 +1046,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
connect(nodeList.data(), &NodeList::packetVersionMismatch, this, &Application::notifyPacketVersionMismatch);
// you might think we could just do this in NodeList but we only want this connection for Interface
connect(nodeList.data(), &NodeList::limitOfSilentDomainCheckInsReached, nodeList.data(), &NodeList::reset);
connect(&nodeList->getDomainHandler(), SIGNAL(limitOfSilentDomainCheckInsReached()),
nodeList.data(), SLOT(reset()));
auto dialogsManager = DependencyManager::get<DialogsManager>();
connect(accountManager.data(), &AccountManager::authRequired, dialogsManager.data(), &DialogsManager::showLoginDialog);

View file

@ -396,11 +396,11 @@ QString WindowScriptingInterface::protocolSignature() {
}
int WindowScriptingInterface::getInnerWidth() {
return qApp->getDeviceSize().x;
return qApp->getWindow()->geometry().width();
}
int WindowScriptingInterface::getInnerHeight() {
return qApp->getDeviceSize().y;
return qApp->getWindow()->geometry().height() - qApp->getPrimaryMenu()->geometry().height();
}
glm::vec2 WindowScriptingInterface::getDeviceSize() const {

View file

@ -1754,7 +1754,6 @@ void Rig::copyJointsFromJointData(const QVector<JointData>& jointDataVec) {
const AnimPoseVec& relativeDefaultPoses = _animSkeleton->getRelativeDefaultPoses();
for (int i = 0; i < numJoints; i++) {
const JointData& data = jointDataVec.at(i);
_internalPoseSet._relativePoses[i].scale() = Vectors::ONE;
_internalPoseSet._relativePoses[i].rot() = rotations[i];
if (data.translationIsDefaultPose) {
_internalPoseSet._relativePoses[i].trans() = relativeDefaultPoses[i].trans();

View file

@ -49,6 +49,9 @@ void AbstractAudioInterface::emitAudioPacket(const void* audioData, size_t bytes
audioPacket->writePrimitive(channelFlag);
}
// at this point we'd better be sending the mixer a valid position, or it won't consider us for mixing
assert(!isNaN(transform.getTranslation()));
// pack the three float positions
audioPacket->writePrimitive(transform.getTranslation());
// pack the orientation

View file

@ -17,6 +17,7 @@
#include <glm/detail/func_common.hpp>
#include <QtCore/QDataStream>
#include <LogHandler.h>
#include <Node.h>
#include <udt/PacketHeaders.h>
#include <UUID.h>
@ -76,6 +77,19 @@ int PositionalAudioStream::parsePositionalData(const QByteArray& positionalByteA
QDataStream packetStream(positionalByteArray);
packetStream.readRawData(reinterpret_cast<char*>(&_position), sizeof(_position));
// if the client sends us a bad position, flag it so that we don't consider this stream for mixing
if (glm::isnan(_position.x) || glm::isnan(_position.y) || glm::isnan(_position.z)) {
static const QString INVALID_POSITION_REGEX = "PositionalAudioStream unpacked invalid position for node";
static QString repeatedMessage = LogHandler::getInstance().addRepeatedMessageRegex(INVALID_POSITION_REGEX);
qDebug() << "PositionalAudioStream unpacked invalid position for node" << uuidStringWithoutCurlyBraces(getNodeID());
_hasValidPosition = false;
} else {
_hasValidPosition = true;
}
packetStream.readRawData(reinterpret_cast<char*>(&_orientation), sizeof(_orientation));
packetStream.readRawData(reinterpret_cast<char*>(&_avatarBoundingBoxCorner), sizeof(_avatarBoundingBoxCorner));
packetStream.readRawData(reinterpret_cast<char*>(&_avatarBoundingBoxScale), sizeof(_avatarBoundingBoxScale));

View file

@ -43,12 +43,15 @@ public:
bool shouldLoopbackForNode() const { return _shouldLoopbackForNode; }
bool isStereo() const { return _isStereo; }
PositionalAudioStream::Type getType() const { return _type; }
const glm::vec3& getPosition() const { return _position; }
const glm::quat& getOrientation() const { return _orientation; }
const glm::vec3& getAvatarBoundingBoxCorner() const { return _avatarBoundingBoxCorner; }
const glm::vec3& getAvatarBoundingBoxScale() const { return _avatarBoundingBoxScale; }
bool hasValidPosition() const { return _hasValidPosition; }
protected:
// disallow copying of PositionalAudioStream objects
@ -75,6 +78,8 @@ protected:
float _quietestTrailingFrameLoudness;
float _quietestFrameLoudness;
int _frameCounter;
bool _hasValidPosition { false };
};
#endif // hifi_PositionalAudioStream_h

View file

@ -1,6 +1,6 @@
set(TARGET_NAME avatars-renderer)
AUTOSCRIBE_SHADER_LIB(gpu graphics render render-utils)
setup_hifi_library(Widgets Network Script)
setup_hifi_library(Network Script)
link_hifi_libraries(shared gpu graphics animation model-networking script-engine render render-utils image trackers entities-renderer)
include_hifi_library_headers(avatars)
include_hifi_library_headers(networking)

View file

@ -1,6 +1,6 @@
set(TARGET_NAME display-plugins)
AUTOSCRIBE_SHADER_LIB(gpu display-plugins)
setup_hifi_library(OpenGL)
setup_hifi_library(Gui)
link_hifi_libraries(shared plugins ui-plugins gl ui render-utils ${PLATFORM_GL_BACKEND})
include_hifi_library_headers(gpu)
include_hifi_library_headers(model-networking)

View file

@ -1,6 +1,6 @@
set(TARGET_NAME entities-renderer)
AUTOSCRIBE_SHADER_LIB(gpu graphics procedural render render-utils)
setup_hifi_library(Widgets Network Script)
setup_hifi_library(Network Script)
link_hifi_libraries(shared gpu procedural graphics model-networking script-engine render render-utils image ui pointers)
include_hifi_library_headers(networking)
include_hifi_library_headers(gl)

View file

@ -165,7 +165,7 @@ public:
PolyVoxEntityRenderer(const EntityItemPointer& entity);
protected:
virtual ItemKey getKey() override { return ItemKey::Builder::opaqueShape(); }
virtual ItemKey getKey() override { return ItemKey::Builder::opaqueShape().withTagBits(render::ItemKey::TAG_BITS_0 | render::ItemKey::TAG_BITS_1); }
virtual ShapeKey getShapeKey() override;
virtual bool needsRenderUpdateFromTypedEntity(const TypedEntityPointer& entity) const override;
virtual void doRenderUpdateSynchronousTyped(const ScenePointer& scene, Transaction& transaction, const TypedEntityPointer& entity) override;

View file

@ -1,5 +1,5 @@
set(TARGET_NAME gl)
setup_hifi_library(OpenGL Qml Quick)
setup_hifi_library(Gui Widgets Qml Quick)
link_hifi_libraries(shared)
target_opengl()

View file

@ -1,5 +1,5 @@
set(TARGET_NAME gpu-gles)
setup_hifi_library(Concurrent)
setup_hifi_library(Gui Concurrent)
link_hifi_libraries(shared gl gpu)
GroupSources("src")
target_opengl()

View file

@ -16,7 +16,7 @@
#include <memory>
#include <set>
#include <map>
#include <functional>
#include <QUrl>
namespace gpu {

View file

@ -9,7 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <QApplication>
#include <QGuiApplication>
#include <QClipboard>
#include <QDebug>
#include <QJsonDocument>
@ -764,7 +764,7 @@ void AddressManager::copyAddress() {
}
// assume that the address is being copied because the user wants a shareable address
QApplication::clipboard()->setText(currentShareableAddress().toString());
QGuiApplication::clipboard()->setText(currentShareableAddress().toString());
}
void AddressManager::copyPath() {
@ -773,7 +773,7 @@ void AddressManager::copyPath() {
return;
}
QApplication::clipboard()->setText(currentPath());
QGuiApplication::clipboard()->setText(currentPath());
}
QString AddressManager::getDomainID() const {

View file

@ -98,6 +98,7 @@ void DomainHandler::softReset() {
clearSettings();
_connectionDenialsSinceKeypairRegen = 0;
_checkInPacketsSinceLastReply = 0;
// cancel the failure timeout for any pending requests for settings
QMetaObject::invokeMethod(&_settingsTimer, "stop");
@ -382,6 +383,9 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer<Rec
// we're hearing from this domain-server, don't need to refresh API info
_apiRefreshTimer.stop();
// this counts as a reply from the DS after a check in or connect packet, so reset that counter now
_checkInPacketsSinceLastReply = 0;
// Read deny reason from packet
uint8_t reasonCodeWire;
@ -426,3 +430,14 @@ void DomainHandler::processDomainServerConnectionDeniedPacket(QSharedPointer<Rec
}
}
}
void DomainHandler::sentCheckInPacket() {
++_checkInPacketsSinceLastReply;
if (_checkInPacketsSinceLastReply >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
// we haven't heard back from DS in MAX_SILENT_DOMAIN_SERVER_CHECK_INS
// so emit our signal that says that
qCDebug(networking) << "Limit of silent domain checkins reached";
emit limitOfSilentDomainCheckInsReached();
}
}

View file

@ -31,6 +31,8 @@ const unsigned short DEFAULT_DOMAIN_SERVER_DTLS_PORT = 40103;
const quint16 DOMAIN_SERVER_HTTP_PORT = 40100;
const quint16 DOMAIN_SERVER_HTTPS_PORT = 40101;
const int MAX_SILENT_DOMAIN_SERVER_CHECK_INS = 5;
class DomainHandler : public QObject {
Q_OBJECT
public:
@ -84,6 +86,10 @@ public:
void softReset();
int getCheckInPacketsSinceLastReply() const { return _checkInPacketsSinceLastReply; }
void sentCheckInPacket();
void domainListReceived() { _checkInPacketsSinceLastReply = 0; }
/**jsdoc
* <p>The reasons that you may be refused connection to a domain are defined by numeric values:</p>
* <table>
@ -165,6 +171,8 @@ signals:
void domainConnectionRefused(QString reasonMessage, int reason, const QString& extraInfo);
void limitOfSilentDomainCheckInsReached();
private:
bool reasonSuggestsLogin(ConnectionRefusedReason reasonCode);
void sendDisconnectPacket();
@ -187,6 +195,7 @@ private:
QSet<QString> _domainConnectionRefusals;
bool _hasCheckedForAccessToken { false };
int _connectionDenialsSinceKeypairRegen { 0 };
int _checkInPacketsSinceLastReply { 0 };
QTimer _apiRefreshTimer;
};

View file

@ -44,7 +44,6 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
_ownerType(newOwnerType),
_nodeTypesOfInterest(),
_domainHandler(this),
_numNoReplyDomainCheckIns(0),
_assignmentServerSocket(),
_keepAlivePingTimer(this)
{
@ -75,7 +74,7 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
connect(this, &LimitedNodeList::publicSockAddrChanged, this, &NodeList::sendDomainServerCheckIn);
// clear our NodeList when the domain changes
connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, this, &NodeList::reset);
connect(&_domainHandler, SIGNAL(disconnectedFromDomain()), this, SLOT(resetFromDomainHandler()));
// send an ICE heartbeat as soon as we get ice server information
connect(&_domainHandler, &DomainHandler::iceSocketAndIDReceived, this, &NodeList::handleICEConnectionToDomainServer);
@ -92,10 +91,10 @@ NodeList::NodeList(char newOwnerType, int socketListenPort, int dtlsListenPort)
connect(accountManager.data(), &AccountManager::newKeypair, this, &NodeList::sendDomainServerCheckIn);
// clear out NodeList when login is finished
connect(accountManager.data(), &AccountManager::loginComplete , this, &NodeList::reset);
connect(accountManager.data(), SIGNAL(loginComplete()) , this, SLOT(reset()));
// clear our NodeList when logout is requested
connect(accountManager.data(), &AccountManager::logoutComplete , this, &NodeList::reset);
connect(accountManager.data(), SIGNAL(logoutComplete()) , this, SLOT(reset()));
// anytime we get a new node we will want to attempt to punch to it
connect(this, &LimitedNodeList::nodeAdded, this, &NodeList::startNodeHolePunch);
@ -231,16 +230,14 @@ void NodeList::processICEPingPacket(QSharedPointer<ReceivedMessage> message) {
sendPacket(std::move(replyPacket), message->getSenderSockAddr());
}
void NodeList::reset() {
void NodeList::reset(bool skipDomainHandlerReset) {
if (thread() != QThread::currentThread()) {
QMetaObject::invokeMethod(this, "reset");
QMetaObject::invokeMethod(this, "reset", Q_ARG(bool, skipDomainHandlerReset));
return;
}
LimitedNodeList::reset();
_numNoReplyDomainCheckIns = 0;
// lock and clear our set of ignored IDs
_ignoredSetLock.lockForWrite();
_ignoredNodeIDs.clear();
@ -255,7 +252,7 @@ void NodeList::reset() {
_avatarGainMap.clear();
_avatarGainMapLock.unlock();
if (sender() != &_domainHandler) {
if (!skipDomainHandlerReset) {
// clear the domain connection information, unless they're the ones that asked us to reset
_domainHandler.softReset();
}
@ -410,15 +407,8 @@ void NodeList::sendDomainServerCheckIn() {
sendPacket(std::move(domainPacket), _domainHandler.getSockAddr());
if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
// we haven't heard back from DS in MAX_SILENT_DOMAIN_SERVER_CHECK_INS
// so emit our signal that says that
qCDebug(networking) << "Limit of silent domain checkins reached";
emit limitOfSilentDomainCheckInsReached();
}
// increment the count of un-replied check-ins
_numNoReplyDomainCheckIns++;
// let the domain handler know we sent another check in or connect packet
_domainHandler.sentCheckInPacket();
}
}
@ -585,7 +575,7 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
}
// this is a packet from the domain server, reset the count of un-replied check-ins
_numNoReplyDomainCheckIns = 0;
_domainHandler.domainListReceived();
// emit our signal so listeners know we just heard from the DS
emit receivedDomainServerList();

View file

@ -38,8 +38,6 @@
const quint64 DOMAIN_SERVER_CHECK_IN_MSECS = 1 * 1000;
const int MAX_SILENT_DOMAIN_SERVER_CHECK_INS = 5;
using PacketOrPacketList = std::pair<std::unique_ptr<NLPacket>, std::unique_ptr<NLPacketList>>;
using NodePacketOrPacketListPair = std::pair<SharedNodePointer, PacketOrPacketList>;
@ -62,7 +60,6 @@ public:
Q_INVOKABLE qint64 sendStats(QJsonObject statsObject, HifiSockAddr destination);
Q_INVOKABLE qint64 sendStatsToDomainServer(QJsonObject statsObject);
int getNumNoReplyDomainCheckIns() const { return _numNoReplyDomainCheckIns; }
DomainHandler& getDomainHandler() { return _domainHandler; }
const NodeSet& getNodeInterestSet() const { return _nodeTypesOfInterest; }
@ -96,7 +93,9 @@ public:
void removeFromIgnoreMuteSets(const QUuid& nodeID);
public slots:
void reset();
void reset(bool skipDomainHandlerReset = false);
void resetFromDomainHandler() { reset(true); }
void sendDomainServerCheckIn();
void handleDSPathQuery(const QString& newPath);
@ -119,7 +118,6 @@ public slots:
#endif
signals:
void limitOfSilentDomainCheckInsReached();
void receivedDomainServerList();
void ignoredNode(const QUuid& nodeID, bool enabled);
void ignoreRadiusEnabledChanged(bool isIgnored);
@ -161,7 +159,6 @@ private:
std::atomic<NodeType_t> _ownerType;
NodeSet _nodeTypesOfInterest;
DomainHandler _domainHandler;
int _numNoReplyDomainCheckIns;
HifiSockAddr _assignmentServerSocket;
bool _isShuttingDown { false };
QTimer _keepAlivePingTimer;

View file

@ -38,7 +38,7 @@ PacketVersion versionForPacketType(PacketType packetType) {
case PacketType::AvatarData:
case PacketType::BulkAvatarData:
case PacketType::KillAvatar:
return static_cast<PacketVersion>(AvatarMixerPacketVersion::AvatarJointDefaultPoseFlags);
return static_cast<PacketVersion>(AvatarMixerPacketVersion::FBXReaderNodeReparenting);
case PacketType::MessagesData:
return static_cast<PacketVersion>(MessageDataVersion::TextOrBinaryData);
case PacketType::ICEServerHeartbeat:

View file

@ -128,15 +128,13 @@ bool ObjectActionTractor::prepareForTractorUpdate(btScalar deltaTimeStep) {
position /= linearTractorCount;
if (_positionalTargetSet) {
_lastPositionTarget = _positionalTarget;
} else {
_lastPositionTarget = position;
}
_positionalTarget = position;
if (deltaTimeStep > EPSILON) {
// blend the new velocity with the old (low-pass filter)
glm::vec3 newVelocity = (1.0f / deltaTimeStep) * (position - _lastPositionTarget);
const float blend = 0.25f;
_linearVelocityTarget = (1.0f - blend) * _linearVelocityTarget + blend * newVelocity;
_positionalTarget = position;
if (deltaTimeStep > EPSILON) {
// blend the new velocity with the old (low-pass filter)
glm::vec3 newVelocity = (1.0f / deltaTimeStep) * (_positionalTarget - _lastPositionTarget);
const float blend = 0.25f;
_linearVelocityTarget = (1.0f - blend) * _linearVelocityTarget + blend * newVelocity;
}
}
_positionalTargetSet = true;
_active = true;

View file

@ -1,4 +1,4 @@
set(TARGET_NAME plugins)
setup_hifi_library(OpenGL)
setup_hifi_library(Gui)
link_hifi_libraries(shared networking)
include_hifi_library_headers(gpu)

View file

@ -2,7 +2,7 @@ set(TARGET_NAME render-utils)
AUTOSCRIBE_SHADER_LIB(gpu graphics render)
# pull in the resources.qrc file
qt5_add_resources(QT_RESOURCES_FILE "${CMAKE_CURRENT_SOURCE_DIR}/res/fonts/fonts.qrc")
setup_hifi_library(Widgets OpenGL Network Qml Quick Script)
setup_hifi_library(Gui Network Qml Quick Script)
link_hifi_libraries(shared ktx gpu graphics model-networking render animation fbx image procedural)
include_hifi_library_headers(networking)
include_hifi_library_headers(octree)

View file

@ -1,4 +1,5 @@
set(TARGET_NAME script-engine)
# FIXME Move undo scripting interface to application and remove Widgets
setup_hifi_library(Gui Network Script ScriptTools WebSockets Widgets)
target_zlib()

View file

@ -1,7 +1,7 @@
set(TARGET_NAME shared)
# TODO: there isn't really a good reason to have Script linked here - let's get what is requiring it out (RegisteredMetaTypes.cpp)
setup_hifi_library(Gui Network Script Widgets)
setup_hifi_library(Gui Network Script)
if (WIN32)
target_link_libraries(${TARGET_NAME} Wbemuuid.lib)

View file

@ -9,7 +9,6 @@
#include "EyeTracker.h"
#include <QFuture>
#include <QMessageBox>
#include <QtConcurrent/QtConcurrentRun>
#include <SharedUtil.h>

View file

@ -1,4 +1,4 @@
set(TARGET_NAME ui-plugins)
setup_hifi_library(OpenGL)
setup_hifi_library(Gui)
link_hifi_libraries(shared plugins ui)
include_hifi_library_headers(gpu)

View file

@ -1,5 +1,5 @@
set(TARGET_NAME ui)
setup_hifi_library(OpenGL Multimedia Network Qml Quick Script WebChannel WebSockets XmlPatterns ${PLATFORM_QT_COMPONENTS})
setup_hifi_library(Widgets Multimedia Network Qml Quick Script WebChannel WebSockets XmlPatterns ${PLATFORM_QT_COMPONENTS})
link_hifi_libraries(shared networking gl audio audio-client plugins pointers)
include_hifi_library_headers(controllers)

View file

@ -9,12 +9,11 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <qapplication.h>
#include "HiFiCodec.h"
#include <AudioCodec.h>
#include <AudioConstants.h>
#include "HiFiCodec.h"
const char* HiFiCodec::NAME { "hifiAC" };

View file

@ -10,7 +10,7 @@ if (WIN32)
find_package(KINECT)
if (KINECT_FOUND)
set(TARGET_NAME hifiKinect)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared controllers ui plugins input-plugins display-plugins)
# need to setup appropriate externals...

View file

@ -9,7 +9,7 @@
find_package(LEAPMOTION)
if (LEAPMOTION_FOUND)
set(TARGET_NAME hifiLeapMotion)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared controllers ui plugins input-plugins)
target_leapmotion()
endif()

View file

@ -9,7 +9,7 @@
if (APPLE OR WIN32)
set(TARGET_NAME hifiNeuron)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared controllers ui plugins input-plugins)
target_neuron()

View file

@ -7,6 +7,6 @@
#
set(TARGET_NAME hifiSdl2)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared controllers ui plugins input-plugins script-engine)
target_sdl2()

View file

@ -9,14 +9,15 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <qapplication.h>
#include "SDL2Manager.h"
#include <QtCore/QCoreApplication>
#include <controllers/UserInputMapper.h>
#include <PerfStat.h>
#include <Preferences.h>
#include <SettingHandle.h>
#include "SDL2Manager.h"
static_assert(
(int)controller::A == (int)SDL_CONTROLLER_BUTTON_A &&

View file

@ -12,7 +12,7 @@
# the msvcr100 runtime support, the plugin will not load.
if (NOT ANDROID)
set(TARGET_NAME hifiSixense)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared controllers ui plugins ui-plugins input-plugins)
target_sixense()
if (WIN32)

View file

@ -10,7 +10,7 @@ if(WIN32)
set(TARGET_NAME hifiSpacemouse)
find_package(3DCONNEXIONCLIENT)
if (3DCONNEXIONCLIENT_FOUND)
setup_hifi_plugin(Script Qml Widgets)
setup_hifi_plugin(Qml)
link_hifi_libraries(shared networking controllers ui plugins input-plugins)
target_include_directories(${TARGET_NAME} PUBLIC ${3DCONNEXIONCLIENT_INCLUDE_DIRS})
target_link_libraries(${TARGET_NAME} ${3DCONNEXIONCLIENT_LIBRARIES})

View file

@ -10,7 +10,7 @@ if (WIN32 AND (NOT USE_GLES))
# we're using static GLEW, so define GLEW_STATIC
add_definitions(-DGLEW_STATIC)
set(TARGET_NAME openvr)
setup_hifi_plugin(OpenGL Script Qml Widgets Multimedia)
setup_hifi_plugin(Gui Qml Multimedia)
link_hifi_libraries(shared gl networking controllers ui
plugins display-plugins ui-plugins input-plugins script-engine
audio-client render-utils graphics gpu render model-networking fbx ktx image procedural ${PLATFORM_GL_BACKEND})

View file

@ -9,7 +9,7 @@
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
//
#include <qapplication.h>
#include <QtCore/QCoreApplication>
#include <PerfStat.h>

View file

@ -411,7 +411,7 @@ Script.include("/~/system/libraries/controllers.js");
var data = parseJSON(props.userData);
if (data !== undefined && data.seat !== undefined) {
var avatarUuid = Uuid.fromString(data.seat.user);
if (Uuid.isNull(avatarUuid) || !AvatarList.getAvatar(avatarUuid)) {
if (Uuid.isNull(avatarUuid) || !AvatarList.getAvatar(avatarUuid).sessionUUID) {
return TARGET.SEAT;
} else {
return TARGET.INVALID;

View file

@ -1,7 +1,7 @@
set(TARGET_NAME gpu-test)
AUTOSCRIBE_SHADER_LIB(gpu graphics render-utils)
# This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL Script Widgets)
setup_hifi_project(Quick Gui Script)
setup_memory_debugger()
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
link_hifi_libraries(

View file

@ -8,7 +8,7 @@ endif()
setup_memory_debugger()
# This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL)
setup_hifi_project(Quick Gui)
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
# link in the shared libraries

View file

@ -8,7 +8,7 @@ endif()
setup_memory_debugger()
# This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL)
setup_hifi_project(Quick Gui)
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
# link in the shared libraries

View file

@ -2,7 +2,7 @@
set(TARGET_NAME render-utils-test)
# This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL)
setup_hifi_project(Quick Gui)
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
setup_memory_debugger()

View file

@ -2,7 +2,7 @@
set(TARGET_NAME shaders-test)
# This is not a testcase -- just set it up as a regular hifi project
setup_hifi_project(Quick Gui OpenGL)
setup_hifi_project(Quick Gui)
set_target_properties(${TARGET_NAME} PROPERTIES FOLDER "Tests/manual-tests/")
setup_memory_debugger()

View file

@ -1,4 +1,4 @@
set(TARGET_NAME ac-client)
setup_hifi_project(Core Widgets)
setup_hifi_project(Core)
setup_memory_debugger()
link_hifi_libraries(shared networking)

View file

@ -13,7 +13,7 @@
#ifndef hifi_ACClientApp_h
#define hifi_ACClientApp_h
#include <QApplication>
#include <QCoreApplication>
#include <udt/Constants.h>
#include <udt/Socket.h>
#include <ReceivedMessage.h>

View file

@ -1,4 +1,4 @@
set(TARGET_NAME atp-client)
setup_hifi_project(Core Widgets)
setup_hifi_project(Core)
setup_memory_debugger()
link_hifi_libraries(shared networking)

View file

@ -13,7 +13,7 @@
#ifndef hifi_ATPClientApp_h
#define hifi_ATPClientApp_h
#include <QApplication>
#include <QCoreApplication>
#include <udt/Constants.h>
#include <udt/Socket.h>
#include <ReceivedMessage.h>

View file

@ -1,4 +1,4 @@
set(TARGET_NAME ice-client)
setup_hifi_project(Core Widgets)
setup_hifi_project(Core)
setup_memory_debugger()
link_hifi_libraries(shared networking)

View file

@ -13,7 +13,7 @@
#ifndef hifi_ICEClientApp_h
#define hifi_ICEClientApp_h
#include <QApplication>
#include <QCoreApplication>
#include <udt/Constants.h>
#include <udt/Socket.h>
#include <ReceivedMessage.h>

View file

@ -1,5 +1,5 @@
set(TARGET_NAME skeleton-dump)
setup_hifi_project(Core Widgets)
setup_hifi_project(Core)
setup_memory_debugger()
link_hifi_libraries(shared fbx graphics gpu gl animation)

View file

@ -12,7 +12,7 @@
#ifndef hifi_SkeletonDumpApp_h
#define hifi_SkeletonDumpApp_h
#include <QApplication>
#include <QCoreApplication>
class SkeletonDumpApp : public QCoreApplication {
Q_OBJECT

View file

@ -1,5 +1,5 @@
set(TARGET_NAME vhacd-util)
setup_hifi_project(Core Widgets)
setup_hifi_project(Core)
link_hifi_libraries(shared fbx graphics gpu gl)
add_dependency_external_projects(vhacd)

View file

@ -13,7 +13,7 @@
#ifndef hifi_VHACDUtilApp_h
#define hifi_VHACDUtilApp_h
#include <QApplication>
#include <QCoreApplication>
#include <FBXReader.h>