mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 19:16:56 +02:00
Merge remote-tracking branch 'upstream/master' into android_new_login
This commit is contained in:
commit
9b63b76b68
295 changed files with 1306 additions and 822 deletions
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AssignmentClient.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include <QProcess>
|
#include <QProcess>
|
||||||
|
@ -32,16 +34,14 @@
|
||||||
#include <SoundCache.h>
|
#include <SoundCache.h>
|
||||||
#include <ResourceScriptingInterface.h>
|
#include <ResourceScriptingInterface.h>
|
||||||
#include <UserActivityLoggerScriptingInterface.h>
|
#include <UserActivityLoggerScriptingInterface.h>
|
||||||
|
|
||||||
#include "AssignmentFactory.h"
|
|
||||||
#include "AssignmentDynamicFactory.h"
|
|
||||||
|
|
||||||
#include "AssignmentClient.h"
|
|
||||||
#include "AssignmentClientLogging.h"
|
|
||||||
#include "avatars/ScriptableAvatar.h"
|
|
||||||
#include <Trace.h>
|
#include <Trace.h>
|
||||||
#include <StatTracker.h>
|
#include <StatTracker.h>
|
||||||
|
|
||||||
|
#include "AssignmentClientLogging.h"
|
||||||
|
#include "AssignmentDynamicFactory.h"
|
||||||
|
#include "AssignmentFactory.h"
|
||||||
|
#include "avatars/ScriptableAvatar.h"
|
||||||
|
|
||||||
const QString ASSIGNMENT_CLIENT_TARGET_NAME = "assignment-client";
|
const QString ASSIGNMENT_CLIENT_TARGET_NAME = "assignment-client";
|
||||||
const long long ASSIGNMENT_REQUEST_INTERVAL_MSECS = 1 * 1000;
|
const long long ASSIGNMENT_REQUEST_INTERVAL_MSECS = 1 * 1000;
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AssignmentClientMonitor.h"
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
|
||||||
|
@ -19,7 +21,6 @@
|
||||||
#include <LogHandler.h>
|
#include <LogHandler.h>
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
|
||||||
#include "AssignmentClientMonitor.h"
|
|
||||||
#include "AssignmentClientApp.h"
|
#include "AssignmentClientApp.h"
|
||||||
#include "AssignmentClientChildData.h"
|
#include "AssignmentClientChildData.h"
|
||||||
#include "SharedUtil.h"
|
#include "SharedUtil.h"
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "EntitySimulation.h"
|
|
||||||
|
|
||||||
#include "AssignmentDynamic.h"
|
#include "AssignmentDynamic.h"
|
||||||
|
|
||||||
|
#include "EntitySimulation.h"
|
||||||
|
|
||||||
AssignmentDynamic::AssignmentDynamic(EntityDynamicType type, const QUuid& id, EntityItemPointer ownerEntity) :
|
AssignmentDynamic::AssignmentDynamic(EntityDynamicType type, const QUuid& id, EntityItemPointer ownerEntity) :
|
||||||
EntityDynamicInterface(type, id),
|
EntityDynamicInterface(type, id),
|
||||||
_data(QByteArray()),
|
_data(QByteArray()),
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AssignmentFactory.h"
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
|
||||||
#include "Agent.h"
|
#include "Agent.h"
|
||||||
#include "assets/AssetServer.h"
|
#include "assets/AssetServer.h"
|
||||||
#include "AssignmentFactory.h"
|
|
||||||
#include "audio/AudioMixer.h"
|
#include "audio/AudioMixer.h"
|
||||||
#include "avatars/AvatarMixer.h"
|
#include "avatars/AvatarMixer.h"
|
||||||
#include "entities/EntityServer.h"
|
#include "entities/EntityServer.h"
|
||||||
|
|
|
@ -36,10 +36,11 @@ enum class BakedAssetType : int {
|
||||||
Undefined
|
Undefined
|
||||||
};
|
};
|
||||||
|
|
||||||
// ATTENTION! If you change the current version for an asset type, you will also
|
// ATTENTION! Do not remove baking versions, and do not reorder them. If you add
|
||||||
// need to update the function currentBakeVersionForAssetType() inside of AssetServer.cpp.
|
// a new value, it will immediately become the "current" version.
|
||||||
enum class ModelBakeVersion : BakeVersion {
|
enum class ModelBakeVersion : BakeVersion {
|
||||||
Initial = INITIAL_BAKE_VERSION,
|
Initial = INITIAL_BAKE_VERSION,
|
||||||
|
MetaTextureJson,
|
||||||
|
|
||||||
COUNT
|
COUNT
|
||||||
};
|
};
|
||||||
|
@ -47,6 +48,7 @@ enum class ModelBakeVersion : BakeVersion {
|
||||||
// ATTENTION! See above.
|
// ATTENTION! See above.
|
||||||
enum class TextureBakeVersion : BakeVersion {
|
enum class TextureBakeVersion : BakeVersion {
|
||||||
Initial = INITIAL_BAKE_VERSION,
|
Initial = INITIAL_BAKE_VERSION,
|
||||||
|
MetaTextureJson,
|
||||||
|
|
||||||
COUNT
|
COUNT
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioMixerSlavePool.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "AudioMixerSlavePool.h"
|
|
||||||
|
|
||||||
void AudioMixerSlaveThread::run() {
|
void AudioMixerSlaveThread::run() {
|
||||||
while (true) {
|
while (true) {
|
||||||
wait();
|
wait();
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarAudioStream.h"
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
#include "AvatarAudioStream.h"
|
|
||||||
|
|
||||||
AvatarAudioStream::AvatarAudioStream(bool isStereo, int numStaticJitterFrames) :
|
AvatarAudioStream::AvatarAudioStream(bool isStereo, int numStaticJitterFrames) :
|
||||||
PositionalAudioStream(PositionalAudioStream::Microphone, isStereo, numStaticJitterFrames) {}
|
PositionalAudioStream(PositionalAudioStream::Microphone, isStereo, numStaticJitterFrames) {}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarMixer.h"
|
||||||
|
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
@ -31,8 +33,6 @@
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
#include <TryLocker.h>
|
#include <TryLocker.h>
|
||||||
|
|
||||||
#include "AvatarMixer.h"
|
|
||||||
|
|
||||||
const QString AVATAR_MIXER_LOGGING_NAME = "avatar-mixer";
|
const QString AVATAR_MIXER_LOGGING_NAME = "avatar-mixer";
|
||||||
|
|
||||||
// FIXME - what we'd actually like to do is send to users at ~50% of their present rate down to 30hz. Assume 90 for now.
|
// FIXME - what we'd actually like to do is send to users at ~50% of their present rate down to 30hz. Assume 90 for now.
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarMixerClientData.h"
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
|
|
||||||
#include "AvatarMixerClientData.h"
|
|
||||||
|
|
||||||
AvatarMixerClientData::AvatarMixerClientData(const QUuid& nodeID) :
|
AvatarMixerClientData::AvatarMixerClientData(const QUuid& nodeID) :
|
||||||
NodeData(nodeID)
|
NodeData(nodeID)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarMixerSlave.h"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <random>
|
#include <random>
|
||||||
|
|
||||||
|
@ -28,10 +30,8 @@
|
||||||
#include <StDev.h>
|
#include <StDev.h>
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
|
|
||||||
#include "AvatarMixer.h"
|
#include "AvatarMixer.h"
|
||||||
#include "AvatarMixerClientData.h"
|
#include "AvatarMixerClientData.h"
|
||||||
#include "AvatarMixerSlave.h"
|
|
||||||
|
|
||||||
void AvatarMixerSlave::configure(ConstIter begin, ConstIter end) {
|
void AvatarMixerSlave::configure(ConstIter begin, ConstIter end) {
|
||||||
_begin = begin;
|
_begin = begin;
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#ifndef hifi_AvatarMixerSlave_h
|
#ifndef hifi_AvatarMixerSlave_h
|
||||||
#define hifi_AvatarMixerSlave_h
|
#define hifi_AvatarMixerSlave_h
|
||||||
|
|
||||||
|
#include <NodeList.h>
|
||||||
|
|
||||||
class AvatarMixerClientData;
|
class AvatarMixerClientData;
|
||||||
|
|
||||||
class AvatarMixerSlaveStats {
|
class AvatarMixerSlaveStats {
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarMixerSlavePool.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include "AvatarMixerSlavePool.h"
|
|
||||||
|
|
||||||
void AvatarMixerSlaveThread::run() {
|
void AvatarMixerSlaveThread::run() {
|
||||||
while (true) {
|
while (true) {
|
||||||
wait();
|
wait();
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ScriptableAvatar.h"
|
||||||
|
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <glm/gtx/transform.hpp>
|
#include <glm/gtx/transform.hpp>
|
||||||
|
@ -16,7 +18,6 @@
|
||||||
#include <shared/QtHelpers.h>
|
#include <shared/QtHelpers.h>
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
#include <AnimUtil.h>
|
#include <AnimUtil.h>
|
||||||
#include "ScriptableAvatar.h"
|
|
||||||
|
|
||||||
|
|
||||||
QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) {
|
QByteArray ScriptableAvatar::toByteArrayStateful(AvatarDataDetail dataDetail, bool dropFaceTracking) {
|
||||||
|
|
|
@ -9,21 +9,23 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "EntityServer.h"
|
||||||
|
|
||||||
#include <QtCore/QEventLoop>
|
#include <QtCore/QEventLoop>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
#include <QJsonArray>
|
||||||
|
#include <QJsonDocument>
|
||||||
|
|
||||||
#include <EntityTree.h>
|
#include <EntityTree.h>
|
||||||
#include <SimpleEntitySimulation.h>
|
#include <SimpleEntitySimulation.h>
|
||||||
#include <ResourceCache.h>
|
#include <ResourceCache.h>
|
||||||
#include <ScriptCache.h>
|
#include <ScriptCache.h>
|
||||||
#include <EntityEditFilters.h>
|
#include <EntityEditFilters.h>
|
||||||
#include <NetworkingConstants.h>
|
#include <NetworkingConstants.h>
|
||||||
#include <QJsonArray>
|
|
||||||
#include <QJsonDocument>
|
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
|
|
||||||
#include "AssignmentParentFinder.h"
|
#include "AssignmentParentFinder.h"
|
||||||
#include "EntityNodeData.h"
|
#include "EntityNodeData.h"
|
||||||
#include "EntityServer.h"
|
|
||||||
#include "EntityServerConsts.h"
|
#include "EntityServerConsts.h"
|
||||||
#include "EntityTreeSendThread.h"
|
#include "EntityTreeSendThread.h"
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "MessagesMixer.h"
|
||||||
|
|
||||||
#include <QtCore/QCoreApplication>
|
#include <QtCore/QCoreApplication>
|
||||||
#include <QtCore/QJsonObject>
|
#include <QtCore/QJsonObject>
|
||||||
#include <QBuffer>
|
#include <QBuffer>
|
||||||
|
@ -16,7 +18,6 @@
|
||||||
#include <MessagesClient.h>
|
#include <MessagesClient.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
#include "MessagesMixer.h"
|
|
||||||
|
|
||||||
const QString MESSAGES_MIXER_LOGGING_NAME = "messages-mixer";
|
const QString MESSAGES_MIXER_LOGGING_NAME = "messages-mixer";
|
||||||
|
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OctreeInboundPacketProcessor.h"
|
||||||
|
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
#include <NumericalConstants.h>
|
#include <NumericalConstants.h>
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
|
|
||||||
#include "OctreeServer.h"
|
#include "OctreeServer.h"
|
||||||
#include "OctreeServerConsts.h"
|
#include "OctreeServerConsts.h"
|
||||||
#include "OctreeInboundPacketProcessor.h"
|
|
||||||
|
|
||||||
static QUuid DEFAULT_NODE_ID_REF;
|
static QUuid DEFAULT_NODE_ID_REF;
|
||||||
const quint64 TOO_LONG_SINCE_LAST_NACK = 1 * USECS_PER_SECOND;
|
const quint64 TOO_LONG_SINCE_LAST_NACK = 1 * USECS_PER_SECOND;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OctreeSendThread.h"
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
#include <thread>
|
#include <thread>
|
||||||
|
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
|
||||||
#include "OctreeSendThread.h"
|
|
||||||
#include "OctreeServer.h"
|
#include "OctreeServer.h"
|
||||||
#include "OctreeServerConsts.h"
|
#include "OctreeServerConsts.h"
|
||||||
#include "OctreeLogging.h"
|
#include "OctreeLogging.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "DomainServerNodeData.h"
|
||||||
|
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
#include <QtCore/QJsonArray>
|
#include <QtCore/QJsonArray>
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
|
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
|
|
||||||
#include "DomainServerNodeData.h"
|
|
||||||
|
|
||||||
DomainServerNodeData::StringPairHash DomainServerNodeData::_overrideHash;
|
DomainServerNodeData::StringPairHash DomainServerNodeData::_overrideHash;
|
||||||
|
|
||||||
DomainServerNodeData::DomainServerNodeData() {
|
DomainServerNodeData::DomainServerNodeData() {
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include <QtCore/QElapsedTimer>
|
#include <QtCore/QElapsedTimer>
|
||||||
#include <QtCore/QHash>
|
#include <QtCore/QHash>
|
||||||
#include <QtCore/QUuid>
|
#include <QtCore/QUuid>
|
||||||
|
#include <QtCore/QJsonObject>
|
||||||
|
|
||||||
#include <HifiSockAddr.h>
|
#include <HifiSockAddr.h>
|
||||||
#include <NLPacket.h>
|
#include <NLPacket.h>
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "DomainServerWebSessionData.h"
|
||||||
|
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
#include <QtCore/QDebug>
|
#include <QtCore/QDebug>
|
||||||
#include <QtCore/QJsonArray>
|
#include <QtCore/QJsonArray>
|
||||||
#include <QtCore/QJsonObject>
|
#include <QtCore/QJsonObject>
|
||||||
|
|
||||||
#include "DomainServerWebSessionData.h"
|
|
||||||
|
|
||||||
DomainServerWebSessionData::DomainServerWebSessionData() :
|
DomainServerWebSessionData::DomainServerWebSessionData() :
|
||||||
_username(),
|
_username(),
|
||||||
_roles()
|
_roles()
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Client.h"
|
||||||
|
|
||||||
#include <AccountManager.h>
|
#include <AccountManager.h>
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
#include <HifiSockAddr.h>
|
#include <HifiSockAddr.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
#include <PacketHeaders.h>
|
#include <PacketHeaders.h>
|
||||||
|
|
||||||
#include "Client.h"
|
|
||||||
|
|
||||||
Client::Client(QObject* parent) :
|
Client::Client(QObject* parent) :
|
||||||
QObject(parent)
|
QObject(parent)
|
||||||
{
|
{
|
||||||
|
@ -70,4 +70,4 @@ void Client::processDatagrams() {
|
||||||
processVerifiedPacket(senderSockAddr, incomingPacket);
|
processVerifiedPacket(senderSockAddr, incomingPacket);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "GVRInterface.h"
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
|
||||||
#include <jni.h>
|
#include <jni.h>
|
||||||
|
@ -32,8 +34,6 @@
|
||||||
#include "GVRMainWindow.h"
|
#include "GVRMainWindow.h"
|
||||||
#include "RenderingClient.h"
|
#include "RenderingClient.h"
|
||||||
|
|
||||||
#include "GVRInterface.h"
|
|
||||||
|
|
||||||
static QString launchURLString = QString();
|
static QString launchURLString = QString();
|
||||||
|
|
||||||
#ifdef ANDROID
|
#ifdef ANDROID
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "GVRMainWindow.h"
|
||||||
|
|
||||||
#include <QtGui/QKeyEvent>
|
#include <QtGui/QKeyEvent>
|
||||||
#include <QtWidgets/QApplication>
|
#include <QtWidgets/QApplication>
|
||||||
#include <QtWidgets/QInputDialog>
|
#include <QtWidgets/QInputDialog>
|
||||||
|
@ -37,8 +39,6 @@ const float LIBOVR_LONG_PRESS_DURATION = 0.75f;
|
||||||
#include "LoginDialog.h"
|
#include "LoginDialog.h"
|
||||||
#include "RenderingClient.h"
|
#include "RenderingClient.h"
|
||||||
|
|
||||||
#include "GVRMainWindow.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
GVRMainWindow::GVRMainWindow(QWidget* parent) :
|
GVRMainWindow::GVRMainWindow(QWidget* parent) :
|
||||||
|
|
|
@ -9,14 +9,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "LoginDialog.h"
|
||||||
|
|
||||||
#include <QtWidgets/QDialogButtonBox>
|
#include <QtWidgets/QDialogButtonBox>
|
||||||
#include <QtWidgets/QGridLayout>
|
#include <QtWidgets/QGridLayout>
|
||||||
#include <QtWidgets/QLabel>
|
#include <QtWidgets/QLabel>
|
||||||
#include <QtWidgets/QLineEdit>
|
#include <QtWidgets/QLineEdit>
|
||||||
#include <QtWidgets/QPushButton>
|
#include <QtWidgets/QPushButton>
|
||||||
|
|
||||||
#include "LoginDialog.h"
|
|
||||||
|
|
||||||
LoginDialog::LoginDialog(QWidget* parent) :
|
LoginDialog::LoginDialog(QWidget* parent) :
|
||||||
QDialog(parent)
|
QDialog(parent)
|
||||||
{
|
{
|
||||||
|
@ -66,4 +66,4 @@ void LoginDialog::setupGUI() {
|
||||||
void LoginDialog::loginButtonClicked() {
|
void LoginDialog::loginButtonClicked() {
|
||||||
emit credentialsEntered(_usernameLineEdit->text(), _passwordLineEdit->text());
|
emit credentialsEntered(_usernameLineEdit->text(), _passwordLineEdit->text());
|
||||||
close();
|
close();
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "RenderingClient.h"
|
||||||
|
|
||||||
#include <QtCore/QThread>
|
#include <QtCore/QThread>
|
||||||
#include <QtWidgets/QInputDialog>
|
#include <QtWidgets/QInputDialog>
|
||||||
|
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
#include <AvatarHashMap.h>
|
#include <AvatarHashMap.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
|
|
||||||
#include "RenderingClient.h"
|
|
||||||
|
|
||||||
RenderingClient* RenderingClient::_instance = NULL;
|
RenderingClient* RenderingClient::_instance = NULL;
|
||||||
|
|
||||||
RenderingClient::RenderingClient(QObject *parent, const QString& launchURLString) :
|
RenderingClient::RenderingClient(QObject *parent, const QString& launchURLString) :
|
||||||
|
|
|
@ -1334,6 +1334,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
|
|
||||||
// Create the main thread context, the GPU backend, and the display plugins
|
// Create the main thread context, the GPU backend, and the display plugins
|
||||||
initializeGL();
|
initializeGL();
|
||||||
|
DependencyManager::get<TextureCache>()->setGPUContext(_gpuContext);
|
||||||
qCDebug(interfaceapp, "Initialized Display.");
|
qCDebug(interfaceapp, "Initialized Display.");
|
||||||
// Create the rendering engine. This can be slow on some machines due to lots of
|
// Create the rendering engine. This can be slow on some machines due to lots of
|
||||||
// GPU pipeline creation.
|
// GPU pipeline creation.
|
||||||
|
@ -3655,7 +3656,7 @@ void Application::keyPressEvent(QKeyEvent* event) {
|
||||||
} else {
|
} else {
|
||||||
showCursor(Cursor::Icon::DEFAULT);
|
showCursor(Cursor::Icon::DEFAULT);
|
||||||
}
|
}
|
||||||
} else {
|
} else if (!event->isAutoRepeat()){
|
||||||
resetSensors(true);
|
resetSensors(true);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarBookmarks.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -27,7 +29,6 @@
|
||||||
|
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "AvatarBookmarks.h"
|
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
|
|
||||||
#include "QVariantGLM.h"
|
#include "QVariantGLM.h"
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Bookmarks.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QInputDialog>
|
#include <QInputDialog>
|
||||||
|
@ -22,8 +24,6 @@
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
|
|
||||||
#include "Bookmarks.h"
|
|
||||||
|
|
||||||
Bookmarks::Bookmarks() :
|
Bookmarks::Bookmarks() :
|
||||||
_isMenuSorted(false)
|
_isMenuSorted(false)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "DiscoverabilityManager.h"
|
||||||
|
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
|
#include <QThread>
|
||||||
|
|
||||||
#include <AccountManager.h>
|
#include <AccountManager.h>
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
|
@ -21,11 +24,8 @@
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
#include "Crashpad.h"
|
#include "Crashpad.h"
|
||||||
#include "DiscoverabilityManager.h"
|
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
||||||
#include <QThread>
|
|
||||||
|
|
||||||
const Discoverability::Mode DEFAULT_DISCOVERABILITY_MODE = Discoverability::Connections;
|
const Discoverability::Mode DEFAULT_DISCOVERABILITY_MODE = Discoverability::Connections;
|
||||||
|
|
||||||
DiscoverabilityManager::DiscoverabilityManager() :
|
DiscoverabilityManager::DiscoverabilityManager() :
|
||||||
|
|
|
@ -12,9 +12,13 @@
|
||||||
#ifndef hifi_DiscoverabilityManager_h
|
#ifndef hifi_DiscoverabilityManager_h
|
||||||
#define hifi_DiscoverabilityManager_h
|
#define hifi_DiscoverabilityManager_h
|
||||||
|
|
||||||
|
#include <QJsonObject>
|
||||||
|
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
|
|
||||||
|
class QNetworkReply;
|
||||||
|
|
||||||
namespace Discoverability {
|
namespace Discoverability {
|
||||||
enum Mode {
|
enum Mode {
|
||||||
None,
|
None,
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
// FIXME ordering of headers
|
|
||||||
#include "Application.h"
|
|
||||||
#include "GLCanvas.h"
|
#include "GLCanvas.h"
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
bool GLCanvas::event(QEvent* event) {
|
bool GLCanvas::event(QEvent* event) {
|
||||||
if (QEvent::Paint == event->type() && qApp->isAboutToQuit()) {
|
if (QEvent::Paint == event->type() && qApp->isAboutToQuit()) {
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "InterfaceDynamicFactory.h"
|
||||||
|
|
||||||
#include <avatar/AvatarActionHold.h>
|
#include <avatar/AvatarActionHold.h>
|
||||||
#include <avatar/AvatarActionFarGrab.h>
|
#include <avatar/AvatarActionFarGrab.h>
|
||||||
|
@ -22,9 +22,6 @@
|
||||||
#include <ObjectConstraintConeTwist.h>
|
#include <ObjectConstraintConeTwist.h>
|
||||||
#include <LogHandler.h>
|
#include <LogHandler.h>
|
||||||
|
|
||||||
#include "InterfaceDynamicFactory.h"
|
|
||||||
|
|
||||||
|
|
||||||
EntityDynamicPointer interfaceDynamicFactory(EntityDynamicType type, const QUuid& id, EntityItemPointer ownerEntity) {
|
EntityDynamicPointer interfaceDynamicFactory(EntityDynamicType type, const QUuid& id, EntityItemPointer ownerEntity) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DYNAMIC_TYPE_NONE:
|
case DYNAMIC_TYPE_NONE:
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "InterfaceParentFinder.h"
|
||||||
|
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
|
#include <AvatarData.h>
|
||||||
|
#include <avatar/AvatarManager.h>
|
||||||
#include <EntityTree.h>
|
#include <EntityTree.h>
|
||||||
#include <EntityTreeRenderer.h>
|
#include <EntityTreeRenderer.h>
|
||||||
#include <avatar/AvatarManager.h>
|
|
||||||
#include <AvatarData.h>
|
|
||||||
|
|
||||||
#include "InterfaceParentFinder.h"
|
|
||||||
|
|
||||||
SpatiallyNestableWeakPointer InterfaceParentFinder::find(QUuid parentID, bool& success, SpatialParentTree* entityTree) const {
|
SpatiallyNestableWeakPointer InterfaceParentFinder::find(QUuid parentID, bool& success, SpatialParentTree* entityTree) const {
|
||||||
SpatiallyNestableWeakPointer parent;
|
SpatiallyNestableWeakPointer parent;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "LODManager.h"
|
||||||
|
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
#include <OctreeUtils.h>
|
#include <OctreeUtils.h>
|
||||||
#include <Util.h>
|
#include <Util.h>
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
#include "ui/DialogsManager.h"
|
#include "ui/DialogsManager.h"
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
|
|
||||||
#include "LODManager.h"
|
|
||||||
|
|
||||||
|
|
||||||
Setting::Handle<float> desktopLODDecreaseFPS("desktopLODDecreaseFPS", DEFAULT_DESKTOP_LOD_DOWN_FPS);
|
Setting::Handle<float> desktopLODDecreaseFPS("desktopLODDecreaseFPS", DEFAULT_DESKTOP_LOD_DOWN_FPS);
|
||||||
Setting::Handle<float> hmdLODDecreaseFPS("hmdLODDecreaseFPS", DEFAULT_HMD_LOD_DOWN_FPS);
|
Setting::Handle<float> hmdLODDecreaseFPS("hmdLODDecreaseFPS", DEFAULT_HMD_LOD_DOWN_FPS);
|
||||||
|
|
|
@ -9,21 +9,16 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "LocationBookmarks.h"
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QInputDialog>
|
|
||||||
#include <QMessageBox>
|
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
#include <Application.h>
|
|
||||||
#include <OffscreenUi.h>
|
#include <OffscreenUi.h>
|
||||||
|
|
||||||
#include "MainWindow.h"
|
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
|
|
||||||
#include "LocationBookmarks.h"
|
|
||||||
#include <QtQuick/QQuickWindow>
|
|
||||||
|
|
||||||
const QString LocationBookmarks::HOME_BOOKMARK = "Home";
|
const QString LocationBookmarks::HOME_BOOKMARK = "Home";
|
||||||
|
|
||||||
LocationBookmarks::LocationBookmarks() {
|
LocationBookmarks::LocationBookmarks() {
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
#define hifi_LocationBookmarks_h
|
#define hifi_LocationBookmarks_h
|
||||||
|
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
|
|
||||||
#include "Bookmarks.h"
|
#include "Bookmarks.h"
|
||||||
|
|
||||||
class LocationBookmarks : public Bookmarks, public Dependency {
|
class LocationBookmarks : public Bookmarks, public Dependency {
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Menu.h"
|
||||||
|
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
@ -52,8 +54,6 @@
|
||||||
#include "SpeechRecognizer.h"
|
#include "SpeechRecognizer.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "Menu.h"
|
|
||||||
|
|
||||||
extern bool DEV_DECIMATE_TEXTURES;
|
extern bool DEV_DECIMATE_TEXTURES;
|
||||||
|
|
||||||
Menu* Menu::getInstance() {
|
Menu* Menu::getInstance() {
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ModelPackager.h"
|
||||||
|
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMessageBox>
|
#include <QMessageBox>
|
||||||
|
@ -21,8 +23,6 @@
|
||||||
#include "ModelPropertiesDialog.h"
|
#include "ModelPropertiesDialog.h"
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
|
|
||||||
#include "ModelPackager.h"
|
|
||||||
|
|
||||||
static const int MAX_TEXTURE_SIZE = 1024;
|
static const int MAX_TEXTURE_SIZE = 1024;
|
||||||
|
|
||||||
void copyDirectoryContent(QDir& from, QDir& to) {
|
void copyDirectoryContent(QDir& from, QDir& to) {
|
||||||
|
|
|
@ -12,11 +12,15 @@
|
||||||
#ifndef hifi_ModelPackager_h
|
#ifndef hifi_ModelPackager_h
|
||||||
#define hifi_ModelPackager_h
|
#define hifi_ModelPackager_h
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QVariantHash>
|
#include <QVariantHash>
|
||||||
|
|
||||||
#include "ui/ModelsBrowser.h"
|
#include "ui/ModelsBrowser.h"
|
||||||
|
|
||||||
|
class FBXGeometry;
|
||||||
|
|
||||||
class ModelPackager : public QObject {
|
class ModelPackager : public QObject {
|
||||||
public:
|
public:
|
||||||
static bool package();
|
static bool package();
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ModelPropertiesDialog.h"
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
@ -23,8 +25,6 @@
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
#include <OffscreenUi.h>
|
#include <OffscreenUi.h>
|
||||||
|
|
||||||
#include "ModelPropertiesDialog.h"
|
|
||||||
|
|
||||||
|
|
||||||
ModelPropertiesDialog::ModelPropertiesDialog(FSTReader::ModelType modelType, const QVariantHash& originalMapping,
|
ModelPropertiesDialog::ModelPropertiesDialog(FSTReader::ModelType modelType, const QVariantHash& originalMapping,
|
||||||
const QString& basePath, const FBXGeometry& geometry) :
|
const QString& basePath, const FBXGeometry& geometry) :
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ModelSelector.h"
|
||||||
|
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
|
@ -16,8 +18,6 @@
|
||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
|
||||||
#include "ModelSelector.h"
|
|
||||||
|
|
||||||
static const QString AVATAR_HEAD_AND_BODY_STRING = "Avatar Body with Head";
|
static const QString AVATAR_HEAD_AND_BODY_STRING = "Avatar Body with Head";
|
||||||
static const QString AVATAR_ATTACHEMENT_STRING = "Avatar Attachment";
|
static const QString AVATAR_ATTACHEMENT_STRING = "Avatar Attachment";
|
||||||
static const QString ENTITY_MODEL_STRING = "Entity Model";
|
static const QString ENTITY_MODEL_STRING = "Entity Model";
|
||||||
|
@ -82,4 +82,4 @@ void ModelSelector::browse() {
|
||||||
_browseButton->setText(fileInfo.fileName());
|
_browseButton->setText(fileInfo.fileName());
|
||||||
lastModelBrowseLocation.set(fileInfo.path());
|
lastModelBrowseLocation.set(fileInfo.path());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,13 +9,16 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "Application.h"
|
|
||||||
#include "SecondaryCamera.h"
|
#include "SecondaryCamera.h"
|
||||||
#include <TextureCache.h>
|
|
||||||
#include <gpu/Context.h>
|
|
||||||
#include <EntityScriptingInterface.h>
|
|
||||||
#include <glm/gtx/transform.hpp>
|
#include <glm/gtx/transform.hpp>
|
||||||
|
|
||||||
|
#include <EntityScriptingInterface.h>
|
||||||
|
#include <gpu/Context.h>
|
||||||
|
#include <TextureCache.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
|
||||||
using RenderArgsPointer = std::shared_ptr<RenderArgs>;
|
using RenderArgsPointer = std::shared_ptr<RenderArgs>;
|
||||||
|
|
||||||
void MainRenderTask::build(JobModel& task, const render::Varying& inputs, render::Varying& outputs, render::CullFunctor cullFunctor, bool isDeferred) {
|
void MainRenderTask::build(JobModel& task, const render::Varying& inputs, render::Varying& outputs, render::CullFunctor cullFunctor, bool isDeferred) {
|
||||||
|
@ -213,4 +216,4 @@ void SecondaryCameraRenderTask::build(JobModel& task, const render::Varying& inp
|
||||||
task.addJob<RenderDeferredTask>("RenderDeferredTask", items);
|
task.addJob<RenderDeferredTask>("RenderDeferredTask", items);
|
||||||
}
|
}
|
||||||
task.addJob<EndSecondaryCameraFrame>("EndSecondaryCamera", cachedArg);
|
task.addJob<EndSecondaryCameraFrame>("EndSecondaryCamera", cachedArg);
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,6 +17,8 @@
|
||||||
#include <render/RenderFetchCullSortTask.h>
|
#include <render/RenderFetchCullSortTask.h>
|
||||||
#include <RenderDeferredTask.h>
|
#include <RenderDeferredTask.h>
|
||||||
#include <RenderForwardTask.h>
|
#include <RenderForwardTask.h>
|
||||||
|
#include <TextureCache.h>
|
||||||
|
#include <ViewFrustum.h>
|
||||||
|
|
||||||
class MainRenderTask {
|
class MainRenderTask {
|
||||||
public:
|
public:
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "SpeechRecognizer.h"
|
||||||
|
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
#include "SpeechRecognizer.h"
|
|
||||||
|
|
||||||
#if defined(Q_OS_WIN)
|
#if defined(Q_OS_WIN)
|
||||||
|
|
||||||
|
|
|
@ -16,10 +16,10 @@
|
||||||
#import <AppKit/NSSpeechRecognizer.h>
|
#import <AppKit/NSSpeechRecognizer.h>
|
||||||
#import <AppKit/NSWorkspace.h>
|
#import <AppKit/NSWorkspace.h>
|
||||||
|
|
||||||
#include <QDebug>
|
|
||||||
|
|
||||||
#include "SpeechRecognizer.h"
|
#include "SpeechRecognizer.h"
|
||||||
|
|
||||||
|
#include <QDebug>
|
||||||
|
|
||||||
@interface SpeechRecognizerDelegate : NSObject <NSSpeechRecognizerDelegate> {
|
@interface SpeechRecognizerDelegate : NSObject <NSSpeechRecognizerDelegate> {
|
||||||
SpeechRecognizer* _listener;
|
SpeechRecognizer* _listener;
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,11 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "UIUtil.h"
|
||||||
|
|
||||||
#include <QStyle>
|
#include <QStyle>
|
||||||
#include <QStyleOptionTitleBar>
|
#include <QStyleOptionTitleBar>
|
||||||
|
|
||||||
#include "UIUtil.h"
|
|
||||||
|
|
||||||
int UIUtil::getWindowTitleBarHeight(const QWidget* window) {
|
int UIUtil::getWindowTitleBarHeight(const QWidget* window) {
|
||||||
QStyleOptionTitleBar options;
|
QStyleOptionTitleBar options;
|
||||||
options.titleBarState = 1;
|
options.titleBarState = 1;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioScope.h"
|
||||||
|
|
||||||
#include <qvector2d.h>
|
#include <qvector2d.h>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
|
@ -19,8 +21,6 @@
|
||||||
#include <gpu/Context.h>
|
#include <gpu/Context.h>
|
||||||
#include <GLMHelpers.h>
|
#include <GLMHelpers.h>
|
||||||
|
|
||||||
#include "AudioScope.h"
|
|
||||||
|
|
||||||
static const unsigned int DEFAULT_FRAMES_PER_SCOPE = 5;
|
static const unsigned int DEFAULT_FRAMES_PER_SCOPE = 5;
|
||||||
static const unsigned int MULTIPLIER_SCOPE_HEIGHT = 20;
|
static const unsigned int MULTIPLIER_SCOPE_HEIGHT = 20;
|
||||||
static const unsigned int SCOPE_HEIGHT = 2 * 15 * MULTIPLIER_SCOPE_HEIGHT;
|
static const unsigned int SCOPE_HEIGHT = 2 * 15 * MULTIPLIER_SCOPE_HEIGHT;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarManager.h"
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <QScriptEngine>
|
#include <QScriptEngine>
|
||||||
|
@ -38,7 +40,6 @@
|
||||||
#include <shared/ConicalViewFrustum.h>
|
#include <shared/ConicalViewFrustum.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "AvatarManager.h"
|
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "MyAvatar.h"
|
#include "MyAvatar.h"
|
||||||
|
|
|
@ -9,16 +9,19 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Ledger.h"
|
||||||
|
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
#include <QTimeZone>
|
#include <QTimeZone>
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include "Wallet.h"
|
|
||||||
#include "Ledger.h"
|
|
||||||
#include "CommerceLogging.h"
|
|
||||||
#include <NetworkingConstants.h>
|
#include <NetworkingConstants.h>
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
|
|
||||||
|
#include "Wallet.h"
|
||||||
|
#include "CommerceLogging.h"
|
||||||
|
|
||||||
// inventory answers {status: 'success', data: {assets: [{id: "guid", title: "name", preview: "url"}....]}}
|
// inventory answers {status: 'success', data: {assets: [{id: "guid", title: "name", preview: "url"}....]}}
|
||||||
// balance answers {status: 'success', data: {balance: integer}}
|
// balance answers {status: 'success', data: {balance: integer}}
|
||||||
// buy and receive_at answer {status: 'success'}
|
// buy and receive_at answer {status: 'success'}
|
||||||
|
|
|
@ -9,22 +9,7 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "CommerceLogging.h"
|
|
||||||
#include "Ledger.h"
|
|
||||||
#include "Wallet.h"
|
#include "Wallet.h"
|
||||||
#include "Application.h"
|
|
||||||
#include "ui/SecurityImageProvider.h"
|
|
||||||
#include "scripting/HMDScriptingInterface.h"
|
|
||||||
#include <ui/TabletScriptingInterface.h>
|
|
||||||
|
|
||||||
#include <PathUtils.h>
|
|
||||||
#include <OffscreenUi.h>
|
|
||||||
#include <AccountManager.h>
|
|
||||||
|
|
||||||
#include <QFile>
|
|
||||||
#include <QCryptographicHash>
|
|
||||||
#include <QQmlContext>
|
|
||||||
#include <QBuffer>
|
|
||||||
|
|
||||||
#include <openssl/ssl.h>
|
#include <openssl/ssl.h>
|
||||||
#include <openssl/err.h>
|
#include <openssl/err.h>
|
||||||
|
@ -33,7 +18,6 @@
|
||||||
#include <openssl/evp.h>
|
#include <openssl/evp.h>
|
||||||
#include <openssl/aes.h>
|
#include <openssl/aes.h>
|
||||||
#include <openssl/ecdsa.h>
|
#include <openssl/ecdsa.h>
|
||||||
|
|
||||||
// I know, right? But per https://www.openssl.org/docs/faq.html
|
// I know, right? But per https://www.openssl.org/docs/faq.html
|
||||||
// this avoids OPENSSL_Uplink(00007FF847238000,08): no OPENSSL_Applink
|
// this avoids OPENSSL_Uplink(00007FF847238000,08): no OPENSSL_Applink
|
||||||
// at runtime.
|
// at runtime.
|
||||||
|
@ -41,6 +25,22 @@
|
||||||
#include <openssl/applink.c>
|
#include <openssl/applink.c>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <QFile>
|
||||||
|
#include <QCryptographicHash>
|
||||||
|
#include <QQmlContext>
|
||||||
|
#include <QBuffer>
|
||||||
|
|
||||||
|
#include <PathUtils.h>
|
||||||
|
#include <OffscreenUi.h>
|
||||||
|
#include <AccountManager.h>
|
||||||
|
#include <ui/TabletScriptingInterface.h>
|
||||||
|
|
||||||
|
#include "Application.h"
|
||||||
|
#include "CommerceLogging.h"
|
||||||
|
#include "Ledger.h"
|
||||||
|
#include "ui/SecurityImageProvider.h"
|
||||||
|
#include "scripting/HMDScriptingInterface.h"
|
||||||
|
|
||||||
static const char* KEY_FILE = "hifikey";
|
static const char* KEY_FILE = "hifikey";
|
||||||
static const char* INSTRUCTIONS_FILE = "backup_instructions.html";
|
static const char* INSTRUCTIONS_FILE = "backup_instructions.html";
|
||||||
static const char* IMAGE_HEADER = "-----BEGIN SECURITY IMAGE-----\n";
|
static const char* IMAGE_HEADER = "-----BEGIN SECURITY IMAGE-----\n";
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "CloseEventSender.h"
|
||||||
|
|
||||||
#include <QtCore/QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
#include <QtCore/QEventLoop>
|
#include <QtCore/QEventLoop>
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
|
@ -22,8 +24,6 @@
|
||||||
#include <UserActivityLogger.h>
|
#include <UserActivityLogger.h>
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
#include "CloseEventSender.h"
|
|
||||||
|
|
||||||
QNetworkRequest createNetworkRequest() {
|
QNetworkRequest createNetworkRequest() {
|
||||||
|
|
||||||
QNetworkRequest request;
|
QNetworkRequest request;
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OctreePacketProcessor.h"
|
||||||
|
|
||||||
#include <PerfStat.h>
|
#include <PerfStat.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "OctreePacketProcessor.h"
|
|
||||||
#include "SceneScriptingInterface.h"
|
#include "SceneScriptingInterface.h"
|
||||||
|
|
||||||
OctreePacketProcessor::OctreePacketProcessor() {
|
OctreePacketProcessor::OctreePacketProcessor() {
|
||||||
|
|
|
@ -9,13 +9,13 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AccountServicesScriptingInterface.h"
|
||||||
|
|
||||||
#include "AccountManager.h"
|
#include "AccountManager.h"
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "DiscoverabilityManager.h"
|
#include "DiscoverabilityManager.h"
|
||||||
#include "ResourceCache.h"
|
#include "ResourceCache.h"
|
||||||
|
|
||||||
#include "AccountServicesScriptingInterface.h"
|
|
||||||
|
|
||||||
AccountServicesScriptingInterface::AccountServicesScriptingInterface() {
|
AccountServicesScriptingInterface::AccountServicesScriptingInterface() {
|
||||||
auto accountManager = DependencyManager::get<AccountManager>();
|
auto accountManager = DependencyManager::get<AccountManager>();
|
||||||
connect(accountManager.data(), &AccountManager::usernameChanged, this, &AccountServicesScriptingInterface::onUsernameChanged);
|
connect(accountManager.data(), &AccountManager::usernameChanged, this, &AccountServicesScriptingInterface::onUsernameChanged);
|
||||||
|
|
|
@ -18,6 +18,8 @@
|
||||||
#include <QScriptValue>
|
#include <QScriptValue>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStringList>
|
#include <QStringList>
|
||||||
|
|
||||||
|
#include <AccountManager.h>
|
||||||
#include <DiscoverabilityManager.h>
|
#include <DiscoverabilityManager.h>
|
||||||
|
|
||||||
class DownloadInfoResult {
|
class DownloadInfoResult {
|
||||||
|
|
|
@ -9,18 +9,17 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioDevices.h"
|
||||||
|
|
||||||
#include <map>
|
#include <map>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <shared/QtHelpers.h>
|
#include <shared/QtHelpers.h>
|
||||||
#include <plugins/DisplayPlugin.h>
|
#include <plugins/DisplayPlugin.h>
|
||||||
|
|
||||||
#include "AudioDevices.h"
|
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "AudioClient.h"
|
#include "AudioClient.h"
|
||||||
#include "Audio.h"
|
#include "Audio.h"
|
||||||
|
|
||||||
#include "UserActivityLogger.h"
|
#include "UserActivityLogger.h"
|
||||||
|
|
||||||
using namespace scripting;
|
using namespace scripting;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "GooglePolyScriptingInterface.h"
|
||||||
|
|
||||||
#include <QEventLoop>
|
#include <QEventLoop>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
@ -20,9 +22,7 @@
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QTime>
|
#include <QTime>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <random>
|
|
||||||
|
|
||||||
#include "GooglePolyScriptingInterface.h"
|
|
||||||
#include "ScriptEngineLogging.h"
|
#include "ScriptEngineLogging.h"
|
||||||
|
|
||||||
const QString LIST_POLY_URL = "https://poly.googleapis.com/v1/assets?";
|
const QString LIST_POLY_URL = "https://poly.googleapis.com/v1/assets?";
|
||||||
|
|
|
@ -9,13 +9,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "LimitlessVoiceRecognitionScriptingInterface.h"
|
||||||
|
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
|
|
||||||
#include <ThreadHelpers.h>
|
#include <ThreadHelpers.h>
|
||||||
#include <src/InterfaceLogging.h>
|
|
||||||
#include <src/ui/AvatarInputs.h>
|
|
||||||
|
|
||||||
#include "LimitlessVoiceRecognitionScriptingInterface.h"
|
#include "InterfaceLogging.h"
|
||||||
|
#include "ui/AvatarInputs.h"
|
||||||
|
|
||||||
const float LimitlessVoiceRecognitionScriptingInterface::_audioLevelThreshold = 0.33f;
|
const float LimitlessVoiceRecognitionScriptingInterface::_audioLevelThreshold = 0.33f;
|
||||||
const int LimitlessVoiceRecognitionScriptingInterface::_voiceTimeoutDuration = 2000;
|
const int LimitlessVoiceRecognitionScriptingInterface::_voiceTimeoutDuration = 2000;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "DomainConnectionDialog.h"
|
||||||
|
|
||||||
#include <QtCore/QMetaEnum>
|
#include <QtCore/QMetaEnum>
|
||||||
#include <QtWidgets/QHBoxLayout>
|
#include <QtWidgets/QHBoxLayout>
|
||||||
#include <QtWidgets/QHeaderView>
|
#include <QtWidgets/QHeaderView>
|
||||||
|
@ -17,8 +19,6 @@
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
#include <NumericalConstants.h>
|
#include <NumericalConstants.h>
|
||||||
|
|
||||||
#include "DomainConnectionDialog.h"
|
|
||||||
|
|
||||||
DomainConnectionDialog::DomainConnectionDialog(QWidget* parent) :
|
DomainConnectionDialog::DomainConnectionDialog(QWidget* parent) :
|
||||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint)
|
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint)
|
||||||
{
|
{
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "HMDToolsDialog.h"
|
||||||
|
|
||||||
#include <QDesktopWidget>
|
#include <QDesktopWidget>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
|
@ -25,8 +27,7 @@
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "MainWindow.h"
|
#include "MainWindow.h"
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "ui/DialogsManager.h"
|
#include "DialogsManager.h"
|
||||||
#include "ui/HMDToolsDialog.h"
|
|
||||||
|
|
||||||
static const int WIDTH = 350;
|
static const int WIDTH = 350;
|
||||||
static const int HEIGHT = 100;
|
static const int HEIGHT = 100;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "LodToolsDialog.h"
|
||||||
|
|
||||||
#include <QCheckBox>
|
#include <QCheckBox>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
@ -23,7 +25,6 @@
|
||||||
#include <LODManager.h>
|
#include <LODManager.h>
|
||||||
|
|
||||||
#include "Menu.h"
|
#include "Menu.h"
|
||||||
#include "ui/LodToolsDialog.h"
|
|
||||||
|
|
||||||
|
|
||||||
LodToolsDialog::LodToolsDialog(QWidget* parent) :
|
LodToolsDialog::LodToolsDialog(QWidget* parent) :
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ModelsBrowser.h"
|
||||||
|
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
#include <QGridLayout>
|
#include <QGridLayout>
|
||||||
|
@ -27,8 +29,6 @@
|
||||||
#include <NetworkAccessManager.h>
|
#include <NetworkAccessManager.h>
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include "ModelsBrowser.h"
|
|
||||||
|
|
||||||
const char* MODEL_TYPE_NAMES[] = { "entities", "heads", "skeletons", "skeletons", "attachments" };
|
const char* MODEL_TYPE_NAMES[] = { "entities", "heads", "skeletons", "skeletons", "attachments" };
|
||||||
|
|
||||||
static const QString S3_URL = "http://s3.amazonaws.com/hifi-public";
|
static const QString S3_URL = "http://s3.amazonaws.com/hifi-public";
|
||||||
|
|
|
@ -9,20 +9,19 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OctreeStatsDialog.h"
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
#include <QFormLayout>
|
#include <QFormLayout>
|
||||||
#include <QDialogButtonBox>
|
#include <QDialogButtonBox>
|
||||||
|
|
||||||
#include <QPalette>
|
#include <QPalette>
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
#include <OctreeSceneStats.h>
|
#include <OctreeSceneStats.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
||||||
#include "../octree/OctreePacketProcessor.h"
|
#include "../octree/OctreePacketProcessor.h"
|
||||||
#include "ui/OctreeStatsDialog.h"
|
|
||||||
|
|
||||||
OctreeStatsDialog::OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* model) :
|
OctreeStatsDialog::OctreeStatsDialog(QWidget* parent, NodeToOctreeSceneStats* model) :
|
||||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
#include <OctreeSceneStats.h>
|
#include <OctreeSceneStats.h>
|
||||||
|
|
||||||
#define MAX_STATS 100
|
#define MAX_STATS 100
|
||||||
#define DEFAULT_COLOR 0
|
|
||||||
|
|
||||||
class OctreeStatsDialog : public QDialog {
|
class OctreeStatsDialog : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
@ -42,7 +41,7 @@ protected:
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent*) override;
|
void closeEvent(QCloseEvent*) override;
|
||||||
|
|
||||||
int AddStatItem(const char* caption, unsigned colorRGBA = DEFAULT_COLOR);
|
int AddStatItem(const char* caption, unsigned colorRGBA = 0);
|
||||||
void RemoveStatItem(int item);
|
void RemoveStatItem(int item);
|
||||||
void showAllOctreeServers();
|
void showAllOctreeServers();
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "Application.h"
|
#include "OctreeStatsProvider.h"
|
||||||
|
|
||||||
#include "../octree/OctreePacketProcessor.h"
|
#include "Application.h"
|
||||||
#include "ui/OctreeStatsProvider.h"
|
#include "octree/OctreePacketProcessor.h"
|
||||||
|
|
||||||
OctreeStatsProvider::OctreeStatsProvider(QObject* parent, NodeToOctreeSceneStats* model) :
|
OctreeStatsProvider::OctreeStatsProvider(QObject* parent, NodeToOctreeSceneStats* model) :
|
||||||
QObject(parent),
|
QObject(parent),
|
||||||
|
|
|
@ -8,13 +8,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OverlayConductor.h"
|
||||||
|
|
||||||
#include <OffscreenUi.h>
|
#include <OffscreenUi.h>
|
||||||
#include <display-plugins/CompositorHelper.h>
|
#include <display-plugins/CompositorHelper.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "avatar/AvatarManager.h"
|
#include "avatar/AvatarManager.h"
|
||||||
#include "InterfaceLogging.h"
|
#include "InterfaceLogging.h"
|
||||||
#include "OverlayConductor.h"
|
|
||||||
|
|
||||||
OverlayConductor::OverlayConductor() {
|
OverlayConductor::OverlayConductor() {
|
||||||
|
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
#ifndef hifi_OverlayConductor_h
|
#ifndef hifi_OverlayConductor_h
|
||||||
#define hifi_OverlayConductor_h
|
#define hifi_OverlayConductor_h
|
||||||
|
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
class OverlayConductor {
|
class OverlayConductor {
|
||||||
public:
|
public:
|
||||||
OverlayConductor();
|
OverlayConductor();
|
||||||
|
@ -34,12 +36,12 @@ private:
|
||||||
bool _hmdMode { false };
|
bool _hmdMode { false };
|
||||||
|
|
||||||
// used by updateAvatarHasDriveInput
|
// used by updateAvatarHasDriveInput
|
||||||
quint64 _desiredDrivingTimer { 0 };
|
uint64_t _desiredDrivingTimer { 0 };
|
||||||
bool _desiredDriving { false };
|
bool _desiredDriving { false };
|
||||||
bool _currentDriving { false };
|
bool _currentDriving { false };
|
||||||
|
|
||||||
// used by updateAvatarIsAtRest
|
// used by updateAvatarIsAtRest
|
||||||
quint64 _desiredAtRestTimer { 0 };
|
uint64_t _desiredAtRestTimer { 0 };
|
||||||
bool _desiredAtRest { true };
|
bool _desiredAtRest { true };
|
||||||
bool _currentAtRest { true };
|
bool _currentAtRest { true };
|
||||||
};
|
};
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Snapshot.h"
|
||||||
|
|
||||||
#include <QtCore/QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
#include <QtCore/QDir>
|
#include <QtCore/QDir>
|
||||||
#include <QtCore/QFile>
|
#include <QtCore/QFile>
|
||||||
|
@ -31,7 +33,6 @@
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
#include "Snapshot.h"
|
|
||||||
#include "SnapshotUploader.h"
|
#include "SnapshotUploader.h"
|
||||||
|
|
||||||
// filename format: hifi-snap-by-%username%-on-%date%_%time%_@-%location%.jpg
|
// filename format: hifi-snap-by-%username%-on-%date%_%time%_@-%location%.jpg
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
|
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QStandardPaths>
|
#include <QStandardPaths>
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
#include <SettingHandle.h>
|
#include <SettingHandle.h>
|
||||||
#include <DependencyManager.h>
|
#include <DependencyManager.h>
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "SnapshotAnimated.h"
|
||||||
|
|
||||||
#include <QtCore/QDateTime>
|
#include <QtCore/QDateTime>
|
||||||
#include <QtCore/QObject>
|
#include <QtCore/QObject>
|
||||||
#include <QtCore/QString>
|
#include <QtCore/QString>
|
||||||
|
@ -16,7 +18,6 @@
|
||||||
#include <QtConcurrent/QtConcurrentRun>
|
#include <QtConcurrent/QtConcurrentRun>
|
||||||
|
|
||||||
#include <plugins/DisplayPlugin.h>
|
#include <plugins/DisplayPlugin.h>
|
||||||
#include "SnapshotAnimated.h"
|
|
||||||
|
|
||||||
QTimer* SnapshotAnimated::snapshotAnimatedTimer = NULL;
|
QTimer* SnapshotAnimated::snapshotAnimatedTimer = NULL;
|
||||||
qint64 SnapshotAnimated::snapshotAnimatedTimestamp = 0;
|
qint64 SnapshotAnimated::snapshotAnimatedTimestamp = 0;
|
||||||
|
|
|
@ -9,11 +9,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "SnapshotUploader.h"
|
||||||
|
|
||||||
#include <QtCore/QJsonDocument>
|
#include <QtCore/QJsonDocument>
|
||||||
#include <QtCore/QJsonArray>
|
#include <QtCore/QJsonArray>
|
||||||
|
|
||||||
#include <AddressManager.h>
|
#include <AddressManager.h>
|
||||||
|
|
||||||
#include "scripting/WindowScriptingInterface.h"
|
#include "scripting/WindowScriptingInterface.h"
|
||||||
#include "SnapshotUploader.h"
|
|
||||||
|
|
||||||
SnapshotUploader::SnapshotUploader(QUrl inWorldLocation, QString pathname) :
|
SnapshotUploader::SnapshotUploader(QUrl inWorldLocation, QString pathname) :
|
||||||
_inWorldLocation(inWorldLocation),
|
_inWorldLocation(inWorldLocation),
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "StandAloneJSConsole.h"
|
||||||
|
|
||||||
#include <QMainWindow>
|
#include <QMainWindow>
|
||||||
#include <QDialog>
|
#include <QDialog>
|
||||||
#include <QVBoxLayout>
|
#include <QVBoxLayout>
|
||||||
|
@ -16,8 +18,6 @@
|
||||||
#include <Application.h>
|
#include <Application.h>
|
||||||
#include <MainWindow.h>
|
#include <MainWindow.h>
|
||||||
|
|
||||||
#include "StandAloneJSConsole.h"
|
|
||||||
|
|
||||||
void StandAloneJSConsole::toggleConsole() {
|
void StandAloneJSConsole::toggleConsole() {
|
||||||
QMainWindow* mainWindow = qApp->getWindow();
|
QMainWindow* mainWindow = qApp->getWindow();
|
||||||
if (!_jsConsole) {
|
if (!_jsConsole) {
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "ScriptEngines.h"
|
#include "TestingDialog.h"
|
||||||
|
|
||||||
#include "ui/TestingDialog.h"
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
#include "ScriptEngines.h"
|
||||||
|
|
||||||
TestingDialog::TestingDialog(QWidget* parent) :
|
TestingDialog::TestingDialog(QWidget* parent) :
|
||||||
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
QDialog(parent, Qt::Window | Qt::WindowCloseButtonHint | Qt::WindowStaysOnTopHint),
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "ModelOverlay.h"
|
||||||
|
|
||||||
#include <glm/gtx/quaternion.hpp>
|
#include <glm/gtx/quaternion.hpp>
|
||||||
#include <glm/gtx/transform.hpp>
|
#include <glm/gtx/transform.hpp>
|
||||||
|
|
||||||
#include "ModelOverlay.h"
|
|
||||||
#include <Rig.h>
|
#include <Rig.h>
|
||||||
|
|
||||||
#include "Application.h"
|
#include "Application.h"
|
||||||
|
|
|
@ -8,8 +8,9 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "GLMHelpers.h"
|
|
||||||
#include "AnimClip.h"
|
#include "AnimClip.h"
|
||||||
|
|
||||||
|
#include "GLMHelpers.h"
|
||||||
#include "AnimationLogging.h"
|
#include "AnimationLogging.h"
|
||||||
#include "AnimUtil.h"
|
#include "AnimUtil.h"
|
||||||
|
|
||||||
|
|
|
@ -8,10 +8,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <StreamUtils.h>
|
#include "AnimExpression.h"
|
||||||
|
|
||||||
#include <QRegExp>
|
#include <QRegExp>
|
||||||
|
|
||||||
#include "AnimExpression.h"
|
#include <StreamUtils.h>
|
||||||
|
|
||||||
#include "AnimationLogging.h"
|
#include "AnimationLogging.h"
|
||||||
|
|
||||||
AnimExpression::AnimExpression(const QString& str) :
|
AnimExpression::AnimExpression(const QString& str) :
|
||||||
|
|
|
@ -8,9 +8,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include <QtGlobal>
|
|
||||||
#include "AnimNode.h"
|
#include "AnimNode.h"
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
|
|
||||||
AnimNode::Pointer AnimNode::getParent() {
|
AnimNode::Pointer AnimNode::getParent() {
|
||||||
return _parent.lock();
|
return _parent.lock();
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AnimNodeLoader.h"
|
||||||
|
|
||||||
#include <QJsonDocument>
|
#include <QJsonDocument>
|
||||||
#include <QJsonObject>
|
#include <QJsonObject>
|
||||||
#include <QJsonArray>
|
#include <QJsonArray>
|
||||||
|
@ -19,7 +21,6 @@
|
||||||
#include "AnimBlendLinearMove.h"
|
#include "AnimBlendLinearMove.h"
|
||||||
#include "AnimationLogging.h"
|
#include "AnimationLogging.h"
|
||||||
#include "AnimOverlay.h"
|
#include "AnimOverlay.h"
|
||||||
#include "AnimNodeLoader.h"
|
|
||||||
#include "AnimStateMachine.h"
|
#include "AnimStateMachine.h"
|
||||||
#include "AnimManipulator.h"
|
#include "AnimManipulator.h"
|
||||||
#include "AnimInverseKinematics.h"
|
#include "AnimInverseKinematics.h"
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
//
|
//
|
||||||
// AnimVariantMap.cpp
|
// AnimVariant.cpp
|
||||||
// library/animation
|
// library/animation
|
||||||
//
|
//
|
||||||
// Created by Howard Stearns on 10/15/15.
|
// Created by Howard Stearns on 10/15/15.
|
||||||
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AnimVariant.h" // which has AnimVariant/AnimVariantMap
|
||||||
|
|
||||||
#include <QScriptEngine>
|
#include <QScriptEngine>
|
||||||
#include <QScriptValueIterator>
|
#include <QScriptValueIterator>
|
||||||
#include <QThread>
|
#include <QThread>
|
||||||
#include <RegisteredMetaTypes.h>
|
#include <RegisteredMetaTypes.h>
|
||||||
#include "AnimVariant.h" // which has AnimVariant/AnimVariantMap
|
|
||||||
|
|
||||||
const AnimVariant AnimVariant::False = AnimVariant();
|
const AnimVariant AnimVariant::False = AnimVariant();
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AnimationObject.h"
|
||||||
|
|
||||||
#include <QScriptEngine>
|
#include <QScriptEngine>
|
||||||
|
|
||||||
#include "AnimationCache.h"
|
#include "AnimationCache.h"
|
||||||
#include "AnimationObject.h"
|
|
||||||
|
|
||||||
QStringList AnimationObject::getJointNames() const {
|
QStringList AnimationObject::getJointNames() const {
|
||||||
return qscriptvalue_cast<AnimationPointer>(thisObject())->getJointNames();
|
return qscriptvalue_cast<AnimationPointer>(thisObject())->getJointNames();
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioClient.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
@ -50,8 +52,6 @@
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
#include "AudioHelpers.h"
|
#include "AudioHelpers.h"
|
||||||
|
|
||||||
#include "AudioClient.h"
|
|
||||||
|
|
||||||
const int AudioClient::MIN_BUFFER_FRAMES = 1;
|
const int AudioClient::MIN_BUFFER_FRAMES = 1;
|
||||||
|
|
||||||
const int AudioClient::MAX_BUFFER_FRAMES = 20;
|
const int AudioClient::MAX_BUFFER_FRAMES = 20;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioIOStats.h"
|
||||||
|
|
||||||
#include <AudioConstants.h>
|
#include <AudioConstants.h>
|
||||||
#include <MixedProcessedAudioStream.h>
|
#include <MixedProcessedAudioStream.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
|
@ -16,8 +18,6 @@
|
||||||
|
|
||||||
#include "AudioClient.h"
|
#include "AudioClient.h"
|
||||||
|
|
||||||
#include "AudioIOStats.h"
|
|
||||||
|
|
||||||
// This is called 1x/sec (see AudioClient) and we want it to log the last 5s
|
// This is called 1x/sec (see AudioClient) and we want it to log the last 5s
|
||||||
static const int INPUT_READS_WINDOW = 5;
|
static const int INPUT_READS_WINDOW = 5;
|
||||||
static const int INPUT_UNPLAYED_WINDOW = 5;
|
static const int INPUT_UNPLAYED_WINDOW = 5;
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioFOA.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "AudioFOA.h"
|
|
||||||
#include "AudioFOAData.h"
|
#include "AudioFOAData.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
|
@ -6,12 +6,13 @@
|
||||||
// Copyright 2017 High Fidelity, Inc.
|
// Copyright 2017 High Fidelity, Inc.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioGate.h"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "AudioDynamics.h"
|
#include "AudioDynamics.h"
|
||||||
#include "AudioGate.h"
|
|
||||||
|
|
||||||
// log2 domain headroom bits above 0dB (int32_t)
|
// log2 domain headroom bits above 0dB (int32_t)
|
||||||
static const int LOG2_HEADROOM_Q30 = 1;
|
static const int LOG2_HEADROOM_Q30 = 1;
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioHRTF.h"
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "AudioHRTF.h"
|
|
||||||
#include "AudioHRTFData.h"
|
#include "AudioHRTFData.h"
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
|
|
@ -6,10 +6,11 @@
|
||||||
// Copyright 2016 High Fidelity, Inc.
|
// Copyright 2016 High Fidelity, Inc.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioLimiter.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
|
||||||
#include "AudioDynamics.h"
|
#include "AudioDynamics.h"
|
||||||
#include "AudioLimiter.h"
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Limiter (common)
|
// Limiter (common)
|
||||||
|
|
|
@ -6,12 +6,12 @@
|
||||||
// Copyright 2015 High Fidelity, Inc.
|
// Copyright 2015 High Fidelity, Inc.
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioReverb.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include "AudioReverb.h"
|
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#define MULHI(a,b) ((int32_t)(__emul(a, b) >> 32))
|
#define MULHI(a,b) ((int32_t)(__emul(a, b) >> 32))
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioRingBuffer.h"
|
||||||
|
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
@ -21,8 +23,6 @@
|
||||||
|
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
|
|
||||||
#include "AudioRingBuffer.h"
|
|
||||||
|
|
||||||
static const QString RING_BUFFER_OVERFLOW_DEBUG { "AudioRingBuffer::writeData has overflown the buffer. Overwriting old data." };
|
static const QString RING_BUFFER_OVERFLOW_DEBUG { "AudioRingBuffer::writeData has overflown the buffer. Overwriting old data." };
|
||||||
static const QString DROPPED_SILENT_DEBUG { "AudioRingBuffer::addSilentSamples dropping silent samples to prevent overflow." };
|
static const QString DROPPED_SILENT_DEBUG { "AudioRingBuffer::addSilentSamples dropping silent samples to prevent overflow." };
|
||||||
|
|
||||||
|
|
|
@ -9,11 +9,12 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AudioSRC.h"
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
#include "AudioSRC.h"
|
|
||||||
#include "AudioSRCData.h"
|
#include "AudioSRCData.h"
|
||||||
|
|
||||||
#ifndef MAX
|
#ifndef MAX
|
||||||
|
|
|
@ -9,13 +9,14 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "InboundAudioStream.h"
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
|
||||||
#include <NLPacket.h>
|
#include <NLPacket.h>
|
||||||
#include <Node.h>
|
#include <Node.h>
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
|
|
||||||
#include "InboundAudioStream.h"
|
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
|
|
||||||
const bool InboundAudioStream::DEFAULT_DYNAMIC_JITTER_BUFFER_ENABLED = true;
|
const bool InboundAudioStream::DEFAULT_DYNAMIC_JITTER_BUFFER_ENABLED = true;
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "InjectedAudioStream.h"
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
|
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include <udt/PacketHeaders.h>
|
#include <udt/PacketHeaders.h>
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
|
|
||||||
#include "InjectedAudioStream.h"
|
|
||||||
#include "AudioHelpers.h"
|
#include "AudioHelpers.h"
|
||||||
|
|
||||||
InjectedAudioStream::InjectedAudioStream(const QUuid& streamIdentifier, bool isStereo, int numStaticJitterFrames) :
|
InjectedAudioStream::InjectedAudioStream(const QUuid& streamIdentifier, bool isStereo, int numStaticJitterFrames) :
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "Sound.h"
|
||||||
|
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
|
||||||
#include <glm/glm.hpp>
|
#include <glm/glm.hpp>
|
||||||
|
@ -29,8 +31,6 @@
|
||||||
#include "AudioLogging.h"
|
#include "AudioLogging.h"
|
||||||
#include "AudioSRC.h"
|
#include "AudioSRC.h"
|
||||||
|
|
||||||
#include "Sound.h"
|
|
||||||
|
|
||||||
QScriptValue soundSharedPointerToScriptValue(QScriptEngine* engine, const SharedSoundPointer& in) {
|
QScriptValue soundSharedPointerToScriptValue(QScriptEngine* engine, const SharedSoundPointer& in) {
|
||||||
return engine->newQObject(new SoundScriptingInterface(in), QScriptEngine::ScriptOwnership);
|
return engine->newQObject(new SoundScriptingInterface(in), QScriptEngine::ScriptOwnership);
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "AvatarHashMap.h"
|
||||||
|
|
||||||
#include <QtCore/QDataStream>
|
#include <QtCore/QDataStream>
|
||||||
|
|
||||||
#include <NodeList.h>
|
#include <NodeList.h>
|
||||||
|
@ -17,7 +19,6 @@
|
||||||
#include <SharedUtil.h>
|
#include <SharedUtil.h>
|
||||||
|
|
||||||
#include "AvatarLogging.h"
|
#include "AvatarLogging.h"
|
||||||
#include "AvatarHashMap.h"
|
|
||||||
|
|
||||||
AvatarHashMap::AvatarHashMap() {
|
AvatarHashMap::AvatarHashMap() {
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
#include "ModelBakingLoggingCategory.h"
|
|
||||||
|
|
||||||
#include "Baker.h"
|
#include "Baker.h"
|
||||||
|
|
||||||
|
#include "ModelBakingLoggingCategory.h"
|
||||||
|
|
||||||
bool Baker::shouldStop() {
|
bool Baker::shouldStop() {
|
||||||
if (_shouldAbort) {
|
if (_shouldAbort) {
|
||||||
setWasAborted(true);
|
setWasAborted(true);
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "FBXBaker.h"
|
||||||
|
|
||||||
#include <cmath> // need this include so we don't get an error looking for std::isnan
|
#include <cmath> // need this include so we don't get an error looking for std::isnan
|
||||||
|
|
||||||
#include <QtConcurrent>
|
#include <QtConcurrent>
|
||||||
|
@ -31,8 +33,6 @@
|
||||||
#include "ModelBakingLoggingCategory.h"
|
#include "ModelBakingLoggingCategory.h"
|
||||||
#include "TextureBaker.h"
|
#include "TextureBaker.h"
|
||||||
|
|
||||||
#include "FBXBaker.h"
|
|
||||||
|
|
||||||
void FBXBaker::bake() {
|
void FBXBaker::bake() {
|
||||||
qDebug() << "FBXBaker" << _modelURL << "bake starting";
|
qDebug() << "FBXBaker" << _modelURL << "bake starting";
|
||||||
|
|
||||||
|
@ -70,13 +70,6 @@ void FBXBaker::bakeSourceCopy() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// export the FBX with re-written texture references
|
|
||||||
exportScene();
|
|
||||||
|
|
||||||
if (shouldStop()) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// check if we're already done with textures (in case we had none to re-write)
|
// check if we're already done with textures (in case we had none to re-write)
|
||||||
checkIfTexturesFinished();
|
checkIfTexturesFinished();
|
||||||
}
|
}
|
||||||
|
@ -352,27 +345,3 @@ void FBXBaker::rewriteAndBakeSceneTextures() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void FBXBaker::exportScene() {
|
|
||||||
// save the relative path to this FBX inside our passed output folder
|
|
||||||
auto fileName = _modelURL.fileName();
|
|
||||||
auto baseName = fileName.left(fileName.lastIndexOf('.'));
|
|
||||||
auto bakedFilename = baseName + BAKED_FBX_EXTENSION;
|
|
||||||
|
|
||||||
_bakedModelFilePath = _bakedOutputDir + "/" + bakedFilename;
|
|
||||||
|
|
||||||
auto fbxData = FBXWriter::encodeFBX(_rootNode);
|
|
||||||
|
|
||||||
QFile bakedFile(_bakedModelFilePath);
|
|
||||||
|
|
||||||
if (!bakedFile.open(QIODevice::WriteOnly)) {
|
|
||||||
handleError("Error opening " + _bakedModelFilePath + " for writing");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bakedFile.write(fbxData);
|
|
||||||
|
|
||||||
_outputFiles.push_back(_bakedModelFilePath);
|
|
||||||
|
|
||||||
qCDebug(model_baking) << "Exported" << _modelURL << "with re-written paths to" << _bakedModelFilePath;
|
|
||||||
}
|
|
||||||
|
|
|
@ -26,8 +26,6 @@
|
||||||
|
|
||||||
#include <FBX.h>
|
#include <FBX.h>
|
||||||
|
|
||||||
static const QString BAKED_FBX_EXTENSION = ".baked.fbx";
|
|
||||||
|
|
||||||
using TextureBakerThreadGetter = std::function<QThread*()>;
|
using TextureBakerThreadGetter = std::function<QThread*()>;
|
||||||
|
|
||||||
class FBXBaker : public ModelBaker {
|
class FBXBaker : public ModelBaker {
|
||||||
|
@ -51,11 +49,11 @@ private:
|
||||||
void loadSourceFBX();
|
void loadSourceFBX();
|
||||||
|
|
||||||
void importScene();
|
void importScene();
|
||||||
|
void embedTextureMetaData();
|
||||||
void rewriteAndBakeSceneModels();
|
void rewriteAndBakeSceneModels();
|
||||||
void rewriteAndBakeSceneTextures();
|
void rewriteAndBakeSceneTextures();
|
||||||
void exportScene();
|
void exportScene();
|
||||||
|
|
||||||
FBXNode _rootNode;
|
|
||||||
FBXGeometry* _geometry;
|
FBXGeometry* _geometry;
|
||||||
QHash<QString, int> _textureNameMatchCount;
|
QHash<QString, int> _textureNameMatchCount;
|
||||||
QHash<QUrl, QString> _remappedTexturePaths;
|
QHash<QUrl, QString> _remappedTexturePaths;
|
||||||
|
|
|
@ -9,9 +9,10 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "JSBaker.h"
|
||||||
|
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
|
|
||||||
#include "JSBaker.h"
|
|
||||||
#include "Baker.h"
|
#include "Baker.h"
|
||||||
|
|
||||||
const int ASCII_CHARACTERS_UPPER_LIMIT = 126;
|
const int ASCII_CHARACTERS_UPPER_LIMIT = 126;
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#ifndef hifi_JSBaker_h
|
#ifndef hifi_JSBaker_h
|
||||||
#define hifi_JSBaker_h
|
#define hifi_JSBaker_h
|
||||||
|
|
||||||
|
#include <QUrl>
|
||||||
|
|
||||||
#include "Baker.h"
|
#include "Baker.h"
|
||||||
#include "JSBakingLoggingCategory.h"
|
#include "JSBakingLoggingCategory.h"
|
||||||
|
|
||||||
|
|
|
@ -246,9 +246,9 @@ bool ModelBaker::compressMesh(FBXMesh& mesh, bool hasDeformers, FBXNode& dracoMe
|
||||||
|
|
||||||
QString ModelBaker::compressTexture(QString modelTextureFileName, image::TextureUsage::Type textureType) {
|
QString ModelBaker::compressTexture(QString modelTextureFileName, image::TextureUsage::Type textureType) {
|
||||||
|
|
||||||
QFileInfo modelTextureFileInfo{ modelTextureFileName.replace("\\", "/") };
|
QFileInfo modelTextureFileInfo { modelTextureFileName.replace("\\", "/") };
|
||||||
|
|
||||||
if (modelTextureFileInfo.suffix() == BAKED_TEXTURE_EXT.mid(1)) {
|
if (modelTextureFileInfo.suffix().toLower() == BAKED_TEXTURE_KTX_EXT.mid(1)) {
|
||||||
// re-baking a model that already references baked textures
|
// re-baking a model that already references baked textures
|
||||||
// this is an error - return from here
|
// this is an error - return from here
|
||||||
handleError("Cannot re-bake a file that already references compressed textures");
|
handleError("Cannot re-bake a file that already references compressed textures");
|
||||||
|
@ -273,31 +273,31 @@ QString ModelBaker::compressTexture(QString modelTextureFileName, image::Texture
|
||||||
}
|
}
|
||||||
auto urlToTexture = getTextureURL(modelTextureFileInfo, modelTextureFileName, !textureContent.isNull());
|
auto urlToTexture = getTextureURL(modelTextureFileInfo, modelTextureFileName, !textureContent.isNull());
|
||||||
|
|
||||||
QString bakedTextureFileName;
|
QString baseTextureFileName;
|
||||||
if (_remappedTexturePaths.contains(urlToTexture)) {
|
if (_remappedTexturePaths.contains(urlToTexture)) {
|
||||||
bakedTextureFileName = _remappedTexturePaths[urlToTexture];
|
baseTextureFileName = _remappedTexturePaths[urlToTexture];
|
||||||
} else {
|
} else {
|
||||||
// construct the new baked texture file name and file path
|
// construct the new baked texture file name and file path
|
||||||
// ensuring that the baked texture will have a unique name
|
// ensuring that the baked texture will have a unique name
|
||||||
// even if there was another texture with the same name at a different path
|
// even if there was another texture with the same name at a different path
|
||||||
bakedTextureFileName = createBakedTextureFileName(modelTextureFileInfo);
|
baseTextureFileName = createBaseTextureFileName(modelTextureFileInfo);
|
||||||
_remappedTexturePaths[urlToTexture] = bakedTextureFileName;
|
_remappedTexturePaths[urlToTexture] = baseTextureFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
qCDebug(model_baking).noquote() << "Re-mapping" << modelTextureFileName
|
qCDebug(model_baking).noquote() << "Re-mapping" << modelTextureFileName
|
||||||
<< "to" << bakedTextureFileName;
|
<< "to" << baseTextureFileName;
|
||||||
|
|
||||||
QString bakedTextureFilePath{
|
QString bakedTextureFilePath {
|
||||||
_bakedOutputDir + "/" + bakedTextureFileName
|
_bakedOutputDir + "/" + baseTextureFileName + BAKED_META_TEXTURE_SUFFIX
|
||||||
};
|
};
|
||||||
|
|
||||||
textureChild = bakedTextureFileName;
|
textureChild = baseTextureFileName + BAKED_META_TEXTURE_SUFFIX;
|
||||||
|
|
||||||
if (!_bakingTextures.contains(urlToTexture)) {
|
if (!_bakingTextures.contains(urlToTexture)) {
|
||||||
_outputFiles.push_back(bakedTextureFilePath);
|
_outputFiles.push_back(bakedTextureFilePath);
|
||||||
|
|
||||||
// bake this texture asynchronously
|
// bake this texture asynchronously
|
||||||
bakeTexture(urlToTexture, textureType, _bakedOutputDir, bakedTextureFileName, textureContent);
|
bakeTexture(urlToTexture, textureType, _bakedOutputDir, baseTextureFileName, textureContent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -309,7 +309,7 @@ void ModelBaker::bakeTexture(const QUrl& textureURL, image::TextureUsage::Type t
|
||||||
|
|
||||||
// start a bake for this texture and add it to our list to keep track of
|
// start a bake for this texture and add it to our list to keep track of
|
||||||
QSharedPointer<TextureBaker> bakingTexture{
|
QSharedPointer<TextureBaker> bakingTexture{
|
||||||
new TextureBaker(textureURL, textureType, outputDir, bakedFilename, textureContent),
|
new TextureBaker(textureURL, textureType, outputDir, "../", bakedFilename, textureContent),
|
||||||
&TextureBaker::deleteLater
|
&TextureBaker::deleteLater
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -484,30 +484,30 @@ void ModelBaker::checkIfTexturesFinished() {
|
||||||
} else {
|
} else {
|
||||||
qCDebug(model_baking) << "Finished baking, emitting finished" << _modelURL;
|
qCDebug(model_baking) << "Finished baking, emitting finished" << _modelURL;
|
||||||
|
|
||||||
|
texturesFinished();
|
||||||
|
|
||||||
setIsFinished(true);
|
setIsFinished(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ModelBaker::createBakedTextureFileName(const QFileInfo& textureFileInfo) {
|
QString ModelBaker::createBaseTextureFileName(const QFileInfo& textureFileInfo) {
|
||||||
// first make sure we have a unique base name for this texture
|
// first make sure we have a unique base name for this texture
|
||||||
// in case another texture referenced by this model has the same base name
|
// in case another texture referenced by this model has the same base name
|
||||||
auto& nameMatches = _textureNameMatchCount[textureFileInfo.baseName()];
|
auto& nameMatches = _textureNameMatchCount[textureFileInfo.baseName()];
|
||||||
|
|
||||||
QString bakedTextureFileName{ textureFileInfo.completeBaseName() };
|
QString baseTextureFileName{ textureFileInfo.completeBaseName() };
|
||||||
|
|
||||||
if (nameMatches > 0) {
|
if (nameMatches > 0) {
|
||||||
// there are already nameMatches texture with this name
|
// there are already nameMatches texture with this name
|
||||||
// append - and that number to our baked texture file name so that it is unique
|
// append - and that number to our baked texture file name so that it is unique
|
||||||
bakedTextureFileName += "-" + QString::number(nameMatches);
|
baseTextureFileName += "-" + QString::number(nameMatches);
|
||||||
}
|
}
|
||||||
|
|
||||||
bakedTextureFileName += BAKED_TEXTURE_EXT;
|
|
||||||
|
|
||||||
// increment the number of name matches
|
// increment the number of name matches
|
||||||
++nameMatches;
|
++nameMatches;
|
||||||
|
|
||||||
return bakedTextureFileName;
|
return baseTextureFileName;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ModelBaker::setWasAborted(bool wasAborted) {
|
void ModelBaker::setWasAborted(bool wasAborted) {
|
||||||
|
@ -519,3 +519,91 @@ void ModelBaker::setWasAborted(bool wasAborted) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ModelBaker::texturesFinished() {
|
||||||
|
embedTextureMetaData();
|
||||||
|
exportScene();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModelBaker::embedTextureMetaData() {
|
||||||
|
std::vector<FBXNode> embeddedTextureNodes;
|
||||||
|
|
||||||
|
for (FBXNode& rootChild : _rootNode.children) {
|
||||||
|
if (rootChild.name == "Objects") {
|
||||||
|
qlonglong maxId = 0;
|
||||||
|
for (auto &child : rootChild.children) {
|
||||||
|
if (child.properties.length() == 3) {
|
||||||
|
maxId = std::max(maxId, child.properties[0].toLongLong());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
for (auto& object : rootChild.children) {
|
||||||
|
if (object.name == "Texture") {
|
||||||
|
QVariant relativeFilename;
|
||||||
|
for (auto& child : object.children) {
|
||||||
|
if (child.name == "RelativeFilename") {
|
||||||
|
relativeFilename = child.properties[0];
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (relativeFilename.isNull()
|
||||||
|
|| !relativeFilename.toString().endsWith(BAKED_META_TEXTURE_SUFFIX)) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (object.properties.length() < 2) {
|
||||||
|
qWarning() << "Found texture with unexpected number of properties: " << object.name;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
FBXNode videoNode;
|
||||||
|
videoNode.name = "Video";
|
||||||
|
videoNode.properties.append(++maxId);
|
||||||
|
videoNode.properties.append(object.properties[1]);
|
||||||
|
videoNode.properties.append("Clip");
|
||||||
|
|
||||||
|
QString bakedTextureFilePath {
|
||||||
|
_bakedOutputDir + "/" + relativeFilename.toString()
|
||||||
|
};
|
||||||
|
|
||||||
|
QFile textureFile { bakedTextureFilePath };
|
||||||
|
if (!textureFile.open(QIODevice::ReadOnly)) {
|
||||||
|
qWarning() << "Failed to open: " << bakedTextureFilePath;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
videoNode.children.append({ "RelativeFilename", { relativeFilename }, { } });
|
||||||
|
videoNode.children.append({ "Content", { textureFile.readAll() }, { } });
|
||||||
|
|
||||||
|
rootChild.children.append(videoNode);
|
||||||
|
|
||||||
|
textureFile.close();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void ModelBaker::exportScene() {
|
||||||
|
// save the relative path to this FBX inside our passed output folder
|
||||||
|
auto fileName = _modelURL.fileName();
|
||||||
|
auto baseName = fileName.left(fileName.lastIndexOf('.'));
|
||||||
|
auto bakedFilename = baseName + BAKED_FBX_EXTENSION;
|
||||||
|
|
||||||
|
_bakedModelFilePath = _bakedOutputDir + "/" + bakedFilename;
|
||||||
|
|
||||||
|
auto fbxData = FBXWriter::encodeFBX(_rootNode);
|
||||||
|
|
||||||
|
QFile bakedFile(_bakedModelFilePath);
|
||||||
|
|
||||||
|
if (!bakedFile.open(QIODevice::WriteOnly)) {
|
||||||
|
handleError("Error opening " + _bakedModelFilePath + " for writing");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
bakedFile.write(fbxData);
|
||||||
|
|
||||||
|
_outputFiles.push_back(_bakedModelFilePath);
|
||||||
|
|
||||||
|
qCDebug(model_baking) << "Exported" << _modelURL << "with re-written paths to" << _bakedModelFilePath;
|
||||||
|
}
|
||||||
|
|
|
@ -29,6 +29,8 @@
|
||||||
using TextureBakerThreadGetter = std::function<QThread*()>;
|
using TextureBakerThreadGetter = std::function<QThread*()>;
|
||||||
using GetMaterialIDCallback = std::function <int(int)>;
|
using GetMaterialIDCallback = std::function <int(int)>;
|
||||||
|
|
||||||
|
static const QString BAKED_FBX_EXTENSION = ".baked.fbx";
|
||||||
|
|
||||||
class ModelBaker : public Baker {
|
class ModelBaker : public Baker {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
|
@ -49,7 +51,11 @@ public slots:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void checkIfTexturesFinished();
|
void checkIfTexturesFinished();
|
||||||
|
void texturesFinished();
|
||||||
|
void embedTextureMetaData();
|
||||||
|
void exportScene();
|
||||||
|
|
||||||
|
FBXNode _rootNode;
|
||||||
QHash<QByteArray, QByteArray> _textureContentMap;
|
QHash<QByteArray, QByteArray> _textureContentMap;
|
||||||
QUrl _modelURL;
|
QUrl _modelURL;
|
||||||
QString _bakedOutputDir;
|
QString _bakedOutputDir;
|
||||||
|
@ -63,7 +69,7 @@ private slots:
|
||||||
void handleAbortedTexture();
|
void handleAbortedTexture();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString createBakedTextureFileName(const QFileInfo & textureFileInfo);
|
QString createBaseTextureFileName(const QFileInfo & textureFileInfo);
|
||||||
QUrl getTextureURL(const QFileInfo& textureFileInfo, QString relativeFileName, bool isEmbedded = false);
|
QUrl getTextureURL(const QFileInfo& textureFileInfo, QString relativeFileName, bool isEmbedded = false);
|
||||||
void bakeTexture(const QUrl & textureURL, image::TextureUsage::Type textureType, const QDir & outputDir,
|
void bakeTexture(const QUrl & textureURL, image::TextureUsage::Type textureType, const QDir & outputDir,
|
||||||
const QString & bakedFilename, const QByteArray & textureContent);
|
const QString & bakedFilename, const QByteArray & textureContent);
|
||||||
|
|
|
@ -9,10 +9,11 @@
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#include "OBJBaker.h"
|
||||||
|
|
||||||
#include <PathUtils.h>
|
#include <PathUtils.h>
|
||||||
#include <NetworkAccessManager.h>
|
#include <NetworkAccessManager.h>
|
||||||
|
|
||||||
#include "OBJBaker.h"
|
|
||||||
#include "OBJReader.h"
|
#include "OBJReader.h"
|
||||||
#include "FBXWriter.h"
|
#include "FBXWriter.h"
|
||||||
|
|
||||||
|
@ -147,31 +148,7 @@ void OBJBaker::bakeOBJ() {
|
||||||
auto geometry = reader.readOBJ(objData, QVariantHash(), combineParts, _modelURL);
|
auto geometry = reader.readOBJ(objData, QVariantHash(), combineParts, _modelURL);
|
||||||
|
|
||||||
// Write OBJ Data as FBX tree nodes
|
// Write OBJ Data as FBX tree nodes
|
||||||
FBXNode rootNode;
|
createFBXNodeTree(_rootNode, *geometry);
|
||||||
createFBXNodeTree(rootNode, *geometry);
|
|
||||||
|
|
||||||
// Serialize the resultant FBX tree
|
|
||||||
auto encodedFBX = FBXWriter::encodeFBX(rootNode);
|
|
||||||
|
|
||||||
// Export as baked FBX
|
|
||||||
auto fileName = _modelURL.fileName();
|
|
||||||
auto baseName = fileName.left(fileName.lastIndexOf('.'));
|
|
||||||
auto bakedFilename = baseName + ".baked.fbx";
|
|
||||||
|
|
||||||
_bakedModelFilePath = _bakedOutputDir + "/" + bakedFilename;
|
|
||||||
|
|
||||||
QFile bakedFile;
|
|
||||||
bakedFile.setFileName(_bakedModelFilePath);
|
|
||||||
if (!bakedFile.open(QIODevice::WriteOnly)) {
|
|
||||||
handleError("Error opening " + _bakedModelFilePath + " for writing");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
bakedFile.write(encodedFBX);
|
|
||||||
|
|
||||||
// Export successful
|
|
||||||
_outputFiles.push_back(_bakedModelFilePath);
|
|
||||||
qCDebug(model_baking) << "Exported" << _modelURL << "to" << _bakedModelFilePath;
|
|
||||||
|
|
||||||
checkIfTexturesFinished();
|
checkIfTexturesFinished();
|
||||||
}
|
}
|
||||||
|
@ -203,15 +180,17 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
globalSettingsNode.children = { properties70Node };
|
globalSettingsNode.children = { properties70Node };
|
||||||
|
|
||||||
// Generating Object node
|
// Generating Object node
|
||||||
_objectNode.name = OBJECTS_NODE_NAME;
|
FBXNode objectNode;
|
||||||
|
objectNode.name = OBJECTS_NODE_NAME;
|
||||||
|
|
||||||
// Generating Object node's child - Geometry node
|
// Generating Object node's child - Geometry node
|
||||||
FBXNode geometryNode;
|
FBXNode geometryNode;
|
||||||
geometryNode.name = GEOMETRY_NODE_NAME;
|
geometryNode.name = GEOMETRY_NODE_NAME;
|
||||||
|
NodeID geometryID;
|
||||||
{
|
{
|
||||||
_geometryID = nextNodeID();
|
geometryID = nextNodeID();
|
||||||
geometryNode.properties = {
|
geometryNode.properties = {
|
||||||
_geometryID,
|
geometryID,
|
||||||
GEOMETRY_NODE_NAME,
|
GEOMETRY_NODE_NAME,
|
||||||
MESH
|
MESH
|
||||||
};
|
};
|
||||||
|
@ -226,12 +205,13 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
// Generating Object node's child - Model node
|
// Generating Object node's child - Model node
|
||||||
FBXNode modelNode;
|
FBXNode modelNode;
|
||||||
modelNode.name = MODEL_NODE_NAME;
|
modelNode.name = MODEL_NODE_NAME;
|
||||||
|
NodeID modelID;
|
||||||
{
|
{
|
||||||
_modelID = nextNodeID();
|
modelID = nextNodeID();
|
||||||
modelNode.properties = { _modelID, MODEL_NODE_NAME, MESH };
|
modelNode.properties = { modelID, MODEL_NODE_NAME, MESH };
|
||||||
}
|
}
|
||||||
|
|
||||||
_objectNode.children = { geometryNode, modelNode };
|
objectNode.children = { geometryNode, modelNode };
|
||||||
|
|
||||||
// Generating Objects node's child - Material node
|
// Generating Objects node's child - Material node
|
||||||
auto& meshParts = geometry.meshes[0].parts;
|
auto& meshParts = geometry.meshes[0].parts;
|
||||||
|
@ -247,7 +227,7 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
setMaterialNodeProperties(materialNode, meshPart.materialID, geometry);
|
setMaterialNodeProperties(materialNode, meshPart.materialID, geometry);
|
||||||
}
|
}
|
||||||
|
|
||||||
_objectNode.children.append(materialNode);
|
objectNode.children.append(materialNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Generating Texture Node
|
// Generating Texture Node
|
||||||
|
@ -257,13 +237,13 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
QString material = meshParts[i].materialID;
|
QString material = meshParts[i].materialID;
|
||||||
FBXMaterial currentMaterial = geometry.materials[material];
|
FBXMaterial currentMaterial = geometry.materials[material];
|
||||||
if (!currentMaterial.albedoTexture.filename.isEmpty() || !currentMaterial.specularTexture.filename.isEmpty()) {
|
if (!currentMaterial.albedoTexture.filename.isEmpty() || !currentMaterial.specularTexture.filename.isEmpty()) {
|
||||||
_textureID = nextNodeID();
|
auto textureID = nextNodeID();
|
||||||
_mapTextureMaterial.emplace_back(_textureID, i);
|
_mapTextureMaterial.emplace_back(textureID, i);
|
||||||
|
|
||||||
FBXNode textureNode;
|
FBXNode textureNode;
|
||||||
{
|
{
|
||||||
textureNode.name = TEXTURE_NODE_NAME;
|
textureNode.name = TEXTURE_NODE_NAME;
|
||||||
textureNode.properties = { _textureID };
|
textureNode.properties = { textureID, "texture" + QString::number(textureID) };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Texture node child - TextureName node
|
// Texture node child - TextureName node
|
||||||
|
@ -295,7 +275,7 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
|
|
||||||
textureNode.children = { textureNameNode, relativeFilenameNode };
|
textureNode.children = { textureNameNode, relativeFilenameNode };
|
||||||
|
|
||||||
_objectNode.children.append(textureNode);
|
objectNode.children.append(textureNode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -306,14 +286,14 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
// connect Geometry to Model
|
// connect Geometry to Model
|
||||||
FBXNode cNode;
|
FBXNode cNode;
|
||||||
cNode.name = C_NODE_NAME;
|
cNode.name = C_NODE_NAME;
|
||||||
cNode.properties = { CONNECTIONS_NODE_PROPERTY, _geometryID, _modelID };
|
cNode.properties = { CONNECTIONS_NODE_PROPERTY, geometryID, modelID };
|
||||||
connectionsNode.children = { cNode };
|
connectionsNode.children = { cNode };
|
||||||
|
|
||||||
// connect all materials to model
|
// connect all materials to model
|
||||||
for (auto& materialID : _materialIDs) {
|
for (auto& materialID : _materialIDs) {
|
||||||
FBXNode cNode;
|
FBXNode cNode;
|
||||||
cNode.name = C_NODE_NAME;
|
cNode.name = C_NODE_NAME;
|
||||||
cNode.properties = { CONNECTIONS_NODE_PROPERTY, materialID, _modelID };
|
cNode.properties = { CONNECTIONS_NODE_PROPERTY, materialID, modelID };
|
||||||
connectionsNode.children.append(cNode);
|
connectionsNode.children.append(cNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -341,7 +321,7 @@ void OBJBaker::createFBXNodeTree(FBXNode& rootNode, FBXGeometry& geometry) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Make all generated nodes children of rootNode
|
// Make all generated nodes children of rootNode
|
||||||
rootNode.children = { globalSettingsNode, _objectNode, connectionsNode };
|
rootNode.children = { globalSettingsNode, objectNode, connectionsNode };
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set properties for material nodes
|
// Set properties for material nodes
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue