mirror of
https://github.com/overte-org/overte.git
synced 2025-07-22 19:18:33 +02:00
Merge branch 'master' into menu-updates
This commit is contained in:
commit
c7ab1f3dbf
329 changed files with 2009 additions and 1624 deletions
|
@ -548,18 +548,18 @@ void Agent::setIsAvatar(bool isAvatar) {
|
||||||
if (_isAvatar && !_avatarIdentityTimer) {
|
if (_isAvatar && !_avatarIdentityTimer) {
|
||||||
// set up the avatar timers
|
// set up the avatar timers
|
||||||
_avatarIdentityTimer = new QTimer(this);
|
_avatarIdentityTimer = new QTimer(this);
|
||||||
_avatarViewTimer = new QTimer(this);
|
_avatarQueryTimer = new QTimer(this);
|
||||||
|
|
||||||
// connect our slot
|
// connect our slot
|
||||||
connect(_avatarIdentityTimer, &QTimer::timeout, this, &Agent::sendAvatarIdentityPacket);
|
connect(_avatarIdentityTimer, &QTimer::timeout, this, &Agent::sendAvatarIdentityPacket);
|
||||||
connect(_avatarViewTimer, &QTimer::timeout, this, &Agent::sendAvatarViewFrustum);
|
connect(_avatarQueryTimer, &QTimer::timeout, this, &Agent::queryAvatars);
|
||||||
|
|
||||||
static const int AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS = 1000;
|
static const int AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS = 1000;
|
||||||
static const int AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS = 1000;
|
static const int AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS = 1000;
|
||||||
|
|
||||||
// start the timers
|
// start the timers
|
||||||
_avatarIdentityTimer->start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS); // FIXME - we shouldn't really need to constantly send identity packets
|
_avatarIdentityTimer->start(AVATAR_IDENTITY_PACKET_SEND_INTERVAL_MSECS); // FIXME - we shouldn't really need to constantly send identity packets
|
||||||
_avatarViewTimer->start(AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS);
|
_avatarQueryTimer->start(AVATAR_VIEW_PACKET_SEND_INTERVAL_MSECS);
|
||||||
|
|
||||||
// tell the avatarAudioTimer to start ticking
|
// tell the avatarAudioTimer to start ticking
|
||||||
QMetaObject::invokeMethod(&_avatarAudioTimer, "start");
|
QMetaObject::invokeMethod(&_avatarAudioTimer, "start");
|
||||||
|
@ -572,9 +572,9 @@ void Agent::setIsAvatar(bool isAvatar) {
|
||||||
delete _avatarIdentityTimer;
|
delete _avatarIdentityTimer;
|
||||||
_avatarIdentityTimer = nullptr;
|
_avatarIdentityTimer = nullptr;
|
||||||
|
|
||||||
_avatarViewTimer->stop();
|
_avatarQueryTimer->stop();
|
||||||
delete _avatarViewTimer;
|
delete _avatarQueryTimer;
|
||||||
_avatarViewTimer = nullptr;
|
_avatarQueryTimer = nullptr;
|
||||||
|
|
||||||
// The avatar mixer never times out a connection (e.g., based on identity or data packets)
|
// The avatar mixer never times out a connection (e.g., based on identity or data packets)
|
||||||
// but rather keeps avatars in its list as long as "connected". As a result, clients timeout
|
// but rather keeps avatars in its list as long as "connected". As a result, clients timeout
|
||||||
|
@ -607,20 +607,26 @@ void Agent::sendAvatarIdentityPacket() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Agent::sendAvatarViewFrustum() {
|
void Agent::queryAvatars() {
|
||||||
auto scriptedAvatar = DependencyManager::get<ScriptableAvatar>();
|
auto scriptedAvatar = DependencyManager::get<ScriptableAvatar>();
|
||||||
|
|
||||||
ViewFrustum view;
|
ViewFrustum view;
|
||||||
view.setPosition(scriptedAvatar->getWorldPosition());
|
view.setPosition(scriptedAvatar->getWorldPosition());
|
||||||
view.setOrientation(scriptedAvatar->getHeadOrientation());
|
view.setOrientation(scriptedAvatar->getHeadOrientation());
|
||||||
view.calculate();
|
view.calculate();
|
||||||
|
ConicalViewFrustum conicalView { view };
|
||||||
|
|
||||||
|
auto avatarPacket = NLPacket::create(PacketType::AvatarQuery);
|
||||||
|
auto destinationBuffer = reinterpret_cast<unsigned char*>(avatarPacket->getPayload());
|
||||||
|
auto bufferStart = destinationBuffer;
|
||||||
|
|
||||||
uint8_t numFrustums = 1;
|
uint8_t numFrustums = 1;
|
||||||
auto viewFrustumByteArray = view.toByteArray();
|
memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums));
|
||||||
|
destinationBuffer += sizeof(numFrustums);
|
||||||
|
|
||||||
auto avatarPacket = NLPacket::create(PacketType::ViewFrustum, viewFrustumByteArray.size() + sizeof(numFrustums));
|
destinationBuffer += conicalView.serialize(destinationBuffer);
|
||||||
avatarPacket->writePrimitive(numFrustums);
|
|
||||||
avatarPacket->write(viewFrustumByteArray);
|
avatarPacket->setPayloadSize(destinationBuffer - bufferStart);
|
||||||
|
|
||||||
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(avatarPacket),
|
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(avatarPacket),
|
||||||
{ NodeType::AvatarMixer });
|
{ NodeType::AvatarMixer });
|
||||||
|
|
|
@ -97,7 +97,7 @@ private:
|
||||||
void setAvatarSound(SharedSoundPointer avatarSound) { _avatarSound = avatarSound; }
|
void setAvatarSound(SharedSoundPointer avatarSound) { _avatarSound = avatarSound; }
|
||||||
|
|
||||||
void sendAvatarIdentityPacket();
|
void sendAvatarIdentityPacket();
|
||||||
void sendAvatarViewFrustum();
|
void queryAvatars();
|
||||||
|
|
||||||
QString _scriptContents;
|
QString _scriptContents;
|
||||||
QTimer* _scriptRequestTimeout { nullptr };
|
QTimer* _scriptRequestTimeout { nullptr };
|
||||||
|
@ -107,7 +107,7 @@ private:
|
||||||
int _numAvatarSoundSentBytes = 0;
|
int _numAvatarSoundSentBytes = 0;
|
||||||
bool _isAvatar = false;
|
bool _isAvatar = false;
|
||||||
QTimer* _avatarIdentityTimer = nullptr;
|
QTimer* _avatarIdentityTimer = nullptr;
|
||||||
QTimer* _avatarViewTimer = nullptr;
|
QTimer* _avatarQueryTimer = nullptr;
|
||||||
QHash<QUuid, quint16> _outgoingScriptAudioSequenceNumbers;
|
QHash<QUuid, quint16> _outgoingScriptAudioSequenceNumbers;
|
||||||
|
|
||||||
AudioGate _audioGate;
|
AudioGate _audioGate;
|
||||||
|
|
|
@ -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.
|
||||||
|
@ -47,7 +47,7 @@ AvatarMixer::AvatarMixer(ReceivedMessage& message) :
|
||||||
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();
|
auto& packetReceiver = DependencyManager::get<NodeList>()->getPacketReceiver();
|
||||||
packetReceiver.registerListener(PacketType::AvatarData, this, "queueIncomingPacket");
|
packetReceiver.registerListener(PacketType::AvatarData, this, "queueIncomingPacket");
|
||||||
packetReceiver.registerListener(PacketType::AdjustAvatarSorting, this, "handleAdjustAvatarSorting");
|
packetReceiver.registerListener(PacketType::AdjustAvatarSorting, this, "handleAdjustAvatarSorting");
|
||||||
packetReceiver.registerListener(PacketType::ViewFrustum, this, "handleViewFrustumPacket");
|
packetReceiver.registerListener(PacketType::AvatarQuery, this, "handleAvatarQueryPacket");
|
||||||
packetReceiver.registerListener(PacketType::AvatarIdentity, this, "handleAvatarIdentityPacket");
|
packetReceiver.registerListener(PacketType::AvatarIdentity, this, "handleAvatarIdentityPacket");
|
||||||
packetReceiver.registerListener(PacketType::KillAvatar, this, "handleKillAvatarPacket");
|
packetReceiver.registerListener(PacketType::KillAvatar, this, "handleKillAvatarPacket");
|
||||||
packetReceiver.registerListener(PacketType::NodeIgnoreRequest, this, "handleNodeIgnoreRequestPacket");
|
packetReceiver.registerListener(PacketType::NodeIgnoreRequest, this, "handleNodeIgnoreRequestPacket");
|
||||||
|
@ -517,7 +517,7 @@ void AvatarMixer::handleAdjustAvatarSorting(QSharedPointer<ReceivedMessage> mess
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void AvatarMixer::handleViewFrustumPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
void AvatarMixer::handleAvatarQueryPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode) {
|
||||||
auto start = usecTimestampNow();
|
auto start = usecTimestampNow();
|
||||||
getOrCreateClientData(senderNode);
|
getOrCreateClientData(senderNode);
|
||||||
|
|
||||||
|
@ -683,7 +683,7 @@ void AvatarMixer::sendStatsPacket() {
|
||||||
incomingPacketStats["handleNodeIgnoreRequestPacket"] = TIGHT_LOOP_STAT_UINT64(_handleNodeIgnoreRequestPacketElapsedTime);
|
incomingPacketStats["handleNodeIgnoreRequestPacket"] = TIGHT_LOOP_STAT_UINT64(_handleNodeIgnoreRequestPacketElapsedTime);
|
||||||
incomingPacketStats["handleRadiusIgnoreRequestPacket"] = TIGHT_LOOP_STAT_UINT64(_handleRadiusIgnoreRequestPacketElapsedTime);
|
incomingPacketStats["handleRadiusIgnoreRequestPacket"] = TIGHT_LOOP_STAT_UINT64(_handleRadiusIgnoreRequestPacketElapsedTime);
|
||||||
incomingPacketStats["handleRequestsDomainListDataPacket"] = TIGHT_LOOP_STAT_UINT64(_handleRequestsDomainListDataPacketElapsedTime);
|
incomingPacketStats["handleRequestsDomainListDataPacket"] = TIGHT_LOOP_STAT_UINT64(_handleRequestsDomainListDataPacketElapsedTime);
|
||||||
incomingPacketStats["handleViewFrustumPacket"] = TIGHT_LOOP_STAT_UINT64(_handleViewFrustumPacketElapsedTime);
|
incomingPacketStats["handleAvatarQueryPacket"] = TIGHT_LOOP_STAT_UINT64(_handleViewFrustumPacketElapsedTime);
|
||||||
|
|
||||||
singleCoreTasks["incoming_packets"] = incomingPacketStats;
|
singleCoreTasks["incoming_packets"] = incomingPacketStats;
|
||||||
singleCoreTasks["sendStats"] = (float)_sendStatsElapsedTime;
|
singleCoreTasks["sendStats"] = (float)_sendStatsElapsedTime;
|
||||||
|
|
|
@ -46,7 +46,7 @@ public slots:
|
||||||
private slots:
|
private slots:
|
||||||
void queueIncomingPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node);
|
void queueIncomingPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer node);
|
||||||
void handleAdjustAvatarSorting(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleAdjustAvatarSorting(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
void handleViewFrustumPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleAvatarQueryPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
void handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleAvatarIdentityPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
void handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleKillAvatarPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
void handleNodeIgnoreRequestPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleNodeIgnoreRequestPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
|
|
|
@ -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)
|
||||||
{
|
{
|
||||||
|
@ -126,17 +126,18 @@ void AvatarMixerClientData::removeFromRadiusIgnoringSet(SharedNodePointer self,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AvatarMixerClientData::readViewFrustumPacket(QByteArray message) {
|
void AvatarMixerClientData::readViewFrustumPacket(const QByteArray& message) {
|
||||||
_currentViewFrustums.clear();
|
_currentViewFrustums.clear();
|
||||||
|
|
||||||
|
auto sourceBuffer = reinterpret_cast<const unsigned char*>(message.constData());
|
||||||
|
|
||||||
uint8_t numFrustums = 0;
|
uint8_t numFrustums = 0;
|
||||||
memcpy(&numFrustums, message.constData(), sizeof(numFrustums));
|
memcpy(&numFrustums, sourceBuffer, sizeof(numFrustums));
|
||||||
message.remove(0, sizeof(numFrustums));
|
sourceBuffer += sizeof(numFrustums);
|
||||||
|
|
||||||
for (uint8_t i = 0; i < numFrustums; ++i) {
|
for (uint8_t i = 0; i < numFrustums; ++i) {
|
||||||
ViewFrustum frustum;
|
ConicalViewFrustum frustum;
|
||||||
auto bytesRead = frustum.fromByteArray(message);
|
sourceBuffer += frustum.deserialize(sourceBuffer);
|
||||||
message.remove(0, bytesRead);
|
|
||||||
|
|
||||||
_currentViewFrustums.push_back(frustum);
|
_currentViewFrustums.push_back(frustum);
|
||||||
}
|
}
|
||||||
|
@ -144,8 +145,8 @@ void AvatarMixerClientData::readViewFrustumPacket(QByteArray message) {
|
||||||
|
|
||||||
bool AvatarMixerClientData::otherAvatarInView(const AABox& otherAvatarBox) {
|
bool AvatarMixerClientData::otherAvatarInView(const AABox& otherAvatarBox) {
|
||||||
return std::any_of(std::begin(_currentViewFrustums), std::end(_currentViewFrustums),
|
return std::any_of(std::begin(_currentViewFrustums), std::end(_currentViewFrustums),
|
||||||
[&](const ViewFrustum& viewFrustum) {
|
[&](const ConicalViewFrustum& viewFrustum) {
|
||||||
return viewFrustum.boxIntersectsKeyhole(otherAvatarBox);
|
return viewFrustum.intersects(otherAvatarBox);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@
|
||||||
#include <PortableHighResolutionClock.h>
|
#include <PortableHighResolutionClock.h>
|
||||||
#include <SimpleMovingAverage.h>
|
#include <SimpleMovingAverage.h>
|
||||||
#include <UUIDHasher.h>
|
#include <UUIDHasher.h>
|
||||||
#include <ViewFrustum.h>
|
#include <shared/ConicalViewFrustum.h>
|
||||||
|
|
||||||
const QString OUTBOUND_AVATAR_DATA_STATS_KEY = "outbound_av_data_kbps";
|
const QString OUTBOUND_AVATAR_DATA_STATS_KEY = "outbound_av_data_kbps";
|
||||||
const QString INBOUND_AVATAR_DATA_STATS_KEY = "inbound_av_data_kbps";
|
const QString INBOUND_AVATAR_DATA_STATS_KEY = "inbound_av_data_kbps";
|
||||||
|
@ -98,7 +98,7 @@ public:
|
||||||
void removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other);
|
void removeFromRadiusIgnoringSet(SharedNodePointer self, const QUuid& other);
|
||||||
void ignoreOther(SharedNodePointer self, SharedNodePointer other);
|
void ignoreOther(SharedNodePointer self, SharedNodePointer other);
|
||||||
|
|
||||||
void readViewFrustumPacket(QByteArray message);
|
void readViewFrustumPacket(const QByteArray& message);
|
||||||
|
|
||||||
bool otherAvatarInView(const AABox& otherAvatarBox);
|
bool otherAvatarInView(const AABox& otherAvatarBox);
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ public:
|
||||||
bool getRequestsDomainListData() { return _requestsDomainListData; }
|
bool getRequestsDomainListData() { return _requestsDomainListData; }
|
||||||
void setRequestsDomainListData(bool requesting) { _requestsDomainListData = requesting; }
|
void setRequestsDomainListData(bool requesting) { _requestsDomainListData = requesting; }
|
||||||
|
|
||||||
const ViewFrustums& getViewFrustums() const { return _currentViewFrustums; }
|
const ConicalViewFrustums& getViewFrustums() const { return _currentViewFrustums; }
|
||||||
|
|
||||||
uint64_t getLastOtherAvatarEncodeTime(QUuid otherAvatar) const;
|
uint64_t getLastOtherAvatarEncodeTime(QUuid otherAvatar) const;
|
||||||
void setLastOtherAvatarEncodeTime(const QUuid& otherAvatar, uint64_t time);
|
void setLastOtherAvatarEncodeTime(const QUuid& otherAvatar, uint64_t time);
|
||||||
|
@ -150,7 +150,7 @@ private:
|
||||||
|
|
||||||
SimpleMovingAverage _avgOtherAvatarDataRate;
|
SimpleMovingAverage _avgOtherAvatarDataRate;
|
||||||
std::unordered_set<QUuid> _radiusIgnoredOthers;
|
std::unordered_set<QUuid> _radiusIgnoredOthers;
|
||||||
ViewFrustums _currentViewFrustums;
|
ConicalViewFrustums _currentViewFrustums;
|
||||||
|
|
||||||
int _recentOtherAvatarsInView { 0 };
|
int _recentOtherAvatarsInView { 0 };
|
||||||
int _recentOtherAvatarsOutOfView { 0 };
|
int _recentOtherAvatarsOutOfView { 0 };
|
||||||
|
|
|
@ -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) {
|
||||||
|
|
|
@ -1,76 +0,0 @@
|
||||||
//
|
|
||||||
// EntityPriorityQueue.cpp
|
|
||||||
// assignment-client/src/entities
|
|
||||||
//
|
|
||||||
// Created by Andrew Meadows 2017.08.08
|
|
||||||
// Copyright 2017 High Fidelity, Inc.
|
|
||||||
//
|
|
||||||
// Distributed under the Apache License, Version 2.0.
|
|
||||||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
|
||||||
//
|
|
||||||
|
|
||||||
#include "EntityPriorityQueue.h"
|
|
||||||
|
|
||||||
const float PrioritizedEntity::DO_NOT_SEND = -1.0e-6f;
|
|
||||||
const float PrioritizedEntity::FORCE_REMOVE = -1.0e-5f;
|
|
||||||
const float PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY = 1.0f;
|
|
||||||
|
|
||||||
void ConicalViewFrustum::set(const ViewFrustum& viewFrustum) {
|
|
||||||
// The ConicalView has two parts: a central sphere (same as ViewFrustum) and a circular cone that bounds the frustum part.
|
|
||||||
// Why? Because approximate intersection tests are much faster to compute for a cone than for a frustum.
|
|
||||||
_position = viewFrustum.getPosition();
|
|
||||||
_direction = viewFrustum.getDirection();
|
|
||||||
|
|
||||||
// We cache the sin and cos of the half angle of the cone that bounds the frustum.
|
|
||||||
// (the math here is left as an exercise for the reader)
|
|
||||||
float A = viewFrustum.getAspectRatio();
|
|
||||||
float t = tanf(0.5f * viewFrustum.getFieldOfView());
|
|
||||||
_cosAngle = 1.0f / sqrtf(1.0f + (A * A + 1.0f) * (t * t));
|
|
||||||
_sinAngle = sqrtf(1.0f - _cosAngle * _cosAngle);
|
|
||||||
|
|
||||||
_radius = viewFrustum.getCenterRadius();
|
|
||||||
}
|
|
||||||
|
|
||||||
float ConicalViewFrustum::computePriority(const AACube& cube) const {
|
|
||||||
glm::vec3 p = cube.calcCenter() - _position; // position of bounding sphere in view-frame
|
|
||||||
float d = glm::length(p); // distance to center of bounding sphere
|
|
||||||
float r = 0.5f * cube.getScale(); // radius of bounding sphere
|
|
||||||
if (d < _radius + r) {
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
// We check the angle between the center of the cube and the _direction of the view.
|
|
||||||
// If it is less than the sum of the half-angle from center of cone to outer edge plus
|
|
||||||
// the half apparent angle of the bounding sphere then it is in view.
|
|
||||||
//
|
|
||||||
// The math here is left as an exercise for the reader with the following hints:
|
|
||||||
// (1) We actually check the dot product of the cube's local position rather than the angle and
|
|
||||||
// (2) we take advantage of this trig identity: cos(A+B) = cos(A)*cos(B) - sin(A)*sin(B)
|
|
||||||
if (glm::dot(p, _direction) > sqrtf(d * d - r * r) * _cosAngle - r * _sinAngle) {
|
|
||||||
const float AVOID_DIVIDE_BY_ZERO = 0.001f;
|
|
||||||
return r / (d + AVOID_DIVIDE_BY_ZERO);
|
|
||||||
}
|
|
||||||
return PrioritizedEntity::DO_NOT_SEND;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
void ConicalView::set(const DiffTraversal::View& view) {
|
|
||||||
auto size = view.viewFrustums.size();
|
|
||||||
_conicalViewFrustums.resize(size);
|
|
||||||
for (size_t i = 0; i < size; ++i) {
|
|
||||||
_conicalViewFrustums[i].set(view.viewFrustums[i]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
float ConicalView::computePriority(const AACube& cube) const {
|
|
||||||
if (_conicalViewFrustums.empty()) {
|
|
||||||
return PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
float priority = PrioritizedEntity::DO_NOT_SEND;
|
|
||||||
|
|
||||||
for (const auto& view : _conicalViewFrustums) {
|
|
||||||
priority = std::max(priority, view.computePriority(cube));
|
|
||||||
}
|
|
||||||
|
|
||||||
return priority;
|
|
||||||
}
|
|
|
@ -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"
|
||||||
|
|
||||||
|
|
|
@ -107,16 +107,7 @@ void EntityTreeSendThread::traverseTreeAndSendContents(SharedNodePointer node, O
|
||||||
|
|
||||||
|
|
||||||
DiffTraversal::View newView;
|
DiffTraversal::View newView;
|
||||||
|
newView.viewFrustums = nodeData->getCurrentViews();
|
||||||
ViewFrustum viewFrustum;
|
|
||||||
if (nodeData->hasMainViewFrustum()) {
|
|
||||||
nodeData->copyCurrentMainViewFrustum(viewFrustum);
|
|
||||||
newView.viewFrustums.push_back(viewFrustum);
|
|
||||||
}
|
|
||||||
if (nodeData->hasSecondaryViewFrustum()) {
|
|
||||||
nodeData->copyCurrentSecondaryViewFrustum(viewFrustum);
|
|
||||||
newView.viewFrustums.push_back(viewFrustum);
|
|
||||||
}
|
|
||||||
|
|
||||||
int32_t lodLevelOffset = nodeData->getBoundaryLevelAdjust() + (viewFrustumChanged ? LOW_RES_MOVING_ADJUST : NO_BOUNDARY_ADJUST);
|
int32_t lodLevelOffset = nodeData->getBoundaryLevelAdjust() + (viewFrustumChanged ? LOW_RES_MOVING_ADJUST : NO_BOUNDARY_ADJUST);
|
||||||
newView.lodScaleFactor = powf(2.0f, lodLevelOffset);
|
newView.lodScaleFactor = powf(2.0f, lodLevelOffset);
|
||||||
|
@ -141,16 +132,8 @@ void EntityTreeSendThread::traverseTreeAndSendContents(SharedNodePointer node, O
|
||||||
if (forceRemove) {
|
if (forceRemove) {
|
||||||
priority = PrioritizedEntity::FORCE_REMOVE;
|
priority = PrioritizedEntity::FORCE_REMOVE;
|
||||||
} else {
|
} else {
|
||||||
bool success = false;
|
const auto& view = _traversal.getCurrentView();
|
||||||
AACube cube = entity->getQueryAACube(success);
|
priority = view.computePriority(entity);
|
||||||
if (success) {
|
|
||||||
const auto& view = _traversal.getCurrentView();
|
|
||||||
if (view.intersects(cube) && view.isBigEnough(cube)) {
|
|
||||||
priority = _conicalView.computePriority(cube);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
||||||
|
@ -235,11 +218,6 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
// (3) Differential = view has changed --> find what has changed or in new view but not old
|
// (3) Differential = view has changed --> find what has changed or in new view but not old
|
||||||
//
|
//
|
||||||
// The "scanCallback" we provide to the traversal depends on the type:
|
// The "scanCallback" we provide to the traversal depends on the type:
|
||||||
//
|
|
||||||
// The _conicalView is updated here as a cached view approximation used by the lambdas for efficient
|
|
||||||
// computation of entity sorting priorities.
|
|
||||||
//
|
|
||||||
_conicalView.set(_traversal.getCurrentView());
|
|
||||||
|
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case DiffTraversal::First:
|
case DiffTraversal::First:
|
||||||
|
@ -251,25 +229,8 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
if (_sendQueue.contains(entity.get())) {
|
if (_sendQueue.contains(entity.get())) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
float priority = PrioritizedEntity::DO_NOT_SEND;
|
const auto& view = _traversal.getCurrentView();
|
||||||
|
float priority = view.computePriority(entity);
|
||||||
|
|
||||||
bool success = false;
|
|
||||||
AACube cube = entity->getQueryAACube(success);
|
|
||||||
if (success) {
|
|
||||||
const auto& view = _traversal.getCurrentView();
|
|
||||||
// Check the size of the entity, it's possible that a "too small to see" entity is included in a
|
|
||||||
// larger octree cell because of its position (for example if it crosses the boundary of a cell it
|
|
||||||
// pops to the next higher cell. So we want to check to see that the entity is large enough to be seen
|
|
||||||
// before we consider including it.
|
|
||||||
if ((next.intersection == ViewFrustum::INSIDE || view.intersects(cube)) &&
|
|
||||||
view.isBigEnough(cube)) {
|
|
||||||
priority = _conicalView.computePriority(cube);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
||||||
_sendQueue.emplace(entity, priority);
|
_sendQueue.emplace(entity, priority);
|
||||||
|
@ -288,21 +249,11 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
}
|
}
|
||||||
float priority = PrioritizedEntity::DO_NOT_SEND;
|
float priority = PrioritizedEntity::DO_NOT_SEND;
|
||||||
|
|
||||||
|
|
||||||
auto knownTimestamp = _knownState.find(entity.get());
|
auto knownTimestamp = _knownState.find(entity.get());
|
||||||
if (knownTimestamp == _knownState.end()) {
|
if (knownTimestamp == _knownState.end()) {
|
||||||
bool success = false;
|
const auto& view = _traversal.getCurrentView();
|
||||||
AACube cube = entity->getQueryAACube(success);
|
priority = view.computePriority(entity);
|
||||||
if (success) {
|
|
||||||
const auto& view = _traversal.getCurrentView();
|
|
||||||
// See the DiffTraversal::First case for an explanation of the "entity is too small" check
|
|
||||||
if ((next.intersection == ViewFrustum::INSIDE || view.intersects(cube)) &&
|
|
||||||
view.isBigEnough(cube)) {
|
|
||||||
priority = _conicalView.computePriority(cube);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
|
||||||
}
|
|
||||||
} else if (entity->getLastEdited() > knownTimestamp->second ||
|
} else if (entity->getLastEdited() > knownTimestamp->second ||
|
||||||
entity->getLastChangedOnServer() > knownTimestamp->second) {
|
entity->getLastChangedOnServer() > knownTimestamp->second) {
|
||||||
// it is known and it changed --> put it on the queue with any priority
|
// it is known and it changed --> put it on the queue with any priority
|
||||||
|
@ -310,7 +261,6 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
||||||
_sendQueue.emplace(entity, priority);
|
_sendQueue.emplace(entity, priority);
|
||||||
}
|
}
|
||||||
|
@ -328,21 +278,11 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
}
|
}
|
||||||
float priority = PrioritizedEntity::DO_NOT_SEND;
|
float priority = PrioritizedEntity::DO_NOT_SEND;
|
||||||
|
|
||||||
|
|
||||||
auto knownTimestamp = _knownState.find(entity.get());
|
auto knownTimestamp = _knownState.find(entity.get());
|
||||||
if (knownTimestamp == _knownState.end()) {
|
if (knownTimestamp == _knownState.end()) {
|
||||||
bool success = false;
|
const auto& view = _traversal.getCurrentView();
|
||||||
AACube cube = entity->getQueryAACube(success);
|
priority = view.computePriority(entity);
|
||||||
if (success) {
|
|
||||||
const auto& view = _traversal.getCurrentView();
|
|
||||||
// See the DiffTraversal::First case for an explanation of the "entity is too small" check
|
|
||||||
if ((next.intersection == ViewFrustum::INSIDE || view.intersects(cube)) &&
|
|
||||||
view.isBigEnough(cube)) {
|
|
||||||
priority = _conicalView.computePriority(cube);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
|
||||||
}
|
|
||||||
} else if (entity->getLastEdited() > knownTimestamp->second ||
|
} else if (entity->getLastEdited() > knownTimestamp->second ||
|
||||||
entity->getLastChangedOnServer() > knownTimestamp->second) {
|
entity->getLastChangedOnServer() > knownTimestamp->second) {
|
||||||
// it is known and it changed --> put it on the queue with any priority
|
// it is known and it changed --> put it on the queue with any priority
|
||||||
|
@ -350,7 +290,6 @@ void EntityTreeSendThread::startNewTraversal(const DiffTraversal::View& view, En
|
||||||
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
priority = PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
if (priority != PrioritizedEntity::DO_NOT_SEND) {
|
||||||
_sendQueue.emplace(entity, priority);
|
_sendQueue.emplace(entity, priority);
|
||||||
}
|
}
|
||||||
|
@ -463,14 +402,13 @@ bool EntityTreeSendThread::traverseTreeAndBuildNextPacketPayload(EncodeBitstream
|
||||||
void EntityTreeSendThread::editingEntityPointer(const EntityItemPointer& entity) {
|
void EntityTreeSendThread::editingEntityPointer(const EntityItemPointer& entity) {
|
||||||
if (entity) {
|
if (entity) {
|
||||||
if (!_sendQueue.contains(entity.get()) && _knownState.find(entity.get()) != _knownState.end()) {
|
if (!_sendQueue.contains(entity.get()) && _knownState.find(entity.get()) != _knownState.end()) {
|
||||||
bool success = false;
|
const auto& view = _traversal.getCurrentView();
|
||||||
AACube cube = entity->getQueryAACube(success);
|
float priority = view.computePriority(entity);
|
||||||
if (success) {
|
|
||||||
// We can force a removal from _knownState if the current view is used and entity is out of view
|
// We can force a removal from _knownState if the current view is used and entity is out of view
|
||||||
if (_traversal.doesCurrentUseViewFrustum() && !_traversal.getCurrentView().intersects(cube)) {
|
if (priority == PrioritizedEntity::DO_NOT_SEND) {
|
||||||
_sendQueue.emplace(entity, PrioritizedEntity::FORCE_REMOVE, true);
|
_sendQueue.emplace(entity, PrioritizedEntity::FORCE_REMOVE, true);
|
||||||
}
|
} else if (priority == PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY) {
|
||||||
} else {
|
|
||||||
_sendQueue.emplace(entity, PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY, true);
|
_sendQueue.emplace(entity, PrioritizedEntity::WHEN_IN_DOUBT_PRIORITY, true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,8 +17,9 @@
|
||||||
#include "../octree/OctreeSendThread.h"
|
#include "../octree/OctreeSendThread.h"
|
||||||
|
|
||||||
#include <DiffTraversal.h>
|
#include <DiffTraversal.h>
|
||||||
|
#include <EntityPriorityQueue.h>
|
||||||
|
#include <shared/ConicalViewFrustum.h>
|
||||||
|
|
||||||
#include "EntityPriorityQueue.h"
|
|
||||||
|
|
||||||
class EntityNodeData;
|
class EntityNodeData;
|
||||||
class EntityItem;
|
class EntityItem;
|
||||||
|
@ -51,7 +52,6 @@ private:
|
||||||
DiffTraversal _traversal;
|
DiffTraversal _traversal;
|
||||||
EntityPriorityQueue _sendQueue;
|
EntityPriorityQueue _sendQueue;
|
||||||
std::unordered_map<EntityItem*, uint64_t> _knownState;
|
std::unordered_map<EntityItem*, uint64_t> _knownState;
|
||||||
ConicalView _conicalView; // cached optimized view for fast priority calculations
|
|
||||||
|
|
||||||
// packet construction stuff
|
// packet construction stuff
|
||||||
EntityTreeElementExtraEncodeDataPointer _extraEncodeData { new EntityTreeElementExtraEncodeData() };
|
EntityTreeElementExtraEncodeDataPointer _extraEncodeData { new EntityTreeElementExtraEncodeData() };
|
||||||
|
|
|
@ -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";
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,10 @@ void OctreeHeadlessViewer::queryOctree() {
|
||||||
PacketType packetType = getMyQueryMessageType();
|
PacketType packetType = getMyQueryMessageType();
|
||||||
|
|
||||||
if (_hasViewFrustum) {
|
if (_hasViewFrustum) {
|
||||||
_octreeQuery.setMainViewFrustum(_viewFrustum);
|
ConicalViewFrustums views { _viewFrustum };
|
||||||
|
_octreeQuery.setConicalViews(views);
|
||||||
|
} else {
|
||||||
|
_octreeQuery.clearConicalViews();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
|
|
|
@ -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"
|
||||||
|
@ -330,7 +331,7 @@ int OctreeSendThread::packetDistributor(SharedNodePointer node, OctreeQueryNode*
|
||||||
} else {
|
} else {
|
||||||
// we aren't forcing a full scene, check if something else suggests we should
|
// we aren't forcing a full scene, check if something else suggests we should
|
||||||
isFullScene = nodeData->haveJSONParametersChanged() ||
|
isFullScene = nodeData->haveJSONParametersChanged() ||
|
||||||
(nodeData->hasMainViewFrustum() &&
|
(nodeData->hasConicalViews() &&
|
||||||
(nodeData->getViewFrustumJustStoppedChanging() ||
|
(nodeData->getViewFrustumJustStoppedChanging() ||
|
||||||
nodeData->hasLodChanged()));
|
nodeData->hasLodChanged()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -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) :
|
||||||
|
|
|
@ -47,6 +47,13 @@ Item {
|
||||||
|
|
||||||
onWalletAuthenticatedStatusResult: {
|
onWalletAuthenticatedStatusResult: {
|
||||||
submitPassphraseInputButton.enabled = true;
|
submitPassphraseInputButton.enabled = true;
|
||||||
|
|
||||||
|
// It's not possible to auth with a blank passphrase,
|
||||||
|
// so bail early if we get this signal without anything in the passphrase field
|
||||||
|
if (passphraseField.text === "") {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isAuthenticated) {
|
if (!isAuthenticated) {
|
||||||
errorText.text = "Authentication failed - please try again.";
|
errorText.text = "Authentication failed - please try again.";
|
||||||
passphraseField.error = true;
|
passphraseField.error = true;
|
||||||
|
@ -211,6 +218,10 @@ Item {
|
||||||
error = false;
|
error = false;
|
||||||
focus = true;
|
focus = true;
|
||||||
forceActiveFocus();
|
forceActiveFocus();
|
||||||
|
} else {
|
||||||
|
showPassphrase.checked = false;
|
||||||
|
passphraseField.text = "";
|
||||||
|
error = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -967,7 +967,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo
|
||||||
_entitySimulation(new PhysicalEntitySimulation()),
|
_entitySimulation(new PhysicalEntitySimulation()),
|
||||||
_physicsEngine(new PhysicsEngine(Vectors::ZERO)),
|
_physicsEngine(new PhysicsEngine(Vectors::ZERO)),
|
||||||
_entityClipboard(new EntityTree()),
|
_entityClipboard(new EntityTree()),
|
||||||
_lastQueriedTime(usecTimestampNow()),
|
|
||||||
_previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION),
|
_previousScriptLocation("LastScriptLocation", DESKTOP_LOCATION),
|
||||||
_fieldOfView("fieldOfView", DEFAULT_FIELD_OF_VIEW_DEGREES),
|
_fieldOfView("fieldOfView", DEFAULT_FIELD_OF_VIEW_DEGREES),
|
||||||
_hmdTabletScale("hmdTabletScale", DEFAULT_HMD_TABLET_SCALE_PERCENT),
|
_hmdTabletScale("hmdTabletScale", DEFAULT_HMD_TABLET_SCALE_PERCENT),
|
||||||
|
@ -1325,6 +1324,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.
|
||||||
|
@ -5081,7 +5081,7 @@ void Application::reloadResourceCaches() {
|
||||||
resetPhysicsReadyInformation();
|
resetPhysicsReadyInformation();
|
||||||
|
|
||||||
// Query the octree to refresh everything in view
|
// Query the octree to refresh everything in view
|
||||||
_lastQueriedTime = 0;
|
_queryExpiry = SteadyClock::now();
|
||||||
_octreeQuery.incrementConnectionID();
|
_octreeQuery.incrementConnectionID();
|
||||||
|
|
||||||
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
||||||
|
@ -5224,13 +5224,12 @@ void Application::updateSecondaryCameraViewFrustum() {
|
||||||
auto renderConfig = _renderEngine->getConfiguration();
|
auto renderConfig = _renderEngine->getConfiguration();
|
||||||
assert(renderConfig);
|
assert(renderConfig);
|
||||||
auto camera = dynamic_cast<SecondaryCameraJobConfig*>(renderConfig->getConfig("SecondaryCamera"));
|
auto camera = dynamic_cast<SecondaryCameraJobConfig*>(renderConfig->getConfig("SecondaryCamera"));
|
||||||
assert(camera);
|
|
||||||
|
|
||||||
if (!camera->isEnabled()) {
|
if (!camera || !camera->isEnabled()) {
|
||||||
_hasSecondaryViewFrustum = false;
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ViewFrustum secondaryViewFrustum;
|
||||||
if (camera->mirrorProjection && !camera->attachedEntityId.isNull()) {
|
if (camera->mirrorProjection && !camera->attachedEntityId.isNull()) {
|
||||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
||||||
auto entityProperties = entityScriptingInterface->getEntityProperties(camera->attachedEntityId);
|
auto entityProperties = entityScriptingInterface->getEntityProperties(camera->attachedEntityId);
|
||||||
|
@ -5255,36 +5254,37 @@ void Application::updateSecondaryCameraViewFrustum() {
|
||||||
|
|
||||||
// set frustum position to be mirrored camera and set orientation to mirror's adjusted rotation
|
// set frustum position to be mirrored camera and set orientation to mirror's adjusted rotation
|
||||||
glm::quat mirrorCameraOrientation = glm::quat_cast(worldFromMirrorRotation);
|
glm::quat mirrorCameraOrientation = glm::quat_cast(worldFromMirrorRotation);
|
||||||
_secondaryViewFrustum.setPosition(mirrorCameraPositionWorld);
|
secondaryViewFrustum.setPosition(mirrorCameraPositionWorld);
|
||||||
_secondaryViewFrustum.setOrientation(mirrorCameraOrientation);
|
secondaryViewFrustum.setOrientation(mirrorCameraOrientation);
|
||||||
|
|
||||||
// build frustum using mirror space translation of mirrored camera
|
// build frustum using mirror space translation of mirrored camera
|
||||||
float nearClip = mirrorCameraPositionMirror.z + mirrorPropertiesDimensions.z * 2.0f;
|
float nearClip = mirrorCameraPositionMirror.z + mirrorPropertiesDimensions.z * 2.0f;
|
||||||
glm::vec3 upperRight = halfMirrorPropertiesDimensions - mirrorCameraPositionMirror;
|
glm::vec3 upperRight = halfMirrorPropertiesDimensions - mirrorCameraPositionMirror;
|
||||||
glm::vec3 bottomLeft = -halfMirrorPropertiesDimensions - mirrorCameraPositionMirror;
|
glm::vec3 bottomLeft = -halfMirrorPropertiesDimensions - mirrorCameraPositionMirror;
|
||||||
glm::mat4 frustum = glm::frustum(bottomLeft.x, upperRight.x, bottomLeft.y, upperRight.y, nearClip, camera->farClipPlaneDistance);
|
glm::mat4 frustum = glm::frustum(bottomLeft.x, upperRight.x, bottomLeft.y, upperRight.y, nearClip, camera->farClipPlaneDistance);
|
||||||
_secondaryViewFrustum.setProjection(frustum);
|
secondaryViewFrustum.setProjection(frustum);
|
||||||
} else {
|
} else {
|
||||||
if (!camera->attachedEntityId.isNull()) {
|
if (!camera->attachedEntityId.isNull()) {
|
||||||
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
auto entityScriptingInterface = DependencyManager::get<EntityScriptingInterface>();
|
||||||
auto entityProperties = entityScriptingInterface->getEntityProperties(camera->attachedEntityId);
|
auto entityProperties = entityScriptingInterface->getEntityProperties(camera->attachedEntityId);
|
||||||
_secondaryViewFrustum.setPosition(entityProperties.getPosition());
|
secondaryViewFrustum.setPosition(entityProperties.getPosition());
|
||||||
_secondaryViewFrustum.setOrientation(entityProperties.getRotation());
|
secondaryViewFrustum.setOrientation(entityProperties.getRotation());
|
||||||
} else {
|
} else {
|
||||||
_secondaryViewFrustum.setPosition(camera->position);
|
secondaryViewFrustum.setPosition(camera->position);
|
||||||
_secondaryViewFrustum.setOrientation(camera->orientation);
|
secondaryViewFrustum.setOrientation(camera->orientation);
|
||||||
}
|
}
|
||||||
|
|
||||||
float aspectRatio = (float)camera->textureWidth / (float)camera->textureHeight;
|
float aspectRatio = (float)camera->textureWidth / (float)camera->textureHeight;
|
||||||
_secondaryViewFrustum.setProjection(camera->vFoV,
|
secondaryViewFrustum.setProjection(camera->vFoV,
|
||||||
aspectRatio,
|
aspectRatio,
|
||||||
camera->nearClipPlaneDistance,
|
camera->nearClipPlaneDistance,
|
||||||
camera->farClipPlaneDistance);
|
camera->farClipPlaneDistance);
|
||||||
}
|
}
|
||||||
// Without calculating the bound planes, the secondary camera will use the same culling frustum as the main camera,
|
// Without calculating the bound planes, the secondary camera will use the same culling frustum as the main camera,
|
||||||
// which is not what we want here.
|
// which is not what we want here.
|
||||||
_secondaryViewFrustum.calculate();
|
secondaryViewFrustum.calculate();
|
||||||
_hasSecondaryViewFrustum = true;
|
|
||||||
|
_conicalViews.push_back(secondaryViewFrustum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool domainLoadingInProgress = false;
|
static bool domainLoadingInProgress = false;
|
||||||
|
@ -5641,6 +5641,8 @@ void Application::update(float deltaTime) {
|
||||||
QMutexLocker viewLocker(&_viewMutex);
|
QMutexLocker viewLocker(&_viewMutex);
|
||||||
_myCamera.loadViewFrustum(_viewFrustum);
|
_myCamera.loadViewFrustum(_viewFrustum);
|
||||||
|
|
||||||
|
_conicalViews.clear();
|
||||||
|
_conicalViews.push_back(_viewFrustum);
|
||||||
// TODO: Fix this by modeling the way the secondary camera works on how the main camera works
|
// TODO: Fix this by modeling the way the secondary camera works on how the main camera works
|
||||||
// ie. Use a camera object stored in the game logic and informs the Engine on where the secondary
|
// ie. Use a camera object stored in the game logic and informs the Engine on where the secondary
|
||||||
// camera should be.
|
// camera should be.
|
||||||
|
@ -5654,21 +5656,31 @@ void Application::update(float deltaTime) {
|
||||||
PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
|
||||||
PerformanceTimer perfTimer("queryOctree");
|
PerformanceTimer perfTimer("queryOctree");
|
||||||
QMutexLocker viewLocker(&_viewMutex);
|
QMutexLocker viewLocker(&_viewMutex);
|
||||||
quint64 sinceLastQuery = now - _lastQueriedTime;
|
|
||||||
const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
|
bool viewIsDifferentEnough = false;
|
||||||
bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;
|
if (_conicalViews.size() == _lastQueriedViews.size()) {
|
||||||
bool viewIsDifferentEnough = !_lastQueriedViewFrustum.isVerySimilar(_viewFrustum);
|
for (size_t i = 0; i < _conicalViews.size(); ++i) {
|
||||||
viewIsDifferentEnough |= _hasSecondaryViewFrustum && !_lastQueriedSecondaryViewFrustum.isVerySimilar(_secondaryViewFrustum);
|
if (!_conicalViews[i].isVerySimilar(_lastQueriedViews[i])) {
|
||||||
|
viewIsDifferentEnough = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
viewIsDifferentEnough = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// if it's been a while since our last query or the view has significantly changed then send a query, otherwise suppress it
|
// if it's been a while since our last query or the view has significantly changed then send a query, otherwise suppress it
|
||||||
if (queryIsDue || viewIsDifferentEnough) {
|
static const std::chrono::seconds MIN_PERIOD_BETWEEN_QUERIES { 3 };
|
||||||
_lastQueriedTime = now;
|
auto now = SteadyClock::now();
|
||||||
|
if (now > _queryExpiry || viewIsDifferentEnough) {
|
||||||
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
if (DependencyManager::get<SceneScriptingInterface>()->shouldRenderEntities()) {
|
||||||
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
queryOctree(NodeType::EntityServer, PacketType::EntityQuery);
|
||||||
}
|
}
|
||||||
sendAvatarViewFrustum();
|
queryAvatars();
|
||||||
_lastQueriedViewFrustum = _viewFrustum;
|
|
||||||
_lastQueriedSecondaryViewFrustum = _secondaryViewFrustum;
|
_lastQueriedViews = _conicalViews;
|
||||||
|
_queryExpiry = now + MIN_PERIOD_BETWEEN_QUERIES;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5840,18 +5852,20 @@ void Application::update(float deltaTime) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::sendAvatarViewFrustum() {
|
void Application::queryAvatars() {
|
||||||
uint8_t numFrustums = 1;
|
auto avatarPacket = NLPacket::create(PacketType::AvatarQuery);
|
||||||
QByteArray viewFrustumByteArray = _viewFrustum.toByteArray();
|
auto destinationBuffer = reinterpret_cast<unsigned char*>(avatarPacket->getPayload());
|
||||||
|
unsigned char* bufferStart = destinationBuffer;
|
||||||
|
|
||||||
if (_hasSecondaryViewFrustum) {
|
uint8_t numFrustums = (uint8_t)_conicalViews.size();
|
||||||
++numFrustums;
|
memcpy(destinationBuffer, &numFrustums, sizeof(numFrustums));
|
||||||
viewFrustumByteArray += _secondaryViewFrustum.toByteArray();
|
destinationBuffer += sizeof(numFrustums);
|
||||||
|
|
||||||
|
for (const auto& view : _conicalViews) {
|
||||||
|
destinationBuffer += view.serialize(destinationBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
auto avatarPacket = NLPacket::create(PacketType::ViewFrustum, viewFrustumByteArray.size() + sizeof(numFrustums));
|
avatarPacket->setPayloadSize(destinationBuffer - bufferStart);
|
||||||
avatarPacket->writePrimitive(numFrustums);
|
|
||||||
avatarPacket->write(viewFrustumByteArray);
|
|
||||||
|
|
||||||
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(avatarPacket), NodeSet() << NodeType::AvatarMixer);
|
DependencyManager::get<NodeList>()->broadcastToNodes(std::move(avatarPacket), NodeSet() << NodeType::AvatarMixer);
|
||||||
}
|
}
|
||||||
|
@ -5913,16 +5927,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType) {
|
||||||
return; // bail early if settings are not loaded
|
return; // bail early if settings are not loaded
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewFrustum viewFrustum;
|
_octreeQuery.setConicalViews(_conicalViews);
|
||||||
copyViewFrustum(viewFrustum);
|
|
||||||
_octreeQuery.setMainViewFrustum(viewFrustum);
|
|
||||||
|
|
||||||
if (hasSecondaryViewFrustum()) {
|
|
||||||
copySecondaryViewFrustum(viewFrustum);
|
|
||||||
_octreeQuery.setSecondaryViewFrustum(viewFrustum);
|
|
||||||
} else {
|
|
||||||
_octreeQuery.clearSecondaryViewFrustum();
|
|
||||||
}
|
|
||||||
|
|
||||||
auto lodManager = DependencyManager::get<LODManager>();
|
auto lodManager = DependencyManager::get<LODManager>();
|
||||||
_octreeQuery.setOctreeSizeScale(lodManager->getOctreeSizeScale());
|
_octreeQuery.setOctreeSizeScale(lodManager->getOctreeSizeScale());
|
||||||
|
@ -6007,11 +6012,6 @@ void Application::copyDisplayViewFrustum(ViewFrustum& viewOut) const {
|
||||||
viewOut = _displayViewFrustum;
|
viewOut = _displayViewFrustum;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::copySecondaryViewFrustum(ViewFrustum& viewOut) const {
|
|
||||||
QMutexLocker viewLocker(&_viewMutex);
|
|
||||||
viewOut = _secondaryViewFrustum;
|
|
||||||
}
|
|
||||||
|
|
||||||
void Application::resetSensors(bool andReload) {
|
void Application::resetSensors(bool andReload) {
|
||||||
DependencyManager::get<DdeFaceTracker>()->reset();
|
DependencyManager::get<DdeFaceTracker>()->reset();
|
||||||
DependencyManager::get<EyeTracker>()->reset();
|
DependencyManager::get<EyeTracker>()->reset();
|
||||||
|
@ -6137,7 +6137,7 @@ void Application::nodeActivated(SharedNodePointer node) {
|
||||||
// If we get a new EntityServer activated, reset lastQueried time
|
// If we get a new EntityServer activated, reset lastQueried time
|
||||||
// so we will do a proper query during update
|
// so we will do a proper query during update
|
||||||
if (node->getType() == NodeType::EntityServer) {
|
if (node->getType() == NodeType::EntityServer) {
|
||||||
_lastQueriedTime = 0;
|
_queryExpiry = SteadyClock::now();
|
||||||
_octreeQuery.incrementConnectionID();
|
_octreeQuery.incrementConnectionID();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6146,6 +6146,8 @@ void Application::nodeActivated(SharedNodePointer node) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (node->getType() == NodeType::AvatarMixer) {
|
if (node->getType() == NodeType::AvatarMixer) {
|
||||||
|
_queryExpiry = SteadyClock::now();
|
||||||
|
|
||||||
// new avatar mixer, send off our identity packet on next update loop
|
// new avatar mixer, send off our identity packet on next update loop
|
||||||
// Reset skeletonModelUrl if the last server modified our choice.
|
// Reset skeletonModelUrl if the last server modified our choice.
|
||||||
// Override the avatar url (but not model name) here too.
|
// Override the avatar url (but not model name) here too.
|
||||||
|
|
|
@ -47,6 +47,7 @@
|
||||||
#include <AbstractUriHandler.h>
|
#include <AbstractUriHandler.h>
|
||||||
#include <shared/RateCounter.h>
|
#include <shared/RateCounter.h>
|
||||||
#include <ThreadSafeValueCache.h>
|
#include <ThreadSafeValueCache.h>
|
||||||
|
#include <shared/ConicalViewFrustum.h>
|
||||||
#include <shared/FileLogger.h>
|
#include <shared/FileLogger.h>
|
||||||
|
|
||||||
#include <RunningMarker.h>
|
#include <RunningMarker.h>
|
||||||
|
@ -110,7 +111,8 @@ class Application : public QApplication,
|
||||||
public AbstractViewStateInterface,
|
public AbstractViewStateInterface,
|
||||||
public AbstractScriptingServicesInterface,
|
public AbstractScriptingServicesInterface,
|
||||||
public AbstractUriHandler,
|
public AbstractUriHandler,
|
||||||
public PluginContainer {
|
public PluginContainer
|
||||||
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
// TODO? Get rid of those
|
// TODO? Get rid of those
|
||||||
|
@ -175,14 +177,14 @@ public:
|
||||||
Camera& getCamera() { return _myCamera; }
|
Camera& getCamera() { return _myCamera; }
|
||||||
const Camera& getCamera() const { return _myCamera; }
|
const Camera& getCamera() const { return _myCamera; }
|
||||||
// Represents the current view frustum of the avatar.
|
// Represents the current view frustum of the avatar.
|
||||||
void copyViewFrustum(ViewFrustum& viewOut) const override;
|
void copyViewFrustum(ViewFrustum& viewOut) const;
|
||||||
void copySecondaryViewFrustum(ViewFrustum& viewOut) const override;
|
|
||||||
bool hasSecondaryViewFrustum() const override { return _hasSecondaryViewFrustum; }
|
|
||||||
// Represents the view frustum of the current rendering pass,
|
// Represents the view frustum of the current rendering pass,
|
||||||
// which might be different from the viewFrustum, i.e. shadowmap
|
// which might be different from the viewFrustum, i.e. shadowmap
|
||||||
// passes, mirror window passes, etc
|
// passes, mirror window passes, etc
|
||||||
void copyDisplayViewFrustum(ViewFrustum& viewOut) const;
|
void copyDisplayViewFrustum(ViewFrustum& viewOut) const;
|
||||||
|
|
||||||
|
const ConicalViewFrustums& getConicalViews() const override { return _conicalViews; }
|
||||||
|
|
||||||
const OctreePacketProcessor& getOctreePacketProcessor() const { return _octreeProcessor; }
|
const OctreePacketProcessor& getOctreePacketProcessor() const { return _octreeProcessor; }
|
||||||
QSharedPointer<EntityTreeRenderer> getEntities() const { return DependencyManager::get<EntityTreeRenderer>(); }
|
QSharedPointer<EntityTreeRenderer> getEntities() const { return DependencyManager::get<EntityTreeRenderer>(); }
|
||||||
QUndoStack* getUndoStack() { return &_undoStack; }
|
QUndoStack* getUndoStack() { return &_undoStack; }
|
||||||
|
@ -491,9 +493,9 @@ private:
|
||||||
void updateDialogs(float deltaTime) const;
|
void updateDialogs(float deltaTime) const;
|
||||||
|
|
||||||
void queryOctree(NodeType_t serverType, PacketType packetType);
|
void queryOctree(NodeType_t serverType, PacketType packetType);
|
||||||
|
void queryAvatars();
|
||||||
|
|
||||||
int sendNackPackets();
|
int sendNackPackets();
|
||||||
void sendAvatarViewFrustum();
|
|
||||||
|
|
||||||
std::shared_ptr<MyAvatar> getMyAvatar() const;
|
std::shared_ptr<MyAvatar> getMyAvatar() const;
|
||||||
|
|
||||||
|
@ -574,12 +576,14 @@ private:
|
||||||
|
|
||||||
mutable QMutex _viewMutex { QMutex::Recursive };
|
mutable QMutex _viewMutex { QMutex::Recursive };
|
||||||
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
|
ViewFrustum _viewFrustum; // current state of view frustum, perspective, orientation, etc.
|
||||||
ViewFrustum _lastQueriedViewFrustum; // last view frustum used to query octree servers
|
|
||||||
ViewFrustum _displayViewFrustum;
|
ViewFrustum _displayViewFrustum;
|
||||||
ViewFrustum _secondaryViewFrustum;
|
|
||||||
ViewFrustum _lastQueriedSecondaryViewFrustum; // last secondary view frustum used to query octree servers
|
ConicalViewFrustums _conicalViews;
|
||||||
bool _hasSecondaryViewFrustum;
|
ConicalViewFrustums _lastQueriedViews; // last views used to query servers
|
||||||
quint64 _lastQueriedTime;
|
|
||||||
|
using SteadyClock = std::chrono::steady_clock;
|
||||||
|
using TimePoint = SteadyClock::time_point;
|
||||||
|
TimePoint _queryExpiry;
|
||||||
|
|
||||||
OctreeQuery _octreeQuery { true }; // NodeData derived class for querying octee cells from octree servers
|
OctreeQuery _octreeQuery { true }; // NodeData derived class for querying octee cells from octree servers
|
||||||
|
|
||||||
|
|
|
@ -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,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 "Menu.h"
|
||||||
#include <QDesktopServices>
|
#include <QDesktopServices>
|
||||||
#include <QFileDialog>
|
#include <QFileDialog>
|
||||||
#include <QMenuBar>
|
#include <QMenuBar>
|
||||||
|
@ -54,8 +55,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>
|
||||||
|
@ -35,9 +37,9 @@
|
||||||
#include <UsersScriptingInterface.h>
|
#include <UsersScriptingInterface.h>
|
||||||
#include <UUID.h>
|
#include <UUID.h>
|
||||||
#include <avatars-renderer/OtherAvatar.h>
|
#include <avatars-renderer/OtherAvatar.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"
|
||||||
|
@ -156,17 +158,7 @@ void AvatarManager::updateOtherAvatars(float deltaTime) {
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
ViewFrustums views;
|
const auto& views = qApp->getConicalViews();
|
||||||
|
|
||||||
ViewFrustum view;
|
|
||||||
qApp->copyCurrentViewFrustum(view);
|
|
||||||
views.push_back(view);
|
|
||||||
|
|
||||||
if (qApp->hasSecondaryViewFrustum()) {
|
|
||||||
qApp->copySecondaryViewFrustum(view);
|
|
||||||
views.push_back(view);
|
|
||||||
}
|
|
||||||
|
|
||||||
PrioritySortUtil::PriorityQueue<SortableAvatar> sortedAvatars(views,
|
PrioritySortUtil::PriorityQueue<SortableAvatar> sortedAvatars(views,
|
||||||
AvatarData::_avatarSortCoefficientSize,
|
AvatarData::_avatarSortCoefficientSize,
|
||||||
AvatarData::_avatarSortCoefficientCenter,
|
AvatarData::_avatarSortCoefficientCenter,
|
||||||
|
|
|
@ -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) :
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue