mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 14:18:24 +02:00
add -Wsuggest-override to compile flags and deal with fallout
This commit is contained in:
parent
89df5768f3
commit
87dbfa7e47
122 changed files with 773 additions and 737 deletions
|
@ -65,7 +65,7 @@ if (WIN32)
|
||||||
else ()
|
else ()
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fno-strict-aliasing -Wno-unused-parameter")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -fno-strict-aliasing -Wno-unused-parameter")
|
||||||
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -Woverloaded-virtual -Wdouble-promotion")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -ggdb -Woverloaded-virtual -Wdouble-promotion -Wsuggest-override")
|
||||||
endif ()
|
endif ()
|
||||||
endif(WIN32)
|
endif(WIN32)
|
||||||
|
|
||||||
|
|
|
@ -52,10 +52,10 @@ public:
|
||||||
float getLastReceivedAudioLoudness() const { return _lastReceivedAudioLoudness; }
|
float getLastReceivedAudioLoudness() const { return _lastReceivedAudioLoudness; }
|
||||||
QUuid getSessionUUID() const;
|
QUuid getSessionUUID() const;
|
||||||
|
|
||||||
virtual void aboutToFinish();
|
virtual void aboutToFinish() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run() override;
|
||||||
void playAvatarSound(SharedSoundPointer avatarSound) { setAvatarSound(avatarSound); }
|
void playAvatarSound(SharedSoundPointer avatarSound) { setAvatarSound(avatarSound); }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
|
|
@ -24,27 +24,27 @@ public:
|
||||||
AssignmentAction(EntityActionType type, const QUuid& id, EntityItemPointer ownerEntity);
|
AssignmentAction(EntityActionType type, const QUuid& id, EntityItemPointer ownerEntity);
|
||||||
virtual ~AssignmentAction();
|
virtual ~AssignmentAction();
|
||||||
|
|
||||||
virtual void removeFromSimulation(EntitySimulationPointer simulation) const;
|
virtual void removeFromSimulation(EntitySimulationPointer simulation) const override;
|
||||||
virtual EntityItemWeakPointer getOwnerEntity() const { return _ownerEntity; }
|
virtual EntityItemWeakPointer getOwnerEntity() const override { return _ownerEntity; }
|
||||||
virtual void setOwnerEntity(const EntityItemPointer ownerEntity) { _ownerEntity = ownerEntity; }
|
virtual void setOwnerEntity(const EntityItemPointer ownerEntity) override { _ownerEntity = ownerEntity; }
|
||||||
virtual bool updateArguments(QVariantMap arguments);
|
virtual bool updateArguments(QVariantMap arguments) override;
|
||||||
virtual QVariantMap getArguments();
|
virtual QVariantMap getArguments() override;
|
||||||
|
|
||||||
virtual QByteArray serialize() const;
|
virtual QByteArray serialize() const override;
|
||||||
virtual void deserialize(QByteArray serializedArguments);
|
virtual void deserialize(QByteArray serializedArguments) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QByteArray _data;
|
QByteArray _data;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual glm::vec3 getPosition();
|
virtual glm::vec3 getPosition() override;
|
||||||
virtual void setPosition(glm::vec3 position);
|
virtual void setPosition(glm::vec3 position) override;
|
||||||
virtual glm::quat getRotation();
|
virtual glm::quat getRotation() override;
|
||||||
virtual void setRotation(glm::quat rotation);
|
virtual void setRotation(glm::quat rotation) override;
|
||||||
virtual glm::vec3 getLinearVelocity();
|
virtual glm::vec3 getLinearVelocity() override;
|
||||||
virtual void setLinearVelocity(glm::vec3 linearVelocity);
|
virtual void setLinearVelocity(glm::vec3 linearVelocity) override;
|
||||||
virtual glm::vec3 getAngularVelocity();
|
virtual glm::vec3 getAngularVelocity() override;
|
||||||
virtual void setAngularVelocity(glm::vec3 angularVelocity);
|
virtual void setAngularVelocity(glm::vec3 angularVelocity) override;
|
||||||
|
|
||||||
bool _active;
|
bool _active;
|
||||||
EntityItemWeakPointer _ownerEntity;
|
EntityItemWeakPointer _ownerEntity;
|
||||||
|
|
|
@ -22,8 +22,8 @@ public:
|
||||||
virtual EntityActionPointer factory(EntityActionType type,
|
virtual EntityActionPointer factory(EntityActionType type,
|
||||||
const QUuid& id,
|
const QUuid& id,
|
||||||
EntityItemPointer ownerEntity,
|
EntityItemPointer ownerEntity,
|
||||||
QVariantMap arguments);
|
QVariantMap arguments) override;
|
||||||
virtual EntityActionPointer factoryBA(EntityItemPointer ownerEntity, QByteArray data);
|
virtual EntityActionPointer factoryBA(EntityItemPointer ownerEntity, QByteArray data) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AssignmentActionFactory_h
|
#endif // hifi_AssignmentActionFactory_h
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
AssetServer(ReceivedMessage& message);
|
AssetServer(ReceivedMessage& message);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void completeSetup();
|
void completeSetup();
|
||||||
|
@ -35,9 +35,9 @@ private slots:
|
||||||
void handleAssetGet(QSharedPointer<ReceivedMessage> packet, SharedNodePointer senderNode);
|
void handleAssetGet(QSharedPointer<ReceivedMessage> packet, SharedNodePointer senderNode);
|
||||||
void handleAssetUpload(QSharedPointer<ReceivedMessage> packetList, SharedNodePointer senderNode);
|
void handleAssetUpload(QSharedPointer<ReceivedMessage> packetList, SharedNodePointer senderNode);
|
||||||
void handleAssetMappingOperation(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleAssetMappingOperation(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
|
|
||||||
void sendStatsPacket();
|
void sendStatsPacket() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
using Mappings = QVariantHash;
|
using Mappings = QVariantHash;
|
||||||
|
|
||||||
|
|
|
@ -27,7 +27,7 @@ class SendAssetTask : public QRunnable {
|
||||||
public:
|
public:
|
||||||
SendAssetTask(QSharedPointer<ReceivedMessage> message, const SharedNodePointer& sendToNode, const QDir& resourcesDir);
|
SendAssetTask(QSharedPointer<ReceivedMessage> message, const SharedNodePointer& sendToNode, const QDir& resourcesDir);
|
||||||
|
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSharedPointer<ReceivedMessage> _message;
|
QSharedPointer<ReceivedMessage> _message;
|
||||||
|
|
|
@ -27,9 +27,9 @@ class Node;
|
||||||
class UploadAssetTask : public QRunnable {
|
class UploadAssetTask : public QRunnable {
|
||||||
public:
|
public:
|
||||||
UploadAssetTask(QSharedPointer<ReceivedMessage> message, QSharedPointer<Node> senderNode, const QDir& resourcesDir);
|
UploadAssetTask(QSharedPointer<ReceivedMessage> message, QSharedPointer<Node> senderNode, const QDir& resourcesDir);
|
||||||
|
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSharedPointer<ReceivedMessage> _receivedMessage;
|
QSharedPointer<ReceivedMessage> _receivedMessage;
|
||||||
QSharedPointer<Node> _senderNode;
|
QSharedPointer<Node> _senderNode;
|
||||||
|
|
|
@ -35,9 +35,9 @@ public:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// threaded run of assignment
|
/// threaded run of assignment
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
void sendStatsPacket();
|
void sendStatsPacket() override;
|
||||||
|
|
||||||
static const InboundAudioStream::Settings& getStreamSettings() { return _streamSettings; }
|
static const InboundAudioStream::Settings& getStreamSettings() { return _streamSettings; }
|
||||||
|
|
||||||
|
|
|
@ -49,17 +49,17 @@ public:
|
||||||
|
|
||||||
// removes an AudioHRTF object for a given stream
|
// removes an AudioHRTF object for a given stream
|
||||||
void removeHRTFForStream(const QUuid& nodeID, const QUuid& streamID = QUuid());
|
void removeHRTFForStream(const QUuid& nodeID, const QUuid& streamID = QUuid());
|
||||||
|
|
||||||
int parseData(ReceivedMessage& message);
|
int parseData(ReceivedMessage& message) override;
|
||||||
|
|
||||||
void checkBuffersBeforeFrameSend();
|
void checkBuffersBeforeFrameSend();
|
||||||
|
|
||||||
void removeDeadInjectedStreams();
|
void removeDeadInjectedStreams();
|
||||||
|
|
||||||
QJsonObject getAudioStreamStats();
|
QJsonObject getAudioStreamStats();
|
||||||
|
|
||||||
void sendAudioStreamStatsPackets(const SharedNodePointer& destinationNode);
|
void sendAudioStreamStatsPackets(const SharedNodePointer& destinationNode);
|
||||||
|
|
||||||
void incrementOutgoingMixedAudioSequenceNumber() { _outgoingMixedAudioSequenceNumber++; }
|
void incrementOutgoingMixedAudioSequenceNumber() { _outgoingMixedAudioSequenceNumber++; }
|
||||||
quint16 getOutgoingSequenceNumber() const { return _outgoingMixedAudioSequenceNumber; }
|
quint16 getOutgoingSequenceNumber() const { return _outgoingMixedAudioSequenceNumber; }
|
||||||
|
|
||||||
|
|
|
@ -25,7 +25,7 @@ private:
|
||||||
AvatarAudioStream(const AvatarAudioStream&);
|
AvatarAudioStream(const AvatarAudioStream&);
|
||||||
AvatarAudioStream& operator= (const AvatarAudioStream&);
|
AvatarAudioStream& operator= (const AvatarAudioStream&);
|
||||||
|
|
||||||
int parseStreamProperties(PacketType type, const QByteArray& packetAfterSeqNum, int& numAudioSamples);
|
int parseStreamProperties(PacketType type, const QByteArray& packetAfterSeqNum, int& numAudioSamples) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AvatarAudioStream_h
|
#endif // hifi_AvatarAudioStream_h
|
||||||
|
|
|
@ -27,11 +27,11 @@ public:
|
||||||
~AvatarMixer();
|
~AvatarMixer();
|
||||||
public slots:
|
public slots:
|
||||||
/// runs the avatar mixer
|
/// runs the avatar mixer
|
||||||
void run();
|
void run() override;
|
||||||
|
|
||||||
void nodeKilled(SharedNodePointer killedNode);
|
void nodeKilled(SharedNodePointer killedNode);
|
||||||
|
|
||||||
void sendStatsPacket();
|
void sendStatsPacket() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleAvatarDataPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleAvatarDataPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
|
@ -45,14 +45,14 @@ private slots:
|
||||||
private:
|
private:
|
||||||
void broadcastAvatarData();
|
void broadcastAvatarData();
|
||||||
void parseDomainServerSettings(const QJsonObject& domainSettings);
|
void parseDomainServerSettings(const QJsonObject& domainSettings);
|
||||||
|
|
||||||
QThread _broadcastThread;
|
QThread _broadcastThread;
|
||||||
|
|
||||||
p_high_resolution_clock::time_point _lastFrameTimestamp;
|
p_high_resolution_clock::time_point _lastFrameTimestamp;
|
||||||
|
|
||||||
float _trailingSleepRatio { 1.0f };
|
float _trailingSleepRatio { 1.0f };
|
||||||
float _performanceThrottlingRatio { 0.0f };
|
float _performanceThrottlingRatio { 0.0f };
|
||||||
|
|
||||||
int _sumListeners { 0 };
|
int _sumListeners { 0 };
|
||||||
int _numStatFrames { 0 };
|
int _numStatFrames { 0 };
|
||||||
int _sumIdentityPackets { 0 };
|
int _sumIdentityPackets { 0 };
|
||||||
|
|
|
@ -25,7 +25,8 @@ class AssignmentParentFinder : public SpatialParentFinder {
|
||||||
public:
|
public:
|
||||||
AssignmentParentFinder(EntityTreePointer tree) : _tree(tree) { }
|
AssignmentParentFinder(EntityTreePointer tree) : _tree(tree) { }
|
||||||
virtual ~AssignmentParentFinder() { }
|
virtual ~AssignmentParentFinder() { }
|
||||||
virtual SpatiallyNestableWeakPointer find(QUuid parentID, bool& success, SpatialParentTree* entityTree = nullptr) const;
|
virtual SpatiallyNestableWeakPointer find(QUuid parentID, bool& success,
|
||||||
|
SpatialParentTree* entityTree = nullptr) const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
EntityTreePointer _tree;
|
EntityTreePointer _tree;
|
||||||
|
|
|
@ -18,7 +18,7 @@
|
||||||
|
|
||||||
class EntityNodeData : public OctreeQueryNode {
|
class EntityNodeData : public OctreeQueryNode {
|
||||||
public:
|
public:
|
||||||
virtual PacketType getMyPacketType() const { return PacketType::EntityData; }
|
virtual PacketType getMyPacketType() const override { return PacketType::EntityData; }
|
||||||
|
|
||||||
quint64 getLastDeletedEntitiesSentAt() const { return _lastDeletedEntitiesSentAt; }
|
quint64 getLastDeletedEntitiesSentAt() const { return _lastDeletedEntitiesSentAt; }
|
||||||
void setLastDeletedEntitiesSentAt(quint64 sentAt) { _lastDeletedEntitiesSentAt = sentAt; }
|
void setLastDeletedEntitiesSentAt(quint64 sentAt) { _lastDeletedEntitiesSentAt = sentAt; }
|
||||||
|
|
|
@ -24,9 +24,9 @@ public:
|
||||||
MessagesMixer(ReceivedMessage& message);
|
MessagesMixer(ReceivedMessage& message);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void run();
|
void run() override;
|
||||||
void nodeKilled(SharedNodePointer killedNode);
|
void nodeKilled(SharedNodePointer killedNode);
|
||||||
void sendStatsPacket();
|
void sendStatsPacket() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void handleMessages(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
void handleMessages(QSharedPointer<ReceivedMessage> message, SharedNodePointer senderNode);
|
||||||
|
|
|
@ -74,15 +74,15 @@ public:
|
||||||
|
|
||||||
NodeToSenderStatsMap getSingleSenderStats() { QReadLocker locker(&_senderStatsLock); return _singleSenderStats; }
|
NodeToSenderStatsMap getSingleSenderStats() { QReadLocker locker(&_senderStatsLock); return _singleSenderStats; }
|
||||||
|
|
||||||
virtual void terminating() { _shuttingDown = true; ReceivedPacketProcessor::terminating(); }
|
virtual void terminating() override { _shuttingDown = true; ReceivedPacketProcessor::terminating(); }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void processPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
virtual void processPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode) override;
|
||||||
|
|
||||||
virtual unsigned long getMaxWait() const;
|
virtual unsigned long getMaxWait() const override;
|
||||||
virtual void preProcess();
|
virtual void preProcess() override;
|
||||||
virtual void midProcess();
|
virtual void midProcess() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int sendNackPackets();
|
int sendNackPackets();
|
||||||
|
|
|
@ -47,7 +47,7 @@ public:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Implements generic processing behavior for this thread.
|
/// Implements generic processing behavior for this thread.
|
||||||
virtual bool process();
|
virtual bool process() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int handlePacketSend(SharedNodePointer node, OctreeQueryNode* nodeData, int& trueBytesSent, int& truePacketsSent, bool dontSuppressDuplicate = false);
|
int handlePacketSend(SharedNodePointer node, OctreeQueryNode* nodeData, int& trueBytesSent, int& truePacketsSent, bool dontSuppressDuplicate = false);
|
||||||
|
|
|
@ -120,16 +120,16 @@ public:
|
||||||
static int howManyThreadsDidHandlePacketSend(quint64 since = 0);
|
static int howManyThreadsDidHandlePacketSend(quint64 since = 0);
|
||||||
static int howManyThreadsDidCallWriteDatagram(quint64 since = 0);
|
static int howManyThreadsDidCallWriteDatagram(quint64 since = 0);
|
||||||
|
|
||||||
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler);
|
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler) override;
|
||||||
|
|
||||||
virtual void aboutToFinish();
|
virtual void aboutToFinish() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// runs the octree server assignment
|
/// runs the octree server assignment
|
||||||
void run();
|
void run() override;
|
||||||
virtual void nodeAdded(SharedNodePointer node);
|
virtual void nodeAdded(SharedNodePointer node);
|
||||||
virtual void nodeKilled(SharedNodePointer node);
|
virtual void nodeKilled(SharedNodePointer node);
|
||||||
void sendStatsPacket();
|
void sendStatsPacket() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void domainSettingsRequestComplete();
|
void domainSettingsRequestComplete();
|
||||||
|
|
|
@ -50,8 +50,8 @@ public:
|
||||||
|
|
||||||
static int const EXIT_CODE_REBOOT;
|
static int const EXIT_CODE_REBOOT;
|
||||||
|
|
||||||
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler = false);
|
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler = false) override;
|
||||||
bool handleHTTPSRequest(HTTPSConnection* connection, const QUrl& url, bool skipSubHandler = false);
|
bool handleHTTPSRequest(HTTPSConnection* connection, const QUrl& url, bool skipSubHandler = false) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
/// Called by NodeList to inform us a node has been added
|
/// Called by NodeList to inform us a node has been added
|
||||||
|
|
|
@ -48,7 +48,7 @@ signals:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void rollFileIfNecessary(QFile& file, bool notifyListenersIfRolled = true);
|
void rollFileIfNecessary(QFile& file, bool notifyListenersIfRolled = true);
|
||||||
virtual bool processQueueItems(const Queue& messages);
|
virtual bool processQueueItems(const Queue& messages) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const FileLogger& _logger;
|
const FileLogger& _logger;
|
||||||
|
|
|
@ -21,9 +21,9 @@ public:
|
||||||
virtual EntityActionPointer factory(EntityActionType type,
|
virtual EntityActionPointer factory(EntityActionType type,
|
||||||
const QUuid& id,
|
const QUuid& id,
|
||||||
EntityItemPointer ownerEntity,
|
EntityItemPointer ownerEntity,
|
||||||
QVariantMap arguments);
|
QVariantMap arguments) override;
|
||||||
virtual EntityActionPointer factoryBA(EntityItemPointer ownerEntity,
|
virtual EntityActionPointer factoryBA(EntityItemPointer ownerEntity,
|
||||||
QByteArray data);
|
QByteArray data) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_InterfaceActionFactory_h
|
#endif // hifi_InterfaceActionFactory_h
|
||||||
|
|
|
@ -21,7 +21,8 @@ class InterfaceParentFinder : public SpatialParentFinder {
|
||||||
public:
|
public:
|
||||||
InterfaceParentFinder() { }
|
InterfaceParentFinder() { }
|
||||||
virtual ~InterfaceParentFinder() { }
|
virtual ~InterfaceParentFinder() { }
|
||||||
virtual SpatiallyNestableWeakPointer find(QUuid parentID, bool& success, SpatialParentTree* entityTree = nullptr) const;
|
virtual SpatiallyNestableWeakPointer find(QUuid parentID, bool& success,
|
||||||
|
SpatialParentTree* entityTree = nullptr) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_InterfaceParentFinder_h
|
#endif // hifi_InterfaceParentFinder_h
|
||||||
|
|
|
@ -24,23 +24,23 @@ class QPushButton;
|
||||||
|
|
||||||
class ModelSelector : public QDialog {
|
class ModelSelector : public QDialog {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ModelSelector();
|
ModelSelector();
|
||||||
|
|
||||||
QFileInfo getFileInfo() const;
|
QFileInfo getFileInfo() const;
|
||||||
FSTReader::ModelType getModelType() const;
|
FSTReader::ModelType getModelType() const;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
virtual void accept();
|
virtual void accept() override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void browse();
|
void browse();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QFileInfo _modelFile;
|
QFileInfo _modelFile;
|
||||||
QPushButton* _browseButton;
|
QPushButton* _browseButton;
|
||||||
QComboBox* _modelType;
|
QComboBox* _modelType;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_ModelSelector_h
|
#endif // hifi_ModelSelector_h
|
||||||
|
|
|
@ -26,7 +26,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void highlightBlock(const QString& text);
|
void highlightBlock(const QString& text) override;
|
||||||
void highlightKeywords(const QString& text);
|
void highlightKeywords(const QString& text);
|
||||||
void formatComments(const QString& text);
|
void formatComments(const QString& text);
|
||||||
void formatQuotedText(const QString& text);
|
void formatQuotedText(const QString& text);
|
||||||
|
|
|
@ -82,12 +82,12 @@ public:
|
||||||
void setDeltaRoll(float roll) { _deltaRoll = roll; }
|
void setDeltaRoll(float roll) { _deltaRoll = roll; }
|
||||||
float getDeltaRoll() const { return _deltaRoll; }
|
float getDeltaRoll() const { return _deltaRoll; }
|
||||||
|
|
||||||
virtual void setFinalYaw(float finalYaw);
|
virtual void setFinalYaw(float finalYaw) override;
|
||||||
virtual void setFinalPitch(float finalPitch);
|
virtual void setFinalPitch(float finalPitch) override;
|
||||||
virtual void setFinalRoll(float finalRoll);
|
virtual void setFinalRoll(float finalRoll) override;
|
||||||
virtual float getFinalPitch() const;
|
virtual float getFinalPitch() const override;
|
||||||
virtual float getFinalYaw() const;
|
virtual float getFinalYaw() const override;
|
||||||
virtual float getFinalRoll() const;
|
virtual float getFinalRoll() const override;
|
||||||
|
|
||||||
void relax(float deltaTime);
|
void relax(float deltaTime);
|
||||||
|
|
||||||
|
|
|
@ -27,26 +27,26 @@
|
||||||
class DdeFaceTracker : public FaceTracker, public Dependency {
|
class DdeFaceTracker : public FaceTracker, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
SINGLETON_DEPENDENCY
|
SINGLETON_DEPENDENCY
|
||||||
|
|
||||||
public:
|
|
||||||
virtual void init();
|
|
||||||
virtual void reset();
|
|
||||||
virtual void update(float deltaTime);
|
|
||||||
|
|
||||||
virtual bool isActive() const;
|
public:
|
||||||
virtual bool isTracking() const;
|
virtual void init() override;
|
||||||
|
virtual void reset() override;
|
||||||
|
virtual void update(float deltaTime) override;
|
||||||
|
|
||||||
|
virtual bool isActive() const override;
|
||||||
|
virtual bool isTracking() const override;
|
||||||
|
|
||||||
float getLeftBlink() const { return getBlendshapeCoefficient(_leftBlinkIndex); }
|
float getLeftBlink() const { return getBlendshapeCoefficient(_leftBlinkIndex); }
|
||||||
float getRightBlink() const { return getBlendshapeCoefficient(_rightBlinkIndex); }
|
float getRightBlink() const { return getBlendshapeCoefficient(_rightBlinkIndex); }
|
||||||
float getLeftEyeOpen() const { return getBlendshapeCoefficient(_leftEyeOpenIndex); }
|
float getLeftEyeOpen() const { return getBlendshapeCoefficient(_leftEyeOpenIndex); }
|
||||||
float getRightEyeOpen() const { return getBlendshapeCoefficient(_rightEyeOpenIndex); }
|
float getRightEyeOpen() const { return getBlendshapeCoefficient(_rightEyeOpenIndex); }
|
||||||
|
|
||||||
float getBrowDownLeft() const { return getBlendshapeCoefficient(_browDownLeftIndex); }
|
float getBrowDownLeft() const { return getBlendshapeCoefficient(_browDownLeftIndex); }
|
||||||
float getBrowDownRight() const { return getBlendshapeCoefficient(_browDownRightIndex); }
|
float getBrowDownRight() const { return getBlendshapeCoefficient(_browDownRightIndex); }
|
||||||
float getBrowUpCenter() const { return getBlendshapeCoefficient(_browUpCenterIndex); }
|
float getBrowUpCenter() const { return getBlendshapeCoefficient(_browUpCenterIndex); }
|
||||||
float getBrowUpLeft() const { return getBlendshapeCoefficient(_browUpLeftIndex); }
|
float getBrowUpLeft() const { return getBlendshapeCoefficient(_browUpLeftIndex); }
|
||||||
float getBrowUpRight() const { return getBlendshapeCoefficient(_browUpRightIndex); }
|
float getBrowUpRight() const { return getBlendshapeCoefficient(_browUpRightIndex); }
|
||||||
|
|
||||||
float getMouthSize() const { return getBlendshapeCoefficient(_jawOpenIndex); }
|
float getMouthSize() const { return getBlendshapeCoefficient(_jawOpenIndex); }
|
||||||
float getMouthSmileLeft() const { return getBlendshapeCoefficient(_mouthSmileLeftIndex); }
|
float getMouthSmileLeft() const { return getBlendshapeCoefficient(_mouthSmileLeftIndex); }
|
||||||
float getMouthSmileRight() const { return getBlendshapeCoefficient(_mouthSmileRightIndex); }
|
float getMouthSmileRight() const { return getBlendshapeCoefficient(_mouthSmileRightIndex); }
|
||||||
|
@ -55,7 +55,7 @@ public:
|
||||||
void setEyeClosingThreshold(float eyeClosingThreshold);
|
void setEyeClosingThreshold(float eyeClosingThreshold);
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setEnabled(bool enabled);
|
void setEnabled(bool enabled) override;
|
||||||
void calibrate();
|
void calibrate();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
@ -77,18 +77,18 @@ private:
|
||||||
QHostAddress _host;
|
QHostAddress _host;
|
||||||
quint16 _serverPort;
|
quint16 _serverPort;
|
||||||
quint16 _controlPort;
|
quint16 _controlPort;
|
||||||
|
|
||||||
float getBlendshapeCoefficient(int index) const;
|
float getBlendshapeCoefficient(int index) const;
|
||||||
void decodePacket(const QByteArray& buffer);
|
void decodePacket(const QByteArray& buffer);
|
||||||
|
|
||||||
// sockets
|
// sockets
|
||||||
QUdpSocket _udpSocket;
|
QUdpSocket _udpSocket;
|
||||||
quint64 _lastReceiveTimestamp;
|
quint64 _lastReceiveTimestamp;
|
||||||
|
|
||||||
bool _reset;
|
bool _reset;
|
||||||
glm::vec3 _referenceTranslation;
|
glm::vec3 _referenceTranslation;
|
||||||
glm::quat _referenceRotation;
|
glm::quat _referenceRotation;
|
||||||
|
|
||||||
int _leftBlinkIndex;
|
int _leftBlinkIndex;
|
||||||
int _rightBlinkIndex;
|
int _rightBlinkIndex;
|
||||||
int _leftEyeDownIndex;
|
int _leftEyeDownIndex;
|
||||||
|
@ -103,10 +103,10 @@ private:
|
||||||
int _browUpCenterIndex;
|
int _browUpCenterIndex;
|
||||||
int _browUpLeftIndex;
|
int _browUpLeftIndex;
|
||||||
int _browUpRightIndex;
|
int _browUpRightIndex;
|
||||||
|
|
||||||
int _mouthSmileLeftIndex;
|
int _mouthSmileLeftIndex;
|
||||||
int _mouthSmileRightIndex;
|
int _mouthSmileRightIndex;
|
||||||
|
|
||||||
int _jawOpenIndex;
|
int _jawOpenIndex;
|
||||||
|
|
||||||
QVector<float> _coefficients;
|
QVector<float> _coefficients;
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
// these pitch/yaw angles are in degrees
|
// these pitch/yaw angles are in degrees
|
||||||
float getEyeGazeLeftPitch() const { return _eyeGazeLeftPitch; }
|
float getEyeGazeLeftPitch() const { return _eyeGazeLeftPitch; }
|
||||||
float getEyeGazeLeftYaw() const { return _eyeGazeLeftYaw; }
|
float getEyeGazeLeftYaw() const { return _eyeGazeLeftYaw; }
|
||||||
|
|
||||||
float getEyeGazeRightPitch() const { return _eyeGazeRightPitch; }
|
float getEyeGazeRightPitch() const { return _eyeGazeRightPitch; }
|
||||||
float getEyeGazeRightYaw() const { return _eyeGazeRightYaw; }
|
float getEyeGazeRightYaw() const { return _eyeGazeRightYaw; }
|
||||||
|
|
||||||
|
@ -67,10 +67,10 @@ public:
|
||||||
float getMouthSize() const { return getBlendshapeCoefficient(_jawOpenIndex); }
|
float getMouthSize() const { return getBlendshapeCoefficient(_jawOpenIndex); }
|
||||||
float getMouthSmileLeft() const { return getBlendshapeCoefficient(_mouthSmileLeftIndex); }
|
float getMouthSmileLeft() const { return getBlendshapeCoefficient(_mouthSmileLeftIndex); }
|
||||||
float getMouthSmileRight() const { return getBlendshapeCoefficient(_mouthSmileRightIndex); }
|
float getMouthSmileRight() const { return getBlendshapeCoefficient(_mouthSmileRightIndex); }
|
||||||
|
|
||||||
QString getHostname() { return _hostname.get(); }
|
QString getHostname() { return _hostname.get(); }
|
||||||
void setHostname(const QString& hostname);
|
void setHostname(const QString& hostname);
|
||||||
|
|
||||||
void updateFakeCoefficients(float leftBlink,
|
void updateFakeCoefficients(float leftBlink,
|
||||||
float rightBlink,
|
float rightBlink,
|
||||||
float browUp,
|
float browUp,
|
||||||
|
@ -79,76 +79,76 @@ public:
|
||||||
float mouth3,
|
float mouth3,
|
||||||
float mouth4,
|
float mouth4,
|
||||||
QVector<float>& coefficients) const;
|
QVector<float>& coefficients) const;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void connectionStateChanged();
|
void connectionStateChanged();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void setEnabled(bool enabled);
|
void setEnabled(bool enabled) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void connectSocket();
|
void connectSocket();
|
||||||
void noteConnected();
|
void noteConnected();
|
||||||
void noteError(QAbstractSocket::SocketError error);
|
void noteError(QAbstractSocket::SocketError error);
|
||||||
void readPendingDatagrams();
|
void readPendingDatagrams();
|
||||||
void readFromSocket();
|
void readFromSocket();
|
||||||
void noteDisconnected();
|
void noteDisconnected();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Faceshift();
|
Faceshift();
|
||||||
virtual ~Faceshift() {}
|
virtual ~Faceshift() {}
|
||||||
|
|
||||||
void send(const std::string& message);
|
void send(const std::string& message);
|
||||||
void receive(const QByteArray& buffer);
|
void receive(const QByteArray& buffer);
|
||||||
|
|
||||||
QTcpSocket _tcpSocket;
|
QTcpSocket _tcpSocket;
|
||||||
QUdpSocket _udpSocket;
|
QUdpSocket _udpSocket;
|
||||||
|
|
||||||
#ifdef HAVE_FACESHIFT
|
#ifdef HAVE_FACESHIFT
|
||||||
fs::fsBinaryStream _stream;
|
fs::fsBinaryStream _stream;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
bool _tcpEnabled = true;
|
bool _tcpEnabled = true;
|
||||||
int _tcpRetryCount = 0;
|
int _tcpRetryCount = 0;
|
||||||
bool _tracking = false;
|
bool _tracking = false;
|
||||||
quint64 _lastReceiveTimestamp = 0;
|
quint64 _lastReceiveTimestamp = 0;
|
||||||
quint64 _lastMessageReceived = 0;
|
quint64 _lastMessageReceived = 0;
|
||||||
float _averageFrameTime = STARTING_FACESHIFT_FRAME_TIME;
|
float _averageFrameTime = STARTING_FACESHIFT_FRAME_TIME;
|
||||||
|
|
||||||
glm::vec3 _headAngularVelocity = glm::vec3(0.0f);
|
glm::vec3 _headAngularVelocity = glm::vec3(0.0f);
|
||||||
glm::vec3 _headLinearVelocity = glm::vec3(0.0f);
|
glm::vec3 _headLinearVelocity = glm::vec3(0.0f);
|
||||||
glm::vec3 _lastHeadTranslation = glm::vec3(0.0f);
|
glm::vec3 _lastHeadTranslation = glm::vec3(0.0f);
|
||||||
glm::vec3 _filteredHeadTranslation = glm::vec3(0.0f);
|
glm::vec3 _filteredHeadTranslation = glm::vec3(0.0f);
|
||||||
|
|
||||||
// degrees
|
// degrees
|
||||||
float _eyeGazeLeftPitch = 0.0f;
|
float _eyeGazeLeftPitch = 0.0f;
|
||||||
float _eyeGazeLeftYaw = 0.0f;
|
float _eyeGazeLeftYaw = 0.0f;
|
||||||
float _eyeGazeRightPitch = 0.0f;
|
float _eyeGazeRightPitch = 0.0f;
|
||||||
float _eyeGazeRightYaw = 0.0f;
|
float _eyeGazeRightYaw = 0.0f;
|
||||||
|
|
||||||
// degrees
|
// degrees
|
||||||
float _longTermAverageEyePitch = 0.0f;
|
float _longTermAverageEyePitch = 0.0f;
|
||||||
float _longTermAverageEyeYaw = 0.0f;
|
float _longTermAverageEyeYaw = 0.0f;
|
||||||
bool _longTermAverageInitialized = false;
|
bool _longTermAverageInitialized = false;
|
||||||
|
|
||||||
Setting::Handle<QString> _hostname;
|
Setting::Handle<QString> _hostname;
|
||||||
|
|
||||||
// see http://support.faceshift.com/support/articles/35129-export-of-blendshapes
|
// see http://support.faceshift.com/support/articles/35129-export-of-blendshapes
|
||||||
int _leftBlinkIndex = 0;
|
int _leftBlinkIndex = 0;
|
||||||
int _rightBlinkIndex = 1;
|
int _rightBlinkIndex = 1;
|
||||||
int _leftEyeOpenIndex = 8;
|
int _leftEyeOpenIndex = 8;
|
||||||
int _rightEyeOpenIndex = 9;
|
int _rightEyeOpenIndex = 9;
|
||||||
|
|
||||||
// Brows
|
// Brows
|
||||||
int _browDownLeftIndex = 14;
|
int _browDownLeftIndex = 14;
|
||||||
int _browDownRightIndex = 15;
|
int _browDownRightIndex = 15;
|
||||||
int _browUpCenterIndex = 16;
|
int _browUpCenterIndex = 16;
|
||||||
int _browUpLeftIndex = 17;
|
int _browUpLeftIndex = 17;
|
||||||
int _browUpRightIndex = 18;
|
int _browUpRightIndex = 18;
|
||||||
|
|
||||||
int _mouthSmileLeftIndex = 28;
|
int _mouthSmileLeftIndex = 28;
|
||||||
int _mouthSmileRightIndex = 29;
|
int _mouthSmileRightIndex = 29;
|
||||||
|
|
||||||
int _jawOpenIndex = 21;
|
int _jawOpenIndex = 21;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ public:
|
||||||
|
|
||||||
bool isActive() const { return _active; }
|
bool isActive() const { return _active; }
|
||||||
|
|
||||||
virtual void update();
|
virtual void update() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
Leapmotion();
|
Leapmotion();
|
||||||
|
|
|
@ -33,16 +33,16 @@ class InputController : public controller::InputController {
|
||||||
public:
|
public:
|
||||||
InputController(int deviceTrackerId, int subTrackerId, QObject* parent = NULL);
|
InputController(int deviceTrackerId, int subTrackerId, QObject* parent = NULL);
|
||||||
|
|
||||||
virtual void update();
|
virtual void update() override;
|
||||||
virtual Key getKey() const;
|
virtual Key getKey() const override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
virtual bool isActive() const { return _isActive; }
|
virtual bool isActive() const override { return _isActive; }
|
||||||
virtual glm::vec3 getAbsTranslation() const { return _eventCache.absTranslation; }
|
virtual glm::vec3 getAbsTranslation() const override { return _eventCache.absTranslation; }
|
||||||
virtual glm::quat getAbsRotation() const { return _eventCache.absRotation; }
|
virtual glm::quat getAbsRotation() const override { return _eventCache.absRotation; }
|
||||||
virtual glm::vec3 getLocTranslation() const { return _eventCache.locTranslation; }
|
virtual glm::vec3 getLocTranslation() const override { return _eventCache.locTranslation; }
|
||||||
virtual glm::quat getLocRotation() const { return _eventCache.locRotation; }
|
virtual glm::quat getLocRotation() const override { return _eventCache.locRotation; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ signals:
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual bool eventFilter(QObject* sender, QEvent* event);
|
virtual bool eventFilter(QObject* sender, QEvent* event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void hasClosed();
|
void hasClosed();
|
||||||
|
|
|
@ -36,13 +36,13 @@ public:
|
||||||
AudioStatsDisplay(QFormLayout* form, QString text, unsigned colorRGBA);
|
AudioStatsDisplay(QFormLayout* form, QString text, unsigned colorRGBA);
|
||||||
void updatedDisplay(QString str);
|
void updatedDisplay(QString str);
|
||||||
void paint();
|
void paint();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QString _strBuf;
|
QString _strBuf;
|
||||||
QLabel* _label;
|
QLabel* _label;
|
||||||
QString _text;
|
QString _text;
|
||||||
unsigned _colorRGBA;
|
unsigned _colorRGBA;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//dialog
|
//dialog
|
||||||
|
@ -51,9 +51,9 @@ class AudioStatsDialog : public QDialog {
|
||||||
public:
|
public:
|
||||||
AudioStatsDialog(QWidget* parent);
|
AudioStatsDialog(QWidget* parent);
|
||||||
~AudioStatsDialog();
|
~AudioStatsDialog();
|
||||||
|
|
||||||
void paintEvent(QPaintEvent*);
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
// audio stats methods for rendering
|
// audio stats methods for rendering
|
||||||
QVector<QString> _audioMixerStats;
|
QVector<QString> _audioMixerStats;
|
||||||
|
@ -61,48 +61,47 @@ private:
|
||||||
QVector<QString> _upstreamMixerStats;
|
QVector<QString> _upstreamMixerStats;
|
||||||
QVector<QString> _downstreamStats;
|
QVector<QString> _downstreamStats;
|
||||||
QVector<QString> _upstreamInjectedStats;
|
QVector<QString> _upstreamInjectedStats;
|
||||||
|
|
||||||
int _audioMixerID;
|
int _audioMixerID;
|
||||||
int _upstreamClientID;
|
int _upstreamClientID;
|
||||||
int _upstreamMixerID;
|
int _upstreamMixerID;
|
||||||
int _downstreamID;
|
int _downstreamID;
|
||||||
int _upstreamInjectedID;
|
int _upstreamInjectedID;
|
||||||
|
|
||||||
QVector<QVector<AudioStatsDisplay*>> _audioDisplayChannels;
|
QVector<QVector<AudioStatsDisplay*>> _audioDisplayChannels;
|
||||||
|
|
||||||
int addChannel(QFormLayout* form, QVector<QString>& stats, const unsigned color);
|
int addChannel(QFormLayout* form, QVector<QString>& stats, const unsigned color);
|
||||||
void updateStats(QVector<QString>& stats, const int channelID);
|
void updateStats(QVector<QString>& stats, const int channelID);
|
||||||
void renderStats();
|
void renderStats();
|
||||||
void clearAllChannels();
|
void clearAllChannels();
|
||||||
void renderAudioStreamStats(const AudioStreamStats* streamStats, QVector<QString>* audioStreamstats, bool isDownstreamStats);
|
void renderAudioStreamStats(const AudioStreamStats* streamStats, QVector<QString>* audioStreamstats, bool isDownstreamStats);
|
||||||
|
|
||||||
|
|
||||||
const AudioIOStats* _stats;
|
const AudioIOStats* _stats;
|
||||||
QFormLayout* _form;
|
QFormLayout* _form;
|
||||||
|
|
||||||
bool _isEnabled;
|
bool _isEnabled;
|
||||||
bool _shouldShowInjectedStreams;
|
bool _shouldShowInjectedStreams;
|
||||||
|
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
|
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
|
|
||||||
void reject();
|
void reject() override;
|
||||||
void updateTimerTimeout();
|
void updateTimerTimeout();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent*);
|
void closeEvent(QCloseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTimer* averageUpdateTimer = new QTimer(this);
|
QTimer* averageUpdateTimer = new QTimer(this);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ public:
|
||||||
BandwidthDialog(QWidget* parent);
|
BandwidthDialog(QWidget* parent);
|
||||||
~BandwidthDialog();
|
~BandwidthDialog();
|
||||||
|
|
||||||
void paintEvent(QPaintEvent*);
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BandwidthChannelDisplay* _audioChannelDisplay;
|
BandwidthChannelDisplay* _audioChannelDisplay;
|
||||||
|
@ -77,14 +77,14 @@ signals:
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
|
|
||||||
void reject();
|
void reject() override;
|
||||||
void updateTimerTimeout();
|
void updateTimerTimeout();
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent*);
|
void closeEvent(QCloseEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTimer* averageUpdateTimer = new QTimer(this);
|
QTimer* averageUpdateTimer = new QTimer(this);
|
||||||
|
|
|
@ -21,19 +21,19 @@ class CachesSizeDialog : public QDialog {
|
||||||
public:
|
public:
|
||||||
// Sets up the UI
|
// Sets up the UI
|
||||||
CachesSizeDialog(QWidget* parent);
|
CachesSizeDialog(QWidget* parent);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reject();
|
void reject() override;
|
||||||
void confirmClicked(bool checked);
|
void confirmClicked(bool checked);
|
||||||
void resetClicked(bool checked);
|
void resetClicked(bool checked);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QDoubleSpinBox* _animations = nullptr;
|
QDoubleSpinBox* _animations = nullptr;
|
||||||
QDoubleSpinBox* _geometries = nullptr;
|
QDoubleSpinBox* _geometries = nullptr;
|
||||||
|
@ -42,4 +42,4 @@ private:
|
||||||
QDoubleSpinBox* _textures = nullptr;
|
QDoubleSpinBox* _textures = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_CachesSizeDialog_h
|
#endif // hifi_CachesSizeDialog_h
|
||||||
|
|
|
@ -18,9 +18,9 @@ class DataWebPage : public QWebPage {
|
||||||
public:
|
public:
|
||||||
DataWebPage(QObject* parent = 0);
|
DataWebPage(QObject* parent = 0);
|
||||||
protected:
|
protected:
|
||||||
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID);
|
void javaScriptConsoleMessage(const QString & message, int lineNumber, const QString & sourceID) override;
|
||||||
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type);
|
bool acceptNavigationRequest(QWebFrame* frame, const QNetworkRequest& request, QWebPage::NavigationType type) override;
|
||||||
virtual QString userAgentForUrl(const QUrl& url) const;
|
virtual QString userAgentForUrl(const QUrl& url) const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_DataWebPage_h
|
#endif // hifi_DataWebPage_h
|
||||||
|
|
|
@ -29,18 +29,18 @@ public:
|
||||||
QScreen* getLastApplicationScreen() const { return _previousScreen; }
|
QScreen* getLastApplicationScreen() const { return _previousScreen; }
|
||||||
bool hasHMDScreen() const { return _hmdScreenNumber >= -1; }
|
bool hasHMDScreen() const { return _hmdScreenNumber >= -1; }
|
||||||
void watchWindow(QWindow* window);
|
void watchWindow(QWindow* window);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reject();
|
void reject() override;
|
||||||
void screenCountChanged(int newCount);
|
void screenCountChanged(int newCount);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void closeEvent(QCloseEvent*); // Emits a 'closed' signal when this dialog is closed.
|
virtual void closeEvent(QCloseEvent*) override; // Emits a 'closed' signal when this dialog is closed.
|
||||||
virtual void showEvent(QShowEvent* event);
|
virtual void showEvent(QShowEvent* event) override;
|
||||||
virtual void hideEvent(QHideEvent* event);
|
virtual void hideEvent(QHideEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void centerCursorOnWidget(QWidget* widget);
|
void centerCursorOnWidget(QWidget* widget);
|
||||||
|
@ -59,7 +59,7 @@ private:
|
||||||
QScreen* _previousDialogScreen{ nullptr };
|
QScreen* _previousDialogScreen{ nullptr };
|
||||||
QString _hmdPluginName;
|
QString _hmdPluginName;
|
||||||
QString _defaultPluginName;
|
QString _defaultPluginName;
|
||||||
|
|
||||||
QHash<QWindow*, HMDWindowWatcher*> _windowWatchers;
|
QHash<QWindow*, HMDWindowWatcher*> _windowWatchers;
|
||||||
friend class HMDWindowWatcher;
|
friend class HMDWindowWatcher;
|
||||||
};
|
};
|
||||||
|
@ -75,7 +75,7 @@ public:
|
||||||
public slots:
|
public slots:
|
||||||
void windowScreenChanged(QScreen* screen);
|
void windowScreenChanged(QScreen* screen);
|
||||||
void windowGeometryChanged(int arg);
|
void windowGeometryChanged(int arg);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QWindow* _window;
|
QWindow* _window;
|
||||||
HMDToolsDialog* _hmdTools;
|
HMDToolsDialog* _hmdTools;
|
||||||
|
|
|
@ -40,9 +40,9 @@ public slots:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void setAndSelectCommand(const QString& command);
|
void setAndSelectCommand(const QString& command);
|
||||||
virtual bool eventFilter(QObject* sender, QEvent* event);
|
virtual bool eventFilter(QObject* sender, QEvent* event) override;
|
||||||
virtual void mouseReleaseEvent(QMouseEvent* event);
|
virtual void mouseReleaseEvent(QMouseEvent* event) override;
|
||||||
virtual void showEvent(QShowEvent* event);
|
virtual void showEvent(QShowEvent* event) override;
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void scrollToBottom();
|
void scrollToBottom();
|
||||||
|
|
|
@ -24,12 +24,12 @@ class LodToolsDialog : public QDialog {
|
||||||
public:
|
public:
|
||||||
// Sets up the UI
|
// Sets up the UI
|
||||||
LodToolsDialog(QWidget* parent);
|
LodToolsDialog(QWidget* parent);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reject();
|
void reject() override;
|
||||||
void sizeScaleValueChanged(int value);
|
void sizeScaleValueChanged(int value);
|
||||||
void resetClicked(bool checked);
|
void resetClicked(bool checked);
|
||||||
void reloadSliders();
|
void reloadSliders();
|
||||||
|
@ -38,7 +38,7 @@ public slots:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QSlider* _lodSize;
|
QSlider* _lodSize;
|
||||||
|
|
|
@ -30,7 +30,7 @@ public:
|
||||||
QString keyword;
|
QString keyword;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void highlightBlock(const QString &text);
|
void highlightBlock(const QString &text) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QTextCharFormat keywordFormat;
|
QTextCharFormat keywordFormat;
|
||||||
|
@ -54,8 +54,8 @@ private slots:
|
||||||
void handleSearchTextChanged(const QString);
|
void handleSearchTextChanged(const QString);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent*);
|
void resizeEvent(QResizeEvent*) override;
|
||||||
void showEvent(QShowEvent*);
|
void showEvent(QShowEvent*) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
QPushButton* _searchButton;
|
QPushButton* _searchButton;
|
||||||
|
|
|
@ -33,15 +33,15 @@ signals:
|
||||||
void closed();
|
void closed();
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void reject();
|
void reject() override;
|
||||||
void moreless(const QString& link);
|
void moreless(const QString& link);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// State <- data model held by BandwidthMeter
|
// State <- data model held by BandwidthMeter
|
||||||
void paintEvent(QPaintEvent*);
|
void paintEvent(QPaintEvent*) override;
|
||||||
|
|
||||||
// Emits a 'closed' signal when this dialog is closed.
|
// Emits a 'closed' signal when this dialog is closed.
|
||||||
void closeEvent(QCloseEvent*);
|
void closeEvent(QCloseEvent*) override;
|
||||||
|
|
||||||
int AddStatItem(const char* caption, unsigned colorRGBA = DEFAULT_COLOR);
|
int AddStatItem(const char* caption, unsigned colorRGBA = DEFAULT_COLOR);
|
||||||
void RemoveStatItem(int item);
|
void RemoveStatItem(int item);
|
||||||
|
|
|
@ -24,7 +24,7 @@ public:
|
||||||
int lineNumberAreaWidth();
|
int lineNumberAreaWidth();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void resizeEvent(QResizeEvent* event);
|
void resizeEvent(QResizeEvent* event) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void updateLineNumberAreaWidth(int blockCount);
|
void updateLineNumberAreaWidth(int blockCount);
|
||||||
|
|
|
@ -35,8 +35,8 @@ signals:
|
||||||
void windowActivated();
|
void windowActivated();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void closeEvent(QCloseEvent* event);
|
void closeEvent(QCloseEvent* event) override;
|
||||||
virtual bool event(QEvent* event);
|
virtual bool event(QEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::ScriptEditorWindow* _ScriptEditorWindowUI;
|
Ui::ScriptEditorWindow* _ScriptEditorWindowUI;
|
||||||
|
|
|
@ -20,10 +20,10 @@ class ScriptLineNumberArea : public QWidget {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ScriptLineNumberArea(ScriptEditBox* scriptEditBox);
|
ScriptLineNumberArea(ScriptEditBox* scriptEditBox);
|
||||||
QSize sizeHint() const;
|
QSize sizeHint() const override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void paintEvent(QPaintEvent* event);
|
void paintEvent(QPaintEvent* event) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ScriptEditBox* _scriptEditBox;
|
ScriptEditBox* _scriptEditBox;
|
||||||
|
|
|
@ -21,8 +21,8 @@ public:
|
||||||
explicit ScriptsTableWidget(QWidget* parent);
|
explicit ScriptsTableWidget(QWidget* parent);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void paintEvent(QPaintEvent* event);
|
virtual void paintEvent(QPaintEvent* event) override;
|
||||||
virtual void keyPressEvent(QKeyEvent* event);
|
virtual void keyPressEvent(QKeyEvent* event) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi__ScriptsTableWidget_h
|
#endif // hifi__ScriptsTableWidget_h
|
||||||
|
|
|
@ -20,15 +20,15 @@ class LocalModelsOverlay : public Volume3DOverlay {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
static QString const TYPE;
|
static QString const TYPE;
|
||||||
virtual QString getType() const { return TYPE; }
|
virtual QString getType() const override { return TYPE; }
|
||||||
|
|
||||||
LocalModelsOverlay(EntityTreeRenderer* entityTreeRenderer);
|
LocalModelsOverlay(EntityTreeRenderer* entityTreeRenderer);
|
||||||
LocalModelsOverlay(const LocalModelsOverlay* localModelsOverlay);
|
LocalModelsOverlay(const LocalModelsOverlay* localModelsOverlay);
|
||||||
|
|
||||||
virtual void update(float deltatime);
|
|
||||||
virtual void render(RenderArgs* args);
|
|
||||||
|
|
||||||
virtual LocalModelsOverlay* createClone() const;
|
virtual void update(float deltatime) override;
|
||||||
|
virtual void render(RenderArgs* args) override;
|
||||||
|
|
||||||
|
virtual LocalModelsOverlay* createClone() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
EntityTreeRenderer* _entityTreeRenderer;
|
EntityTreeRenderer* _entityTreeRenderer;
|
||||||
|
|
|
@ -62,7 +62,7 @@ public:
|
||||||
void setProperties(const QVariantMap& properties);
|
void setProperties(const QVariantMap& properties);
|
||||||
QVariant getProperty(const QString& property);
|
QVariant getProperty(const QString& property);
|
||||||
|
|
||||||
virtual void applyTransformTo(Transform& transform, bool force = false);
|
virtual void applyTransformTo(Transform& transform, bool force = false) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Transform _anchorTransform;
|
Transform _anchorTransform;
|
||||||
|
|
|
@ -14,14 +14,13 @@
|
||||||
class RectangleOverlay : public QmlOverlay {
|
class RectangleOverlay : public QmlOverlay {
|
||||||
public:
|
public:
|
||||||
static QString const TYPE;
|
static QString const TYPE;
|
||||||
virtual QString getType() const { return TYPE; }
|
virtual QString getType() const override { return TYPE; }
|
||||||
static QUrl const URL;
|
static QUrl const URL;
|
||||||
|
|
||||||
RectangleOverlay();
|
RectangleOverlay();
|
||||||
RectangleOverlay(const RectangleOverlay* RectangleOverlay);
|
RectangleOverlay(const RectangleOverlay* RectangleOverlay);
|
||||||
|
|
||||||
virtual RectangleOverlay* createClone() const;
|
virtual RectangleOverlay* createClone() const override;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
#endif // hifi_RectangleOverlay_h
|
#endif // hifi_RectangleOverlay_h
|
||||||
|
|
|
@ -34,9 +34,9 @@ public:
|
||||||
Q_INVOKABLE AnimationPointer getAnimation(const QUrl& url);
|
Q_INVOKABLE AnimationPointer getAnimation(const QUrl& url);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
||||||
const void* extra);
|
const void* extra) override;
|
||||||
private:
|
private:
|
||||||
explicit AnimationCache(QObject* parent = NULL);
|
explicit AnimationCache(QObject* parent = NULL);
|
||||||
virtual ~AnimationCache() { }
|
virtual ~AnimationCache() { }
|
||||||
|
@ -82,7 +82,7 @@ class AnimationReader : public QObject, public QRunnable {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AnimationReader(const QUrl& url, const QByteArray& data);
|
AnimationReader(const QUrl& url, const QByteArray& data);
|
||||||
virtual void run();
|
virtual void run() override;
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
void onSuccess(FBXGeometry::Pointer geometry);
|
void onSuccess(FBXGeometry::Pointer geometry);
|
||||||
|
|
|
@ -86,7 +86,7 @@ public:
|
||||||
|
|
||||||
using Mutex = std::mutex;
|
using Mutex = std::mutex;
|
||||||
using Lock = std::unique_lock<Mutex>;
|
using Lock = std::unique_lock<Mutex>;
|
||||||
|
|
||||||
class AudioOutputIODevice : public QIODevice {
|
class AudioOutputIODevice : public QIODevice {
|
||||||
public:
|
public:
|
||||||
AudioOutputIODevice(MixedProcessedAudioStream& receivedAudioStream, AudioClient* audio) :
|
AudioOutputIODevice(MixedProcessedAudioStream& receivedAudioStream, AudioClient* audio) :
|
||||||
|
@ -94,8 +94,8 @@ public:
|
||||||
|
|
||||||
void start() { open(QIODevice::ReadOnly); }
|
void start() { open(QIODevice::ReadOnly); }
|
||||||
void stop() { close(); }
|
void stop() { close(); }
|
||||||
qint64 readData(char * data, qint64 maxSize);
|
qint64 readData(char * data, qint64 maxSize) override;
|
||||||
qint64 writeData(const char * data, qint64 maxSize) { return 0; }
|
qint64 writeData(const char * data, qint64 maxSize) override { return 0; }
|
||||||
int getRecentUnfulfilledReads() { int unfulfilledReads = _unfulfilledReads; _unfulfilledReads = 0; return unfulfilledReads; }
|
int getRecentUnfulfilledReads() { int unfulfilledReads = _unfulfilledReads; _unfulfilledReads = 0; return unfulfilledReads; }
|
||||||
private:
|
private:
|
||||||
MixedProcessedAudioStream& _receivedAudioStream;
|
MixedProcessedAudioStream& _receivedAudioStream;
|
||||||
|
@ -136,7 +136,7 @@ public:
|
||||||
|
|
||||||
void setPositionGetter(AudioPositionGetter positionGetter) { _positionGetter = positionGetter; }
|
void setPositionGetter(AudioPositionGetter positionGetter) { _positionGetter = positionGetter; }
|
||||||
void setOrientationGetter(AudioOrientationGetter orientationGetter) { _orientationGetter = orientationGetter; }
|
void setOrientationGetter(AudioOrientationGetter orientationGetter) { _orientationGetter = orientationGetter; }
|
||||||
|
|
||||||
QVector<AudioInjector*>& getActiveLocalAudioInjectors() { return _activeLocalAudioInjectors; }
|
QVector<AudioInjector*>& getActiveLocalAudioInjectors() { return _activeLocalAudioInjectors; }
|
||||||
|
|
||||||
static const float CALLBACK_ACCELERATOR_RATIO;
|
static const float CALLBACK_ACCELERATOR_RATIO;
|
||||||
|
@ -163,7 +163,7 @@ public slots:
|
||||||
void audioMixerKilled();
|
void audioMixerKilled();
|
||||||
void toggleMute();
|
void toggleMute();
|
||||||
|
|
||||||
virtual void setIsStereoInput(bool stereo);
|
virtual void setIsStereoInput(bool stereo) override;
|
||||||
|
|
||||||
void toggleAudioNoiseReduction() { _isNoiseGateEnabled = !_isNoiseGateEnabled; }
|
void toggleAudioNoiseReduction() { _isNoiseGateEnabled = !_isNoiseGateEnabled; }
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ public slots:
|
||||||
|
|
||||||
int setOutputBufferSize(int numFrames, bool persist = true);
|
int setOutputBufferSize(int numFrames, bool persist = true);
|
||||||
|
|
||||||
virtual bool outputLocalInjector(bool isStereo, AudioInjector* injector);
|
virtual bool outputLocalInjector(bool isStereo, AudioInjector* injector) override;
|
||||||
|
|
||||||
bool switchInputToAudioDevice(const QString& inputDeviceName);
|
bool switchInputToAudioDevice(const QString& inputDeviceName);
|
||||||
bool switchOutputToAudioDevice(const QString& outputDeviceName);
|
bool switchOutputToAudioDevice(const QString& outputDeviceName);
|
||||||
|
@ -215,7 +215,7 @@ protected:
|
||||||
AudioClient();
|
AudioClient();
|
||||||
~AudioClient();
|
~AudioClient();
|
||||||
|
|
||||||
virtual void customDeleter() {
|
virtual void customDeleter() override {
|
||||||
deleteLater();
|
deleteLater();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,7 +316,7 @@ private:
|
||||||
void checkDevices();
|
void checkDevices();
|
||||||
|
|
||||||
bool _hasReceivedFirstPacket = false;
|
bool _hasReceivedFirstPacket = false;
|
||||||
|
|
||||||
QVector<AudioInjector*> _activeLocalAudioInjectors;
|
QVector<AudioInjector*> _activeLocalAudioInjectors;
|
||||||
|
|
||||||
CodecPluginPointer _codec;
|
CodecPluginPointer _codec;
|
||||||
|
|
|
@ -20,27 +20,27 @@ class AudioInjectorLocalBuffer : public QIODevice {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
AudioInjectorLocalBuffer(const QByteArray& rawAudioArray, QObject* parent);
|
AudioInjectorLocalBuffer(const QByteArray& rawAudioArray, QObject* parent);
|
||||||
|
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
bool seek(qint64 pos);
|
bool seek(qint64 pos) override;
|
||||||
|
|
||||||
qint64 readData(char* data, qint64 maxSize);
|
qint64 readData(char* data, qint64 maxSize) override;
|
||||||
qint64 writeData(const char* data, qint64 maxSize) { return 0; }
|
qint64 writeData(const char* data, qint64 maxSize) override { return 0; }
|
||||||
|
|
||||||
void setShouldLoop(bool shouldLoop) { _shouldLoop = shouldLoop; }
|
void setShouldLoop(bool shouldLoop) { _shouldLoop = shouldLoop; }
|
||||||
void setCurrentOffset(int currentOffset) { _currentOffset = currentOffset; }
|
void setCurrentOffset(int currentOffset) { _currentOffset = currentOffset; }
|
||||||
void setVolume(float volume) { _volume = glm::clamp(volume, 0.0f, 1.0f); }
|
void setVolume(float volume) { _volume = glm::clamp(volume, 0.0f, 1.0f); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
qint64 recursiveReadFromFront(char* data, qint64 maxSize);
|
qint64 recursiveReadFromFront(char* data, qint64 maxSize);
|
||||||
|
|
||||||
QByteArray _rawAudioArray;
|
QByteArray _rawAudioArray;
|
||||||
bool _shouldLoop;
|
bool _shouldLoop;
|
||||||
bool _isStopped;
|
bool _isStopped;
|
||||||
|
|
||||||
int _currentOffset;
|
int _currentOffset;
|
||||||
float _volume;
|
float _volume;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_AudioInjectorLocalBuffer_h
|
#endif // hifi_AudioInjectorLocalBuffer_h
|
||||||
|
|
|
@ -567,7 +567,7 @@ class LimiterMono : public LimiterImpl {
|
||||||
public:
|
public:
|
||||||
LimiterMono(int sampleRate) : LimiterImpl(sampleRate) {}
|
LimiterMono(int sampleRate) : LimiterImpl(sampleRate) {}
|
||||||
|
|
||||||
void process(float* input, int16_t* output, int numFrames);
|
void process(float* input, int16_t* output, int numFrames) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<int N>
|
template<int N>
|
||||||
|
|
|
@ -22,7 +22,7 @@ public:
|
||||||
MixedProcessedAudioStream(int numFrameSamples, int numFramesCapacity, const InboundAudioStream::Settings& settings);
|
MixedProcessedAudioStream(int numFrameSamples, int numFramesCapacity, const InboundAudioStream::Settings& settings);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
|
||||||
void addedSilence(int silentSamplesPerChannel);
|
void addedSilence(int silentSamplesPerChannel);
|
||||||
void addedLastFrameRepeatedWithFade(int samplesPerChannel);
|
void addedLastFrameRepeatedWithFade(int samplesPerChannel);
|
||||||
void addedStereoSamples(const QByteArray& samples);
|
void addedStereoSamples(const QByteArray& samples);
|
||||||
|
@ -33,9 +33,9 @@ public:
|
||||||
void outputFormatChanged(int outputFormatChannelCountTimesSampleRate);
|
void outputFormatChanged(int outputFormatChannelCountTimesSampleRate);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
int writeDroppableSilentSamples(int silentSamples);
|
int writeDroppableSilentSamples(int silentSamples) override;
|
||||||
int writeLastFrameRepeatedWithFade(int samples);
|
int writeLastFrameRepeatedWithFade(int samples) override;
|
||||||
int parseAudioData(PacketType type, const QByteArray& packetAfterStreamProperties);
|
int parseAudioData(PacketType type, const QByteArray& packetAfterStreamProperties) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int networkToDeviceSamples(int networkSamples);
|
int networkToDeviceSamples(int networkSamples);
|
||||||
|
|
|
@ -32,9 +32,9 @@ public:
|
||||||
const QUuid DEFAULT_STREAM_IDENTIFIER = QUuid();
|
const QUuid DEFAULT_STREAM_IDENTIFIER = QUuid();
|
||||||
virtual const QUuid& getStreamIdentifier() const { return DEFAULT_STREAM_IDENTIFIER; }
|
virtual const QUuid& getStreamIdentifier() const { return DEFAULT_STREAM_IDENTIFIER; }
|
||||||
|
|
||||||
virtual void resetStats();
|
virtual void resetStats() override;
|
||||||
|
|
||||||
virtual AudioStreamStats getAudioStreamStats() const;
|
virtual AudioStreamStats getAudioStreamStats() const override;
|
||||||
|
|
||||||
void updateLastPopOutputLoudnessAndTrailingLoudness();
|
void updateLastPopOutputLoudnessAndTrailingLoudness();
|
||||||
float getLastPopOutputTrailingLoudness() const { return _lastPopOutputTrailingLoudness; }
|
float getLastPopOutputTrailingLoudness() const { return _lastPopOutputTrailingLoudness; }
|
||||||
|
@ -46,7 +46,7 @@ public:
|
||||||
PositionalAudioStream::Type getType() const { return _type; }
|
PositionalAudioStream::Type getType() const { return _type; }
|
||||||
const glm::vec3& getPosition() const { return _position; }
|
const glm::vec3& getPosition() const { return _position; }
|
||||||
const glm::quat& getOrientation() const { return _orientation; }
|
const glm::quat& getOrientation() const { return _orientation; }
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// disallow copying of PositionalAudioStream objects
|
// disallow copying of PositionalAudioStream objects
|
||||||
|
|
|
@ -23,12 +23,12 @@ class SoundCache : public ResourceCache, public Dependency {
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Q_INVOKABLE SharedSoundPointer getSound(const QUrl& url);
|
Q_INVOKABLE SharedSoundPointer getSound(const QUrl& url);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
||||||
const void* extra);
|
const void* extra) override;
|
||||||
private:
|
private:
|
||||||
SoundCache(QObject* parent = NULL);
|
SoundCache(QObject* parent = NULL);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_SoundCache_h
|
#endif // hifi_SoundCache_h
|
||||||
|
|
|
@ -24,11 +24,11 @@ public:
|
||||||
: Endpoint(Input::INVALID_INPUT), _callable(callable) {
|
: Endpoint(Input::INVALID_INPUT), _callable(callable) {
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual float peek() const {
|
virtual float peek() const override {
|
||||||
return (float)const_cast<JSEndpoint*>(this)->_callable.call().toNumber();
|
return (float)const_cast<JSEndpoint*>(this)->_callable.call().toNumber();
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual void apply(float newValue, const Pointer& source) {
|
virtual void apply(float newValue, const Pointer& source) override {
|
||||||
_callable.call(QJSValueList({ QJSValue(newValue) }));
|
_callable.call(QJSValueList({ QJSValue(newValue) }));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -305,7 +305,7 @@ void HmdDisplayPlugin::updateFrameData() {
|
||||||
{
|
{
|
||||||
vec2 xdir = glm::normalize(vec2(intersectionPosition.x, -intersectionPosition.z));
|
vec2 xdir = glm::normalize(vec2(intersectionPosition.x, -intersectionPosition.z));
|
||||||
yawPitch.x = glm::atan(xdir.x, xdir.y);
|
yawPitch.x = glm::atan(xdir.x, xdir.y);
|
||||||
yawPitch.y = (acosf(intersectionPosition.y) * -1.0f) + M_PI_2;
|
yawPitch.y = (acosf(intersectionPosition.y) * -1.0f) + (float)M_PI_2;
|
||||||
}
|
}
|
||||||
vec2 halfFov = CompositorHelper::VIRTUAL_UI_TARGET_FOV / 2.0f;
|
vec2 halfFov = CompositorHelper::VIRTUAL_UI_TARGET_FOV / 2.0f;
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ public:
|
||||||
/// Initializes the manager.
|
/// Initializes the manager.
|
||||||
HTTPManager(const QHostAddress& listenAddress, quint16 port, const QString& documentRoot, HTTPRequestHandler* requestHandler = NULL, QObject* parent = 0);
|
HTTPManager(const QHostAddress& listenAddress, quint16 port, const QString& documentRoot, HTTPRequestHandler* requestHandler = NULL, QObject* parent = 0);
|
||||||
|
|
||||||
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler = false);
|
bool handleHTTPRequest(HTTPConnection* connection, const QUrl& url, bool skipSubHandler = false) override;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void isTcpServerListening();
|
void isTcpServerListening();
|
||||||
|
@ -46,7 +46,7 @@ private:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Accepts all pending connections
|
/// Accepts all pending connections
|
||||||
virtual void incomingConnection(qintptr socketDescriptor);
|
virtual void incomingConnection(qintptr socketDescriptor) override;
|
||||||
virtual bool requestHandledByRequestHandler(HTTPConnection* connection, const QUrl& url);
|
virtual bool requestHandledByRequestHandler(HTTPConnection* connection, const QUrl& url);
|
||||||
|
|
||||||
QHostAddress _listenAddress;
|
QHostAddress _listenAddress;
|
||||||
|
|
|
@ -44,10 +44,10 @@ public:
|
||||||
AbstractScriptingServicesInterface* scriptingServices);
|
AbstractScriptingServicesInterface* scriptingServices);
|
||||||
virtual ~EntityTreeRenderer();
|
virtual ~EntityTreeRenderer();
|
||||||
|
|
||||||
virtual char getMyNodeType() const { return NodeType::EntityServer; }
|
virtual char getMyNodeType() const override { return NodeType::EntityServer; }
|
||||||
virtual PacketType getMyQueryMessageType() const { return PacketType::EntityQuery; }
|
virtual PacketType getMyQueryMessageType() const override { return PacketType::EntityQuery; }
|
||||||
virtual PacketType getExpectedPacketType() const { return PacketType::EntityData; }
|
virtual PacketType getExpectedPacketType() const override { return PacketType::EntityData; }
|
||||||
virtual void setTree(OctreePointer newTree);
|
virtual void setTree(OctreePointer newTree) override;
|
||||||
|
|
||||||
// Returns the priority at which an entity should be loaded. Higher values indicate higher priority.
|
// Returns the priority at which an entity should be loaded. Higher values indicate higher priority.
|
||||||
float getEntityLoadingPriority(const EntityItem& item) const { return _calculateEntityLoadingPriorityFunc(item); }
|
float getEntityLoadingPriority(const EntityItem& item) const { return _calculateEntityLoadingPriorityFunc(item); }
|
||||||
|
@ -60,29 +60,29 @@ public:
|
||||||
|
|
||||||
void processEraseMessage(ReceivedMessage& message, const SharedNodePointer& sourceNode);
|
void processEraseMessage(ReceivedMessage& message, const SharedNodePointer& sourceNode);
|
||||||
|
|
||||||
virtual void init();
|
virtual void init() override;
|
||||||
|
|
||||||
|
virtual const FBXGeometry* getGeometryForEntity(EntityItemPointer entityItem) override;
|
||||||
|
virtual ModelPointer getModelForEntityItem(EntityItemPointer entityItem) override;
|
||||||
|
virtual const FBXGeometry* getCollisionGeometryForEntity(EntityItemPointer entityItem) override;
|
||||||
|
|
||||||
virtual const FBXGeometry* getGeometryForEntity(EntityItemPointer entityItem);
|
|
||||||
virtual ModelPointer getModelForEntityItem(EntityItemPointer entityItem);
|
|
||||||
virtual const FBXGeometry* getCollisionGeometryForEntity(EntityItemPointer entityItem);
|
|
||||||
|
|
||||||
/// clears the tree
|
/// clears the tree
|
||||||
virtual void clear();
|
virtual void clear() override;
|
||||||
|
|
||||||
/// reloads the entity scripts, calling unload and preload
|
/// reloads the entity scripts, calling unload and preload
|
||||||
void reloadEntityScripts();
|
void reloadEntityScripts();
|
||||||
|
|
||||||
/// if a renderable entity item needs a model, we will allocate it for them
|
/// if a renderable entity item needs a model, we will allocate it for them
|
||||||
Q_INVOKABLE ModelPointer allocateModel(const QString& url, const QString& collisionUrl, float loadingPriority = 0.0f);
|
Q_INVOKABLE ModelPointer allocateModel(const QString& url, const QString& collisionUrl, float loadingPriority = 0.0f);
|
||||||
|
|
||||||
/// if a renderable entity item needs to update the URL of a model, we will handle that for the entity
|
/// if a renderable entity item needs to update the URL of a model, we will handle that for the entity
|
||||||
Q_INVOKABLE ModelPointer updateModel(ModelPointer original, const QString& newUrl, const QString& collisionUrl);
|
Q_INVOKABLE ModelPointer updateModel(ModelPointer original, const QString& newUrl, const QString& collisionUrl);
|
||||||
|
|
||||||
/// if a renderable entity item is done with a model, it should return it to us
|
/// if a renderable entity item is done with a model, it should return it to us
|
||||||
void releaseModel(ModelPointer model);
|
void releaseModel(ModelPointer model);
|
||||||
|
|
||||||
void deleteReleasedModels();
|
void deleteReleasedModels();
|
||||||
|
|
||||||
// event handles which may generate entity related events
|
// event handles which may generate entity related events
|
||||||
void mouseReleaseEvent(QMouseEvent* event);
|
void mouseReleaseEvent(QMouseEvent* event);
|
||||||
void mousePressEvent(QMouseEvent* event);
|
void mousePressEvent(QMouseEvent* event);
|
||||||
|
@ -128,7 +128,7 @@ public slots:
|
||||||
void setDontDoPrecisionPicking(bool value) { _dontDoPrecisionPicking = value; }
|
void setDontDoPrecisionPicking(bool value) { _dontDoPrecisionPicking = value; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual OctreePointer createTree() {
|
virtual OctreePointer createTree() override {
|
||||||
EntityTreePointer newTree = EntityTreePointer(new EntityTree(true));
|
EntityTreePointer newTree = EntityTreePointer(new EntityTree(true));
|
||||||
newTree->createRootElement();
|
newTree->createRootElement();
|
||||||
return newTree;
|
return newTree;
|
||||||
|
@ -180,7 +180,7 @@ private:
|
||||||
AbstractScriptingServicesInterface* _scriptingServices;
|
AbstractScriptingServicesInterface* _scriptingServices;
|
||||||
bool _displayModelBounds;
|
bool _displayModelBounds;
|
||||||
bool _dontDoPrecisionPicking;
|
bool _dontDoPrecisionPicking;
|
||||||
|
|
||||||
bool _shuttingDown { false };
|
bool _shuttingDown { false };
|
||||||
|
|
||||||
QMultiMap<QUrl, EntityItemID> _waitingOnPreload;
|
QMultiMap<QUrl, EntityItemID> _waitingOnPreload;
|
||||||
|
@ -203,7 +203,7 @@ private:
|
||||||
float _previousStageAltitude;
|
float _previousStageAltitude;
|
||||||
float _previousStageHour;
|
float _previousStageHour;
|
||||||
int _previousStageDay;
|
int _previousStageDay;
|
||||||
|
|
||||||
QHash<EntityItemID, EntityItemPointer> _entitiesInScene;
|
QHash<EntityItemID, EntityItemPointer> _entitiesInScene;
|
||||||
// For Scene.shouldRenderEntities
|
// For Scene.shouldRenderEntities
|
||||||
QList<EntityItemID> _entityIDsLastInScene;
|
QList<EntityItemID> _entityIDsLastInScene;
|
||||||
|
|
|
@ -16,9 +16,9 @@ class AddEntityOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
AddEntityOperator(EntityTreePointer tree, EntityItemPointer newEntity);
|
AddEntityOperator(EntityTreePointer tree, EntityItemPointer newEntity);
|
||||||
|
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex);
|
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex) override;
|
||||||
private:
|
private:
|
||||||
EntityTreePointer _tree;
|
EntityTreePointer _tree;
|
||||||
EntityItemPointer _newEntity;
|
EntityItemPointer _newEntity;
|
||||||
|
|
|
@ -34,30 +34,33 @@ public:
|
||||||
void associateWithAnimationLoop(AnimationLoop* animationLoop) { _animationLoop = animationLoop; }
|
void associateWithAnimationLoop(AnimationLoop* animationLoop) { _animationLoop = animationLoop; }
|
||||||
|
|
||||||
// EntityItemProperty related helpers
|
// EntityItemProperty related helpers
|
||||||
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const;
|
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties,
|
||||||
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings);
|
QScriptEngine* engine, bool skipDefaults,
|
||||||
virtual void debugDump() const;
|
EntityItemProperties& defaultEntityProperties) const override;
|
||||||
virtual void listChangedProperties(QList<QString>& out);
|
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) override;
|
||||||
|
virtual void debugDump() const override;
|
||||||
|
virtual void listChangedProperties(QList<QString>& out) override;
|
||||||
|
|
||||||
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
|
||||||
virtual void markAllChanged();
|
const unsigned char*& dataAt, int& processedBytes) override;
|
||||||
virtual EntityPropertyFlags getChangedProperties() const;
|
virtual void markAllChanged() override;
|
||||||
|
virtual EntityPropertyFlags getChangedProperties() const override;
|
||||||
|
|
||||||
// EntityItem related helpers
|
// EntityItem related helpers
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
virtual void getProperties(EntityItemProperties& propertiesOut) const override;
|
||||||
|
|
||||||
/// returns true if something changed
|
/// returns true if something changed
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
|
@ -65,12 +68,12 @@ public:
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
DEFINE_PROPERTY_REF(PROP_ANIMATION_URL, URL, url, QString, "");
|
DEFINE_PROPERTY_REF(PROP_ANIMATION_URL, URL, url, QString, "");
|
||||||
DEFINE_PROPERTY(PROP_ANIMATION_FPS, FPS, fps, float, 30.0f);
|
DEFINE_PROPERTY(PROP_ANIMATION_FPS, FPS, fps, float, 30.0f);
|
||||||
|
|
|
@ -36,8 +36,8 @@ public:
|
||||||
~DeleteEntityOperator();
|
~DeleteEntityOperator();
|
||||||
|
|
||||||
void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
|
void addEntityIDToDeleteList(const EntityItemID& searchEntityID);
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
|
|
||||||
const RemovedEntities& getEntities() const { return _entitiesToDelete; }
|
const RemovedEntities& getEntities() const { return _entitiesToDelete; }
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -42,8 +42,8 @@ public:
|
||||||
void queueEraseEntityMessage(const EntityItemID& entityItemID);
|
void queueEraseEntityMessage(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
// My server type is the model server
|
// My server type is the model server
|
||||||
virtual char getMyNodeType() const { return NodeType::EntityServer; }
|
virtual char getMyNodeType() const override { return NodeType::EntityServer; }
|
||||||
virtual void adjustEditPacketForClockSkew(PacketType type, QByteArray& buffer, qint64 clockSkew);
|
virtual void adjustEditPacketForClockSkew(PacketType type, QByteArray& buffer, qint64 clockSkew) override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void processEntityEditNackPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
void processEntityEditNackPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode);
|
||||||
|
|
|
@ -53,7 +53,7 @@ namespace render {
|
||||||
}
|
}
|
||||||
|
|
||||||
#define DONT_ALLOW_INSTANTIATION virtual void pureVirtualFunctionPlaceHolder() = 0;
|
#define DONT_ALLOW_INSTANTIATION virtual void pureVirtualFunctionPlaceHolder() = 0;
|
||||||
#define ALLOW_INSTANTIATION virtual void pureVirtualFunctionPlaceHolder() { };
|
#define ALLOW_INSTANTIATION virtual void pureVirtualFunctionPlaceHolder() override { };
|
||||||
|
|
||||||
#define debugTime(T, N) qPrintable(QString("%1 [ %2 ago]").arg(T, 16, 10).arg(formatUsecTime(N - T), 15))
|
#define debugTime(T, N) qPrintable(QString("%1 [ %2 ago]").arg(T, 16, 10).arg(formatUsecTime(N - T), 15))
|
||||||
#define debugTimeOnly(T) qPrintable(QString("%1").arg(T, 16, 10))
|
#define debugTimeOnly(T) qPrintable(QString("%1").arg(T, 16, 10))
|
||||||
|
|
|
@ -59,15 +59,15 @@ void RayToEntityIntersectionResultFromScriptValue(const QScriptValue& object, Ra
|
||||||
/// handles scripting of Entity commands from JS passed to assigned clients
|
/// handles scripting of Entity commands from JS passed to assigned clients
|
||||||
class EntityScriptingInterface : public OctreeScriptingInterface, public Dependency {
|
class EntityScriptingInterface : public OctreeScriptingInterface, public Dependency {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
Q_PROPERTY(float currentAvatarEnergy READ getCurrentAvatarEnergy WRITE setCurrentAvatarEnergy)
|
Q_PROPERTY(float currentAvatarEnergy READ getCurrentAvatarEnergy WRITE setCurrentAvatarEnergy)
|
||||||
Q_PROPERTY(float costMultiplier READ getCostMultiplier WRITE setCostMultiplier)
|
Q_PROPERTY(float costMultiplier READ getCostMultiplier WRITE setCostMultiplier)
|
||||||
public:
|
public:
|
||||||
EntityScriptingInterface(bool bidOnSimulationOwnership);
|
EntityScriptingInterface(bool bidOnSimulationOwnership);
|
||||||
|
|
||||||
EntityEditPacketSender* getEntityPacketSender() const { return (EntityEditPacketSender*)getPacketSender(); }
|
EntityEditPacketSender* getEntityPacketSender() const { return (EntityEditPacketSender*)getPacketSender(); }
|
||||||
virtual NodeType_t getServerNodeType() const { return NodeType::EntityServer; }
|
virtual NodeType_t getServerNodeType() const override { return NodeType::EntityServer; }
|
||||||
virtual OctreeEditPacketSender* createPacketSender() { return new EntityEditPacketSender(); }
|
virtual OctreeEditPacketSender* createPacketSender() override { return new EntityEditPacketSender(); }
|
||||||
|
|
||||||
void setEntityTree(EntityTreePointer modelTree);
|
void setEntityTree(EntityTreePointer modelTree);
|
||||||
EntityTreePointer getEntityTree() { return _entityTree; }
|
EntityTreePointer getEntityTree() { return _entityTree; }
|
||||||
|
@ -221,12 +221,12 @@ private:
|
||||||
|
|
||||||
std::recursive_mutex _entitiesScriptEngineLock;
|
std::recursive_mutex _entitiesScriptEngineLock;
|
||||||
EntitiesScriptEngineProvider* _entitiesScriptEngine { nullptr };
|
EntitiesScriptEngineProvider* _entitiesScriptEngine { nullptr };
|
||||||
|
|
||||||
bool _bidOnSimulationOwnership { false };
|
bool _bidOnSimulationOwnership { false };
|
||||||
float _currentAvatarEnergy = { FLT_MAX };
|
float _currentAvatarEnergy = { FLT_MAX };
|
||||||
float getCurrentAvatarEnergy() { return _currentAvatarEnergy; }
|
float getCurrentAvatarEnergy() { return _currentAvatarEnergy; }
|
||||||
void setCurrentAvatarEnergy(float energy);
|
void setCurrentAvatarEnergy(float energy);
|
||||||
|
|
||||||
float costMultiplier = { 0.01f };
|
float costMultiplier = { 0.01f };
|
||||||
float getCostMultiplier();
|
float getCostMultiplier();
|
||||||
void setCostMultiplier(float value);
|
void setCostMultiplier(float value);
|
||||||
|
|
|
@ -1304,8 +1304,8 @@ void EntityTree::debugDumpMap() {
|
||||||
|
|
||||||
class ContentsDimensionOperator : public RecurseOctreeOperator {
|
class ContentsDimensionOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element) { return true; }
|
virtual bool postRecursion(OctreeElementPointer element) override { return true; }
|
||||||
glm::vec3 getDimensions() const { return _contentExtents.size(); }
|
glm::vec3 getDimensions() const { return _contentExtents.size(); }
|
||||||
float getLargestDimension() const { return _contentExtents.largestDimension(); }
|
float getLargestDimension() const { return _contentExtents.largestDimension(); }
|
||||||
private:
|
private:
|
||||||
|
@ -1332,8 +1332,8 @@ float EntityTree::getContentsLargestDimension() {
|
||||||
|
|
||||||
class DebugOperator : public RecurseOctreeOperator {
|
class DebugOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element) { return true; }
|
virtual bool postRecursion(OctreeElementPointer element) override { return true; }
|
||||||
};
|
};
|
||||||
|
|
||||||
bool DebugOperator::preRecursion(OctreeElementPointer element) {
|
bool DebugOperator::preRecursion(OctreeElementPointer element) {
|
||||||
|
@ -1350,8 +1350,8 @@ void EntityTree::dumpTree() {
|
||||||
|
|
||||||
class PruneOperator : public RecurseOctreeOperator {
|
class PruneOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
virtual bool preRecursion(OctreeElementPointer element) { return true; }
|
virtual bool preRecursion(OctreeElementPointer element) override { return true; }
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
bool PruneOperator::postRecursion(OctreeElementPointer element) {
|
bool PruneOperator::postRecursion(OctreeElementPointer element) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ class EntityTreeElement : public OctreeElement, ReadWriteLockable {
|
||||||
|
|
||||||
EntityTreeElement(unsigned char* octalCode = NULL);
|
EntityTreeElement(unsigned char* octalCode = NULL);
|
||||||
|
|
||||||
virtual OctreeElementPointer createNewElement(unsigned char* octalCode = NULL);
|
virtual OctreeElementPointer createNewElement(unsigned char* octalCode = NULL) override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual ~EntityTreeElement();
|
virtual ~EntityTreeElement();
|
||||||
|
@ -93,67 +93,69 @@ public:
|
||||||
// methods you can and should override to implement your tree functionality
|
// methods you can and should override to implement your tree functionality
|
||||||
|
|
||||||
/// Adds a child to the current element. Override this if there is additional child initialization your class needs.
|
/// Adds a child to the current element. Override this if there is additional child initialization your class needs.
|
||||||
virtual OctreeElementPointer addChildAtIndex(int index);
|
virtual OctreeElementPointer addChildAtIndex(int index) override;
|
||||||
|
|
||||||
/// Override this to implement LOD averaging on changes to the tree.
|
/// Override this to implement LOD averaging on changes to the tree.
|
||||||
virtual void calculateAverageFromChildren();
|
virtual void calculateAverageFromChildren() override;
|
||||||
|
|
||||||
/// Override this to implement LOD collapsing and identical child pruning on changes to the tree.
|
/// Override this to implement LOD collapsing and identical child pruning on changes to the tree.
|
||||||
virtual bool collapseChildren();
|
virtual bool collapseChildren() override;
|
||||||
|
|
||||||
/// Should this element be considered to have content in it. This will be used in collision and ray casting methods.
|
/// Should this element be considered to have content in it. This will be used in collision and ray casting methods.
|
||||||
/// By default we assume that only leaves are actual content, but some octrees may have different semantics.
|
/// By default we assume that only leaves are actual content, but some octrees may have different semantics.
|
||||||
virtual bool hasContent() const { return hasEntities(); }
|
virtual bool hasContent() const override { return hasEntities(); }
|
||||||
|
|
||||||
/// Should this element be considered to have detailed content in it. Specifically should it be rendered.
|
/// Should this element be considered to have detailed content in it. Specifically should it be rendered.
|
||||||
/// By default we assume that only leaves have detailed content, but some octrees may have different semantics.
|
/// By default we assume that only leaves have detailed content, but some octrees may have different semantics.
|
||||||
virtual bool hasDetailedContent() const { return hasEntities(); }
|
virtual bool hasDetailedContent() const override { return hasEntities(); }
|
||||||
|
|
||||||
/// Override this to break up large octree elements when an edit operation is performed on a smaller octree element.
|
/// Override this to break up large octree elements when an edit operation is performed on a smaller octree element.
|
||||||
/// For example, if the octrees represent solid cubes and a delete of a smaller octree element is done then the
|
/// For example, if the octrees represent solid cubes and a delete of a smaller octree element is done then the
|
||||||
/// meaningful split would be to break the larger cube into smaller cubes of the same color/texture.
|
/// meaningful split would be to break the larger cube into smaller cubes of the same color/texture.
|
||||||
virtual void splitChildren() { }
|
virtual void splitChildren() override { }
|
||||||
|
|
||||||
/// Override to indicate that this element requires a split before editing lower elements in the octree
|
/// Override to indicate that this element requires a split before editing lower elements in the octree
|
||||||
virtual bool requiresSplit() const { return false; }
|
virtual bool requiresSplit() const override { return false; }
|
||||||
|
|
||||||
virtual void debugExtraEncodeData(EncodeBitstreamParams& params) const;
|
virtual void debugExtraEncodeData(EncodeBitstreamParams& params) const override;
|
||||||
virtual void initializeExtraEncodeData(EncodeBitstreamParams& params);
|
virtual void initializeExtraEncodeData(EncodeBitstreamParams& params) override;
|
||||||
virtual bool shouldIncludeChildData(int childIndex, EncodeBitstreamParams& params) const;
|
virtual bool shouldIncludeChildData(int childIndex, EncodeBitstreamParams& params) const override;
|
||||||
virtual bool shouldRecurseChildTree(int childIndex, EncodeBitstreamParams& params) const;
|
virtual bool shouldRecurseChildTree(int childIndex, EncodeBitstreamParams& params) const override;
|
||||||
virtual void updateEncodedData(int childIndex, AppendState childAppendState, EncodeBitstreamParams& params) const;
|
virtual void updateEncodedData(int childIndex, AppendState childAppendState, EncodeBitstreamParams& params) const override;
|
||||||
virtual void elementEncodeComplete(EncodeBitstreamParams& params) const;
|
virtual void elementEncodeComplete(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
bool alreadyFullyEncoded(EncodeBitstreamParams& params) const;
|
bool alreadyFullyEncoded(EncodeBitstreamParams& params) const;
|
||||||
|
|
||||||
|
|
||||||
/// Override to serialize the state of this element. This is used for persistance and for transmission across the network.
|
/// Override to serialize the state of this element. This is used for persistance and for transmission across the network.
|
||||||
virtual OctreeElement::AppendState appendElementData(OctreePacketData* packetData, EncodeBitstreamParams& params) const;
|
virtual OctreeElement::AppendState appendElementData(OctreePacketData* packetData,
|
||||||
|
EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
/// Override to deserialize the state of this element. This is used for loading from a persisted file or from reading
|
/// Override to deserialize the state of this element. This is used for loading from a persisted file or from reading
|
||||||
/// from the network.
|
/// from the network.
|
||||||
virtual int readElementDataFromBuffer(const unsigned char* data, int bytesLeftToRead, ReadBitstreamToTreeParams& args);
|
virtual int readElementDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
|
ReadBitstreamToTreeParams& args) override;
|
||||||
|
|
||||||
/// Override to indicate that the item is currently rendered in the rendering engine. By default we assume that if
|
/// Override to indicate that the item is currently rendered in the rendering engine. By default we assume that if
|
||||||
/// the element should be rendered, then your rendering engine is rendering. But some rendering engines my have cases
|
/// the element should be rendered, then your rendering engine is rendering. But some rendering engines my have cases
|
||||||
/// where an element is not actually rendering all should render elements. If the isRendered() state doesn't match the
|
/// where an element is not actually rendering all should render elements. If the isRendered() state doesn't match the
|
||||||
/// shouldRender() state, the tree will remark elements as changed even in cases there the elements have not changed.
|
/// shouldRender() state, the tree will remark elements as changed even in cases there the elements have not changed.
|
||||||
virtual bool isRendered() const { return getShouldRender(); }
|
virtual bool isRendered() const override { return getShouldRender(); }
|
||||||
virtual bool deleteApproved() const { return !hasEntities(); }
|
virtual bool deleteApproved() const override { return !hasEntities(); }
|
||||||
|
|
||||||
virtual bool canRayIntersect() const { return hasEntities(); }
|
virtual bool canRayIntersect() const override { return hasEntities(); }
|
||||||
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& node, float& distance,
|
bool& keepSearching, OctreeElementPointer& node, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal, const QVector<EntityItemID>& entityIdsToInclude,
|
BoxFace& face, glm::vec3& surfaceNormal, const QVector<EntityItemID>& entityIdsToInclude,
|
||||||
const QVector<EntityItemID>& entityIdsToDiscard,
|
const QVector<EntityItemID>& entityIdsToDiscard,
|
||||||
void** intersectedObject = NULL, bool precisionPicking = false);
|
void** intersectedObject = NULL, bool precisionPicking = false);
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal, const QVector<EntityItemID>& entityIdsToInclude,
|
BoxFace& face, glm::vec3& surfaceNormal, const QVector<EntityItemID>& entityIdsToInclude,
|
||||||
const QVector<EntityItemID>& entityIdsToDiscard,
|
const QVector<EntityItemID>& entityIdsToDiscard,
|
||||||
void** intersectedObject, bool precisionPicking, float distanceToElementCube);
|
void** intersectedObject, bool precisionPicking, float distanceToElementCube);
|
||||||
virtual bool findSpherePenetration(const glm::vec3& center, float radius,
|
virtual bool findSpherePenetration(const glm::vec3& center, float radius,
|
||||||
glm::vec3& penetration, void** penetratedObject) const;
|
glm::vec3& penetration, void** penetratedObject) const override;
|
||||||
|
|
||||||
|
|
||||||
template <typename F>
|
template <typename F>
|
||||||
|
@ -232,7 +234,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void init(unsigned char * octalCode);
|
virtual void init(unsigned char * octalCode) override;
|
||||||
EntityTreePointer _myTree;
|
EntityTreePointer _myTree;
|
||||||
EntityItems _entityItems;
|
EntityItems _entityItems;
|
||||||
};
|
};
|
||||||
|
|
|
@ -30,9 +30,9 @@ public:
|
||||||
EntityTreeHeadlessViewer();
|
EntityTreeHeadlessViewer();
|
||||||
virtual ~EntityTreeHeadlessViewer();
|
virtual ~EntityTreeHeadlessViewer();
|
||||||
|
|
||||||
virtual char getMyNodeType() const { return NodeType::EntityServer; }
|
virtual char getMyNodeType() const override { return NodeType::EntityServer; }
|
||||||
virtual PacketType getMyQueryMessageType() const { return PacketType::EntityQuery; }
|
virtual PacketType getMyQueryMessageType() const override { return PacketType::EntityQuery; }
|
||||||
virtual PacketType getExpectedPacketType() const { return PacketType::EntityData; }
|
virtual PacketType getExpectedPacketType() const override { return PacketType::EntityData; }
|
||||||
|
|
||||||
void update();
|
void update();
|
||||||
|
|
||||||
|
@ -40,10 +40,10 @@ public:
|
||||||
|
|
||||||
void processEraseMessage(ReceivedMessage& message, const SharedNodePointer& sourceNode);
|
void processEraseMessage(ReceivedMessage& message, const SharedNodePointer& sourceNode);
|
||||||
|
|
||||||
virtual void init();
|
virtual void init() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual OctreePointer createTree() {
|
virtual OctreePointer createTree() override {
|
||||||
EntityTreePointer newTree = EntityTreePointer(new EntityTree(true));
|
EntityTreePointer newTree = EntityTreePointer(new EntityTree(true));
|
||||||
newTree->createRootElement();
|
newTree->createRootElement();
|
||||||
return newTree;
|
return newTree;
|
||||||
|
|
|
@ -30,57 +30,57 @@ class ReadBitstreamToTreeParams;
|
||||||
class KeyLightPropertyGroup : public PropertyGroup {
|
class KeyLightPropertyGroup : public PropertyGroup {
|
||||||
public:
|
public:
|
||||||
// EntityItemProperty related helpers
|
// EntityItemProperty related helpers
|
||||||
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const;
|
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties,
|
||||||
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings);
|
QScriptEngine* engine, bool skipDefaults,
|
||||||
virtual void debugDump() const;
|
EntityItemProperties& defaultEntityProperties) const override;
|
||||||
virtual void listChangedProperties(QList<QString>& out);
|
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) override;
|
||||||
|
virtual void debugDump() const override;
|
||||||
|
virtual void listChangedProperties(QList<QString>& out) override;
|
||||||
|
|
||||||
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
|
||||||
virtual void markAllChanged();
|
const unsigned char*& dataAt, int& processedBytes) override;
|
||||||
virtual EntityPropertyFlags getChangedProperties() const;
|
virtual void markAllChanged() override;
|
||||||
|
virtual EntityPropertyFlags getChangedProperties() const override;
|
||||||
|
|
||||||
// EntityItem related helpers
|
// EntityItem related helpers
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
virtual void getProperties(EntityItemProperties& propertiesOut) const override;
|
||||||
|
|
||||||
/// returns true if something changed
|
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
/// returns true if something changed
|
||||||
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
|
||||||
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
static const xColor DEFAULT_KEYLIGHT_COLOR;
|
static const xColor DEFAULT_KEYLIGHT_COLOR;
|
||||||
static const float DEFAULT_KEYLIGHT_INTENSITY;
|
static const float DEFAULT_KEYLIGHT_INTENSITY;
|
||||||
static const float DEFAULT_KEYLIGHT_AMBIENT_INTENSITY;
|
static const float DEFAULT_KEYLIGHT_AMBIENT_INTENSITY;
|
||||||
static const glm::vec3 DEFAULT_KEYLIGHT_DIRECTION;
|
static const glm::vec3 DEFAULT_KEYLIGHT_DIRECTION;
|
||||||
|
|
||||||
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_COLOR, Color, color, xColor, DEFAULT_KEYLIGHT_COLOR);
|
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_COLOR, Color, color, xColor, DEFAULT_KEYLIGHT_COLOR);
|
||||||
DEFINE_PROPERTY(PROP_KEYLIGHT_INTENSITY, Intensity, intensity, float, DEFAULT_KEYLIGHT_INTENSITY);
|
DEFINE_PROPERTY(PROP_KEYLIGHT_INTENSITY, Intensity, intensity, float, DEFAULT_KEYLIGHT_INTENSITY);
|
||||||
DEFINE_PROPERTY(PROP_KEYLIGHT_AMBIENT_INTENSITY, AmbientIntensity, ambientIntensity, float, DEFAULT_KEYLIGHT_AMBIENT_INTENSITY);
|
DEFINE_PROPERTY(PROP_KEYLIGHT_AMBIENT_INTENSITY, AmbientIntensity, ambientIntensity, float, DEFAULT_KEYLIGHT_AMBIENT_INTENSITY);
|
||||||
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_DIRECTION, Direction, direction, glm::vec3, DEFAULT_KEYLIGHT_DIRECTION);
|
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_DIRECTION, Direction, direction, glm::vec3, DEFAULT_KEYLIGHT_DIRECTION);
|
||||||
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_AMBIENT_URL, AmbientURL, ambientURL, QString, "");
|
DEFINE_PROPERTY_REF(PROP_KEYLIGHT_AMBIENT_URL, AmbientURL, ambientURL, QString, "");
|
||||||
|
|
||||||
protected:
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_KeyLightPropertyGroup_h
|
#endif // hifi_KeyLightPropertyGroup_h
|
||||||
|
|
|
@ -25,30 +25,30 @@ public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
LightEntityItem(const EntityItemID& entityItemID);
|
LightEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
||||||
virtual void setDimensions(const glm::vec3& value);
|
virtual void setDimensions(const glm::vec3& value) override;
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
const rgbColor& getColor() const { return _color; }
|
const rgbColor& getColor() const { return _color; }
|
||||||
xColor getXColor() const {
|
xColor getXColor() const {
|
||||||
|
|
|
@ -12,35 +12,35 @@
|
||||||
#ifndef hifi_LineEntityItem_h
|
#ifndef hifi_LineEntityItem_h
|
||||||
#define hifi_LineEntityItem_h
|
#define hifi_LineEntityItem_h
|
||||||
|
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
|
|
||||||
class LineEntityItem : public EntityItem {
|
class LineEntityItem : public EntityItem {
|
||||||
public:
|
public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
LineEntityItem(const EntityItemID& entityItemID);
|
LineEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
const rgbColor& getColor() const { return _color; }
|
const rgbColor& getColor() const { return _color; }
|
||||||
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
||||||
|
@ -51,25 +51,26 @@ class LineEntityItem : public EntityItem {
|
||||||
_color[GREEN_INDEX] = value.green;
|
_color[GREEN_INDEX] = value.green;
|
||||||
_color[BLUE_INDEX] = value.blue;
|
_color[BLUE_INDEX] = value.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLineWidth(float lineWidth){ _lineWidth = lineWidth; }
|
void setLineWidth(float lineWidth){ _lineWidth = lineWidth; }
|
||||||
float getLineWidth() const{ return _lineWidth; }
|
float getLineWidth() const{ return _lineWidth; }
|
||||||
|
|
||||||
bool setLinePoints(const QVector<glm::vec3>& points);
|
bool setLinePoints(const QVector<glm::vec3>& points);
|
||||||
bool appendPoint(const glm::vec3& point);
|
bool appendPoint(const glm::vec3& point);
|
||||||
|
|
||||||
const QVector<glm::vec3>& getLinePoints() const{ return _points; }
|
const QVector<glm::vec3>& getLinePoints() const{ return _points; }
|
||||||
|
|
||||||
virtual ShapeType getShapeType() const { return SHAPE_TYPE_NONE; }
|
virtual ShapeType getShapeType() const override { return SHAPE_TYPE_NONE; }
|
||||||
|
|
||||||
// never have a ray intersection pick a LineEntityItem.
|
// never have a ray intersection pick a LineEntityItem.
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const { return false; }
|
void** intersectedObject,
|
||||||
|
bool precisionPicking) const override { return false; }
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
static const float DEFAULT_LINE_WIDTH;
|
static const float DEFAULT_LINE_WIDTH;
|
||||||
static const int MAX_POINTS_PER_LINE;
|
static const int MAX_POINTS_PER_LINE;
|
||||||
|
|
||||||
|
|
|
@ -26,11 +26,11 @@ public:
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
|
@ -38,20 +38,20 @@ public:
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
virtual void update(const quint64& now);
|
virtual void update(const quint64& now) override;
|
||||||
virtual bool needsToCallUpdate() const;
|
virtual bool needsToCallUpdate() const override;
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
|
|
||||||
void setShapeType(ShapeType type);
|
void setShapeType(ShapeType type) override;
|
||||||
virtual ShapeType getShapeType() const;
|
virtual ShapeType getShapeType() const override;
|
||||||
|
|
||||||
|
|
||||||
// TODO: Move these to subclasses, or other appropriate abstraction
|
// TODO: Move these to subclasses, or other appropriate abstraction
|
||||||
|
@ -115,7 +115,7 @@ public:
|
||||||
const QString getTextures() const;
|
const QString getTextures() const;
|
||||||
void setTextures(const QString& textures);
|
void setTextures(const QString& textures);
|
||||||
|
|
||||||
virtual bool shouldBePhysical() const;
|
virtual bool shouldBePhysical() const override;
|
||||||
|
|
||||||
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
virtual glm::vec3 getJointPosition(int jointIndex) const { return glm::vec3(); }
|
||||||
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
virtual glm::quat getJointRotation(int jointIndex) const { return glm::quat(); }
|
||||||
|
|
|
@ -38,9 +38,9 @@ public:
|
||||||
~MovingEntitiesOperator();
|
~MovingEntitiesOperator();
|
||||||
|
|
||||||
void addEntityToMoveList(EntityItemPointer entity, const AACube& newCube);
|
void addEntityToMoveList(EntityItemPointer entity, const AACube& newCube);
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex);
|
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex) override;
|
||||||
bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
|
bool hasMovingEntities() const { return _entitiesToMove.size() > 0; }
|
||||||
private:
|
private:
|
||||||
EntityTreePointer _tree;
|
EntityTreePointer _tree;
|
||||||
|
|
|
@ -26,10 +26,10 @@ public:
|
||||||
ParticleEffectEntityItem(const EntityItemID& entityItemID);
|
ParticleEffectEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
// methods for getting/setting all properties of this entity
|
// methods for getting/setting all properties of this entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
|
@ -37,15 +37,15 @@ public:
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
virtual void update(const quint64& now);
|
virtual void update(const quint64& now) override;
|
||||||
virtual bool needsToCallUpdate() const;
|
virtual bool needsToCallUpdate() const override;
|
||||||
|
|
||||||
const rgbColor& getColor() const { return _color; }
|
const rgbColor& getColor() const { return _color; }
|
||||||
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
||||||
|
@ -95,10 +95,10 @@ public:
|
||||||
void setAlphaSpread(float alphaSpread);
|
void setAlphaSpread(float alphaSpread);
|
||||||
float getAlphaSpread() const { return _alphaSpread; }
|
float getAlphaSpread() const { return _alphaSpread; }
|
||||||
|
|
||||||
void setShapeType(ShapeType type);
|
void setShapeType(ShapeType type) override;
|
||||||
virtual ShapeType getShapeType() const { return _shapeType; }
|
virtual ShapeType getShapeType() const override { return _shapeType; }
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
|
|
||||||
bool isEmittingParticles() const; /// emitting enabled, and there are particles alive
|
bool isEmittingParticles() const; /// emitting enabled, and there are particles alive
|
||||||
bool getIsEmitting() const { return _isEmitting; }
|
bool getIsEmitting() const { return _isEmitting; }
|
||||||
|
@ -219,7 +219,7 @@ public:
|
||||||
_emitterShouldTrail = emitterShouldTrail;
|
_emitterShouldTrail = emitterShouldTrail;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool supportsDetailedRayIntersection() const { return false; }
|
virtual bool supportsDetailedRayIntersection() const override { return false; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
struct Particle;
|
struct Particle;
|
||||||
|
|
|
@ -12,35 +12,35 @@
|
||||||
#ifndef hifi_PolyLineEntityItem_h
|
#ifndef hifi_PolyLineEntityItem_h
|
||||||
#define hifi_PolyLineEntityItem_h
|
#define hifi_PolyLineEntityItem_h
|
||||||
|
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
|
|
||||||
class PolyLineEntityItem : public EntityItem {
|
class PolyLineEntityItem : public EntityItem {
|
||||||
public:
|
public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
PolyLineEntityItem(const EntityItemID& entityItemID);
|
PolyLineEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
const rgbColor& getColor() const { return _color; }
|
const rgbColor& getColor() const { return _color; }
|
||||||
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
xColor getXColor() const { xColor color = { _color[RED_INDEX], _color[GREEN_INDEX], _color[BLUE_INDEX] }; return color; }
|
||||||
|
@ -49,22 +49,21 @@ class PolyLineEntityItem : public EntityItem {
|
||||||
memcpy(_color, value, sizeof(_color));
|
memcpy(_color, value, sizeof(_color));
|
||||||
}
|
}
|
||||||
void setColor(const xColor& value) {
|
void setColor(const xColor& value) {
|
||||||
|
|
||||||
_color[RED_INDEX] = value.red;
|
_color[RED_INDEX] = value.red;
|
||||||
_color[GREEN_INDEX] = value.green;
|
_color[GREEN_INDEX] = value.green;
|
||||||
_color[BLUE_INDEX] = value.blue;
|
_color[BLUE_INDEX] = value.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
void setLineWidth(float lineWidth){ _lineWidth = lineWidth; }
|
void setLineWidth(float lineWidth){ _lineWidth = lineWidth; }
|
||||||
float getLineWidth() const{ return _lineWidth; }
|
float getLineWidth() const{ return _lineWidth; }
|
||||||
|
|
||||||
bool setLinePoints(const QVector<glm::vec3>& points);
|
bool setLinePoints(const QVector<glm::vec3>& points);
|
||||||
bool appendPoint(const glm::vec3& point);
|
bool appendPoint(const glm::vec3& point);
|
||||||
const QVector<glm::vec3>& getLinePoints() const{ return _points; }
|
const QVector<glm::vec3>& getLinePoints() const{ return _points; }
|
||||||
|
|
||||||
bool setNormals(const QVector<glm::vec3>& normals);
|
bool setNormals(const QVector<glm::vec3>& normals);
|
||||||
const QVector<glm::vec3>& getNormals() const{ return _normals; }
|
const QVector<glm::vec3>& getNormals() const{ return _normals; }
|
||||||
|
|
||||||
bool setStrokeWidths(const QVector<float>& strokeWidths);
|
bool setStrokeWidths(const QVector<float>& strokeWidths);
|
||||||
const QVector<float>& getStrokeWidths() const{ return _strokeWidths; }
|
const QVector<float>& getStrokeWidths() const{ return _strokeWidths; }
|
||||||
|
|
||||||
|
@ -76,18 +75,18 @@ class PolyLineEntityItem : public EntityItem {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual bool needsToCallUpdate() const { return true; }
|
virtual bool needsToCallUpdate() const override { return true; }
|
||||||
|
|
||||||
virtual ShapeType getShapeType() const { return SHAPE_TYPE_NONE; }
|
virtual ShapeType getShapeType() const override { return SHAPE_TYPE_NONE; }
|
||||||
|
|
||||||
// never have a ray intersection pick a PolyLineEntityItem.
|
// never have a ray intersection pick a PolyLineEntityItem.
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const { return false;}
|
void** intersectedObject, bool precisionPicking) const override { return false; }
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
static const float DEFAULT_LINE_WIDTH;
|
static const float DEFAULT_LINE_WIDTH;
|
||||||
static const int MAX_POINTS_PER_LINE;
|
static const int MAX_POINTS_PER_LINE;
|
||||||
|
|
||||||
|
|
|
@ -23,11 +23,11 @@ class PolyVoxEntityItem : public EntityItem {
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
|
@ -35,21 +35,21 @@ class PolyVoxEntityItem : public EntityItem {
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
// never have a ray intersection pick a PolyVoxEntityItem.
|
// never have a ray intersection pick a PolyVoxEntityItem.
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const { return false; }
|
void** intersectedObject, bool precisionPicking) const override { return false; }
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
|
|
||||||
virtual void setVoxelVolumeSize(glm::vec3 voxelVolumeSize);
|
virtual void setVoxelVolumeSize(glm::vec3 voxelVolumeSize);
|
||||||
virtual glm::vec3 getVoxelVolumeSize() const;
|
virtual glm::vec3 getVoxelVolumeSize() const;
|
||||||
|
|
|
@ -63,7 +63,7 @@ public:
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const = 0;
|
OctreeElement::AppendState& appendState) const = 0;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes) = 0;
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes) = 0;
|
||||||
|
|
|
@ -15,8 +15,8 @@ class RecurseOctreeToMapOperator : public RecurseOctreeOperator {
|
||||||
public:
|
public:
|
||||||
RecurseOctreeToMapOperator(QVariantMap& map, OctreeElementPointer top, QScriptEngine* engine, bool skipDefaultValues,
|
RecurseOctreeToMapOperator(QVariantMap& map, OctreeElementPointer top, QScriptEngine* engine, bool skipDefaultValues,
|
||||||
bool skipThoseWithBadParents);
|
bool skipThoseWithBadParents);
|
||||||
bool preRecursion(OctreeElementPointer element);
|
bool preRecursion(OctreeElementPointer element) override;
|
||||||
bool postRecursion(OctreeElementPointer element);
|
bool postRecursion(OctreeElementPointer element) override;
|
||||||
private:
|
private:
|
||||||
QVariantMap& _map;
|
QVariantMap& _map;
|
||||||
OctreeElementPointer _top;
|
OctreeElementPointer _top;
|
||||||
|
|
|
@ -30,44 +30,47 @@ class ReadBitstreamToTreeParams;
|
||||||
class SkyboxPropertyGroup : public PropertyGroup {
|
class SkyboxPropertyGroup : public PropertyGroup {
|
||||||
public:
|
public:
|
||||||
// EntityItemProperty related helpers
|
// EntityItemProperty related helpers
|
||||||
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const;
|
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties,
|
||||||
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings);
|
QScriptEngine* engine, bool skipDefaults,
|
||||||
virtual void debugDump() const;
|
EntityItemProperties& defaultEntityProperties) const override;
|
||||||
virtual void listChangedProperties(QList<QString>& out);
|
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) override;
|
||||||
|
virtual void debugDump() const override;
|
||||||
|
virtual void listChangedProperties(QList<QString>& out) override;
|
||||||
|
|
||||||
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
|
||||||
virtual void markAllChanged();
|
const unsigned char*& dataAt, int& processedBytes) override;
|
||||||
virtual EntityPropertyFlags getChangedProperties() const;
|
virtual void markAllChanged() override;
|
||||||
|
virtual EntityPropertyFlags getChangedProperties() const override;
|
||||||
|
|
||||||
// EntityItem related helpers
|
// EntityItem related helpers
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
virtual void getProperties(EntityItemProperties& propertiesOut) const override;
|
||||||
|
|
||||||
/// returns true if something changed
|
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
/// returns true if something changed
|
||||||
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
|
||||||
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
glm::vec3 getColorVec3() const {
|
glm::vec3 getColorVec3() const {
|
||||||
const quint8 MAX_COLOR = 255;
|
const quint8 MAX_COLOR = 255;
|
||||||
glm::vec3 color = { (float)_color.red / (float)MAX_COLOR,
|
glm::vec3 color = { (float)_color.red / (float)MAX_COLOR,
|
||||||
|
|
|
@ -30,54 +30,57 @@ class ReadBitstreamToTreeParams;
|
||||||
class StagePropertyGroup : public PropertyGroup {
|
class StagePropertyGroup : public PropertyGroup {
|
||||||
public:
|
public:
|
||||||
// EntityItemProperty related helpers
|
// EntityItemProperty related helpers
|
||||||
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties, QScriptEngine* engine, bool skipDefaults, EntityItemProperties& defaultEntityProperties) const;
|
virtual void copyToScriptValue(const EntityPropertyFlags& desiredProperties, QScriptValue& properties,
|
||||||
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings);
|
QScriptEngine* engine, bool skipDefaults,
|
||||||
virtual void debugDump() const;
|
EntityItemProperties& defaultEntityProperties) const override;
|
||||||
virtual void listChangedProperties(QList<QString>& out);
|
virtual void copyFromScriptValue(const QScriptValue& object, bool& _defaultSettings) override;
|
||||||
|
virtual void debugDump() const override;
|
||||||
|
virtual void listChangedProperties(QList<QString>& out) override;
|
||||||
|
|
||||||
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
virtual bool appendToEditPacket(OctreePacketData* packetData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags, const unsigned char*& dataAt , int& processedBytes);
|
virtual bool decodeFromEditPacket(EntityPropertyFlags& propertyFlags,
|
||||||
virtual void markAllChanged();
|
const unsigned char*& dataAt, int& processedBytes) override;
|
||||||
virtual EntityPropertyFlags getChangedProperties() const;
|
virtual void markAllChanged() override;
|
||||||
|
virtual EntityPropertyFlags getChangedProperties() const override;
|
||||||
|
|
||||||
// EntityItem related helpers
|
// EntityItem related helpers
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual void getProperties(EntityItemProperties& propertiesOut) const;
|
virtual void getProperties(EntityItemProperties& propertiesOut) const override;
|
||||||
|
|
||||||
/// returns true if something changed
|
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
|
||||||
|
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
/// returns true if something changed
|
||||||
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
|
||||||
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* entityTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
static const bool DEFAULT_STAGE_SUN_MODEL_ENABLED;
|
static const bool DEFAULT_STAGE_SUN_MODEL_ENABLED;
|
||||||
static const float DEFAULT_STAGE_LATITUDE;
|
static const float DEFAULT_STAGE_LATITUDE;
|
||||||
static const float DEFAULT_STAGE_LONGITUDE;
|
static const float DEFAULT_STAGE_LONGITUDE;
|
||||||
static const float DEFAULT_STAGE_ALTITUDE;
|
static const float DEFAULT_STAGE_ALTITUDE;
|
||||||
static const quint16 DEFAULT_STAGE_DAY;
|
static const quint16 DEFAULT_STAGE_DAY;
|
||||||
static const float DEFAULT_STAGE_HOUR;
|
static const float DEFAULT_STAGE_HOUR;
|
||||||
|
|
||||||
float calculateHour() const;
|
float calculateHour() const;
|
||||||
uint16_t calculateDay() const;
|
uint16_t calculateDay() const;
|
||||||
|
|
||||||
DEFINE_PROPERTY(PROP_STAGE_SUN_MODEL_ENABLED, SunModelEnabled, sunModelEnabled, bool, DEFAULT_STAGE_SUN_MODEL_ENABLED);
|
DEFINE_PROPERTY(PROP_STAGE_SUN_MODEL_ENABLED, SunModelEnabled, sunModelEnabled, bool, DEFAULT_STAGE_SUN_MODEL_ENABLED);
|
||||||
DEFINE_PROPERTY(PROP_STAGE_LATITUDE, Latitude, latitude, float, DEFAULT_STAGE_LATITUDE);
|
DEFINE_PROPERTY(PROP_STAGE_LATITUDE, Latitude, latitude, float, DEFAULT_STAGE_LATITUDE);
|
||||||
DEFINE_PROPERTY(PROP_STAGE_LONGITUDE, Longitude, longitude, float, DEFAULT_STAGE_LONGITUDE);
|
DEFINE_PROPERTY(PROP_STAGE_LONGITUDE, Longitude, longitude, float, DEFAULT_STAGE_LONGITUDE);
|
||||||
|
|
|
@ -12,45 +12,45 @@
|
||||||
#ifndef hifi_TextEntityItem_h
|
#ifndef hifi_TextEntityItem_h
|
||||||
#define hifi_TextEntityItem_h
|
#define hifi_TextEntityItem_h
|
||||||
|
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
|
|
||||||
class TextEntityItem : public EntityItem {
|
class TextEntityItem : public EntityItem {
|
||||||
public:
|
public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
TextEntityItem(const EntityItemID& entityItemID);
|
TextEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
||||||
virtual void setDimensions(const glm::vec3& value);
|
virtual void setDimensions(const glm::vec3& value) override;
|
||||||
virtual ShapeType getShapeType() const { return SHAPE_TYPE_BOX; }
|
virtual ShapeType getShapeType() const override { return SHAPE_TYPE_BOX; }
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const;
|
void** intersectedObject, bool precisionPicking) const override;
|
||||||
|
|
||||||
static const QString DEFAULT_TEXT;
|
static const QString DEFAULT_TEXT;
|
||||||
void setText(const QString& value) { _text = value; }
|
void setText(const QString& value) { _text = value; }
|
||||||
|
@ -81,7 +81,7 @@ public:
|
||||||
_backgroundColor[GREEN_INDEX] = value.green;
|
_backgroundColor[GREEN_INDEX] = value.green;
|
||||||
_backgroundColor[BLUE_INDEX] = value.blue;
|
_backgroundColor[BLUE_INDEX] = value.blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const bool DEFAULT_FACE_CAMERA;
|
static const bool DEFAULT_FACE_CAMERA;
|
||||||
bool getFaceCamera() const { return _faceCamera; }
|
bool getFaceCamera() const { return _faceCamera; }
|
||||||
void setFaceCamera(bool value) { _faceCamera = value; }
|
void setFaceCamera(bool value) { _faceCamera = value; }
|
||||||
|
|
|
@ -25,9 +25,9 @@ public:
|
||||||
|
|
||||||
~UpdateEntityOperator();
|
~UpdateEntityOperator();
|
||||||
|
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex);
|
virtual OctreeElementPointer possiblyCreateChildAt(OctreeElementPointer element, int childIndex) override;
|
||||||
private:
|
private:
|
||||||
EntityTreePointer _tree;
|
EntityTreePointer _tree;
|
||||||
EntityItemPointer _existingEntity;
|
EntityItemPointer _existingEntity;
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
#ifndef hifi_WebEntityItem_h
|
#ifndef hifi_WebEntityItem_h
|
||||||
#define hifi_WebEntityItem_h
|
#define hifi_WebEntityItem_h
|
||||||
|
|
||||||
#include "EntityItem.h"
|
#include "EntityItem.h"
|
||||||
|
|
||||||
class WebEntityItem : public EntityItem {
|
class WebEntityItem : public EntityItem {
|
||||||
public:
|
public:
|
||||||
|
@ -18,38 +18,38 @@ public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
WebEntityItem(const EntityItemID& entityItemID);
|
WebEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
/// set dimensions in domain scale units (0.0 - 1.0) this will also reset radius appropriately
|
||||||
virtual void setDimensions(const glm::vec3& value);
|
virtual void setDimensions(const glm::vec3& value) override;
|
||||||
virtual ShapeType getShapeType() const { return SHAPE_TYPE_BOX; }
|
virtual ShapeType getShapeType() const override { return SHAPE_TYPE_BOX; }
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const;
|
void** intersectedObject, bool precisionPicking) const override;
|
||||||
|
|
||||||
virtual void setSourceUrl(const QString& value);
|
virtual void setSourceUrl(const QString& value);
|
||||||
const QString& getSourceUrl() const;
|
const QString& getSourceUrl() const;
|
||||||
|
|
|
@ -23,28 +23,28 @@ public:
|
||||||
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
static EntityItemPointer factory(const EntityItemID& entityID, const EntityItemProperties& properties);
|
||||||
|
|
||||||
ZoneEntityItem(const EntityItemID& entityItemID);
|
ZoneEntityItem(const EntityItemID& entityItemID);
|
||||||
|
|
||||||
ALLOW_INSTANTIATION // This class can be instantiated
|
ALLOW_INSTANTIATION // This class can be instantiated
|
||||||
|
|
||||||
// methods for getting/setting all properties of an entity
|
// methods for getting/setting all properties of an entity
|
||||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||||
virtual bool setProperties(const EntityItemProperties& properties);
|
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||||
|
|
||||||
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
// TODO: eventually only include properties changed since the params.lastViewFrustumSent time
|
||||||
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const;
|
virtual EntityPropertyFlags getEntityProperties(EncodeBitstreamParams& params) const override;
|
||||||
|
|
||||||
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
virtual void appendSubclassData(OctreePacketData* packetData, EncodeBitstreamParams& params,
|
||||||
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
EntityTreeElementExtraEncodeData* modelTreeElementExtraEncodeData,
|
||||||
EntityPropertyFlags& requestedProperties,
|
EntityPropertyFlags& requestedProperties,
|
||||||
EntityPropertyFlags& propertyFlags,
|
EntityPropertyFlags& propertyFlags,
|
||||||
EntityPropertyFlags& propertiesDidntFit,
|
EntityPropertyFlags& propertiesDidntFit,
|
||||||
int& propertyCount,
|
int& propertyCount,
|
||||||
OctreeElement::AppendState& appendState) const;
|
OctreeElement::AppendState& appendState) const override;
|
||||||
|
|
||||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||||
ReadBitstreamToTreeParams& args,
|
ReadBitstreamToTreeParams& args,
|
||||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||||
bool& somethingChanged);
|
bool& somethingChanged) override;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@ public:
|
||||||
|
|
||||||
static bool getDrawZoneBoundaries() { return _drawZoneBoundaries; }
|
static bool getDrawZoneBoundaries() { return _drawZoneBoundaries; }
|
||||||
static void setDrawZoneBoundaries(bool value) { _drawZoneBoundaries = value; }
|
static void setDrawZoneBoundaries(bool value) { _drawZoneBoundaries = value; }
|
||||||
|
|
||||||
virtual bool isReadyToComputeShape() { return false; }
|
virtual bool isReadyToComputeShape() override { return false; }
|
||||||
void setShapeType(ShapeType type) { _shapeType = type; }
|
void setShapeType(ShapeType type) override { _shapeType = type; }
|
||||||
virtual ShapeType getShapeType() const;
|
virtual ShapeType getShapeType() const override;
|
||||||
|
|
||||||
virtual bool hasCompoundShapeURL() const { return !_compoundShapeURL.isEmpty(); }
|
virtual bool hasCompoundShapeURL() const { return !_compoundShapeURL.isEmpty(); }
|
||||||
const QString getCompoundShapeURL() const { return _compoundShapeURL; }
|
const QString getCompoundShapeURL() const { return _compoundShapeURL; }
|
||||||
virtual void setCompoundShapeURL(const QString& url);
|
virtual void setCompoundShapeURL(const QString& url);
|
||||||
|
@ -75,13 +75,13 @@ public:
|
||||||
bool getGhostingAllowed() const { return _ghostingAllowed; }
|
bool getGhostingAllowed() const { return _ghostingAllowed; }
|
||||||
void setGhostingAllowed(bool value) { _ghostingAllowed = value; }
|
void setGhostingAllowed(bool value) { _ghostingAllowed = value; }
|
||||||
|
|
||||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||||
BoxFace& face, glm::vec3& surfaceNormal,
|
BoxFace& face, glm::vec3& surfaceNormal,
|
||||||
void** intersectedObject, bool precisionPicking) const;
|
void** intersectedObject, bool precisionPicking) const override;
|
||||||
|
|
||||||
virtual void debugDump() const;
|
virtual void debugDump() const override;
|
||||||
|
|
||||||
static const ShapeType DEFAULT_SHAPE_TYPE;
|
static const ShapeType DEFAULT_SHAPE_TYPE;
|
||||||
static const QString DEFAULT_COMPOUND_SHAPE_URL;
|
static const QString DEFAULT_COMPOUND_SHAPE_URL;
|
||||||
|
|
|
@ -65,7 +65,7 @@ protected:
|
||||||
|
|
||||||
class QmlNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory {
|
class QmlNetworkAccessManagerFactory : public QQmlNetworkAccessManagerFactory {
|
||||||
public:
|
public:
|
||||||
QNetworkAccessManager* create(QObject* parent);
|
QNetworkAccessManager* create(QObject* parent) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
QNetworkAccessManager* QmlNetworkAccessManagerFactory::create(QObject* parent) {
|
QNetworkAccessManager* QmlNetworkAccessManagerFactory::create(QObject* parent) {
|
||||||
|
|
|
@ -33,6 +33,11 @@
|
||||||
#pragma clang diagnostic ignored "-Wpessimizing-move"
|
#pragma clang diagnostic ignored "-Wpessimizing-move"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <oglplus/gl.hpp>
|
#include <oglplus/gl.hpp>
|
||||||
|
|
||||||
#include <oglplus/all.hpp>
|
#include <oglplus/all.hpp>
|
||||||
|
@ -42,6 +47,10 @@
|
||||||
#include <oglplus/bound/renderbuffer.hpp>
|
#include <oglplus/bound/renderbuffer.hpp>
|
||||||
#include <oglplus/shapes/wrapper.hpp>
|
#include <oglplus/shapes/wrapper.hpp>
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#pragma warning(pop)
|
#pragma warning(pop)
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
|
|
|
@ -46,17 +46,18 @@ public:
|
||||||
~GLBackend();
|
~GLBackend();
|
||||||
|
|
||||||
void setCameraCorrection(const Mat4& correction);
|
void setCameraCorrection(const Mat4& correction);
|
||||||
void render(const Batch& batch) final;
|
void render(const Batch& batch) final override;
|
||||||
|
|
||||||
// This call synchronize the Full Backend cache with the current GLState
|
// This call synchronize the Full Backend cache with the current GLState
|
||||||
// THis is only intended to be used when mixing raw gl calls with the gpu api usage in order to sync
|
// THis is only intended to be used when mixing raw gl calls with the gpu api usage in order to sync
|
||||||
// the gpu::Backend state with the true gl state which has probably been messed up by these ugly naked gl calls
|
// the gpu::Backend state with the true gl state which has probably been messed up by these ugly naked gl calls
|
||||||
// Let's try to avoid to do that as much as possible!
|
// Let's try to avoid to do that as much as possible!
|
||||||
void syncCache() final;
|
void syncCache() final override;
|
||||||
|
|
||||||
// This is the ugly "download the pixels to sysmem for taking a snapshot"
|
// This is the ugly "download the pixels to sysmem for taking a snapshot"
|
||||||
// Just avoid using it, it's ugly and will break performances
|
// Just avoid using it, it's ugly and will break performances
|
||||||
virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer, const Vec4i& region, QImage& destImage) final;
|
virtual void downloadFramebuffer(const FramebufferPointer& srcFramebuffer,
|
||||||
|
const Vec4i& region, QImage& destImage) final override;
|
||||||
|
|
||||||
|
|
||||||
static const int MAX_NUM_ATTRIBUTES = Stream::NUM_INPUT_SLOTS;
|
static const int MAX_NUM_ATTRIBUTES = Stream::NUM_INPUT_SLOTS;
|
||||||
|
|
|
@ -5,7 +5,19 @@
|
||||||
// Distributed under the Apache License, Version 2.0.
|
// Distributed under the Apache License, Version 2.0.
|
||||||
// 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
|
||||||
//
|
//
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wsuggest-override"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "GLState.h"
|
#include "GLState.h"
|
||||||
|
|
||||||
|
#if defined(__GNUC__) && !defined(__clang__)
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#include "GLBackend.h"
|
#include "GLBackend.h"
|
||||||
|
|
||||||
using namespace gpu;
|
using namespace gpu;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
~Buffer();
|
~Buffer();
|
||||||
|
|
||||||
// The size in bytes of data stored in the buffer
|
// The size in bytes of data stored in the buffer
|
||||||
Size getSize() const;
|
Size getSize() const override;
|
||||||
template <typename T>
|
template <typename T>
|
||||||
Size getTypedSize() const { return getSize() / sizeof(T); };
|
Size getTypedSize() const { return getSize() / sizeof(T); };
|
||||||
|
|
||||||
|
|
|
@ -294,7 +294,7 @@ public:
|
||||||
Stamp getDataStamp() const { return _storage->getStamp(); }
|
Stamp getDataStamp() const { return _storage->getStamp(); }
|
||||||
|
|
||||||
// The theoretical size in bytes of data stored in the texture
|
// The theoretical size in bytes of data stored in the texture
|
||||||
Size getSize() const { return _size; }
|
Size getSize() const override { return _size; }
|
||||||
|
|
||||||
// The actual size in bytes of data stored in the texture
|
// The actual size in bytes of data stored in the texture
|
||||||
Size getStoredSize() const;
|
Size getStoredSize() const;
|
||||||
|
|
|
@ -140,7 +140,7 @@ protected:
|
||||||
friend class GeometryMappingResource;
|
friend class GeometryMappingResource;
|
||||||
|
|
||||||
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
||||||
const void* extra);
|
const void* extra) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
ModelCache();
|
ModelCache();
|
||||||
|
|
|
@ -282,7 +282,7 @@ public:
|
||||||
|
|
||||||
ImageReader(const QWeakPointer<Resource>& resource, const QByteArray& data, const QUrl& url = QUrl());
|
ImageReader(const QWeakPointer<Resource>& resource, const QByteArray& data, const QUrl& url = QUrl());
|
||||||
|
|
||||||
virtual void run();
|
virtual void run() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static void listSupportedImageFormats();
|
static void listSupportedImageFormats();
|
||||||
|
|
|
@ -127,19 +127,19 @@ public:
|
||||||
/// Loads a texture from the specified URL.
|
/// Loads a texture from the specified URL.
|
||||||
NetworkTexturePointer getTexture(const QUrl& url, Type type = Type::DEFAULT_TEXTURE,
|
NetworkTexturePointer getTexture(const QUrl& url, Type type = Type::DEFAULT_TEXTURE,
|
||||||
const QByteArray& content = QByteArray());
|
const QByteArray& content = QByteArray());
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// Overload ResourceCache::prefetch to allow specifying texture type for loads
|
// Overload ResourceCache::prefetch to allow specifying texture type for loads
|
||||||
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url, int type);
|
Q_INVOKABLE ScriptableResource* prefetch(const QUrl& url, int type);
|
||||||
|
|
||||||
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
virtual QSharedPointer<Resource> createResource(const QUrl& url, const QSharedPointer<Resource>& fallback,
|
||||||
const void* extra);
|
const void* extra) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
TextureCache();
|
TextureCache();
|
||||||
virtual ~TextureCache();
|
virtual ~TextureCache();
|
||||||
friend class DilatableNetworkTexture;
|
friend class DilatableNetworkTexture;
|
||||||
|
|
||||||
gpu::TexturePointer _permutationNormalTexture;
|
gpu::TexturePointer _permutationNormalTexture;
|
||||||
gpu::TexturePointer _whiteTexture;
|
gpu::TexturePointer _whiteTexture;
|
||||||
gpu::TexturePointer _grayTexture;
|
gpu::TexturePointer _grayTexture;
|
||||||
|
|
|
@ -31,7 +31,7 @@ private:
|
||||||
NLPacketList(const NLPacketList& other) = delete;
|
NLPacketList(const NLPacketList& other) = delete;
|
||||||
NLPacketList& operator=(const NLPacketList& other) = delete;
|
NLPacketList& operator=(const NLPacketList& other) = delete;
|
||||||
|
|
||||||
virtual std::unique_ptr<udt::Packet> createPacket();
|
virtual std::unique_ptr<udt::Packet> createPacket() override;
|
||||||
|
|
||||||
|
|
||||||
PacketVersion _packetVersion;
|
PacketVersion _packetVersion;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public:
|
||||||
static OAuthNetworkAccessManager* getInstance();
|
static OAuthNetworkAccessManager* getInstance();
|
||||||
protected:
|
protected:
|
||||||
OAuthNetworkAccessManager(QObject* parent = Q_NULLPTR) : NetworkAccessManager(parent) { }
|
OAuthNetworkAccessManager(QObject* parent = Q_NULLPTR) : NetworkAccessManager(parent) { }
|
||||||
virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest& req, QIODevice* outgoingData = 0);
|
virtual QNetworkReply* createRequest(Operation op, const QNetworkRequest& req, QIODevice* outgoingData = 0) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // hifi_OAuthNetworkAccessManager_h
|
#endif // hifi_OAuthNetworkAccessManager_h
|
||||||
|
|
|
@ -43,8 +43,8 @@ public:
|
||||||
void setPacketsPerSecond(int packetsPerSecond);
|
void setPacketsPerSecond(int packetsPerSecond);
|
||||||
int getPacketsPerSecond() const { return _packetsPerSecond; }
|
int getPacketsPerSecond() const { return _packetsPerSecond; }
|
||||||
|
|
||||||
virtual bool process();
|
virtual bool process() override;
|
||||||
virtual void terminating();
|
virtual void terminating() override;
|
||||||
|
|
||||||
/// are there packets waiting in the send queue to be sent
|
/// are there packets waiting in the send queue to be sent
|
||||||
bool hasPacketsToSend() const { return _packets.size() > 0; }
|
bool hasPacketsToSend() const { return _packets.size() > 0; }
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
float getIncomingPPS() const { return _incomingPPS.getAverage(); }
|
float getIncomingPPS() const { return _incomingPPS.getAverage(); }
|
||||||
float getProcessedPPS() const { return _processedPPS.getAverage(); }
|
float getProcessedPPS() const { return _processedPPS.getAverage(); }
|
||||||
|
|
||||||
virtual void terminating();
|
virtual void terminating() override;
|
||||||
|
|
||||||
public slots:
|
public slots:
|
||||||
void nodeKilled(SharedNodePointer node);
|
void nodeKilled(SharedNodePointer node);
|
||||||
|
@ -61,7 +61,7 @@ protected:
|
||||||
virtual void processPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode) = 0;
|
virtual void processPacket(QSharedPointer<ReceivedMessage> message, SharedNodePointer sendingNode) = 0;
|
||||||
|
|
||||||
/// Implements generic processing behavior for this thread.
|
/// Implements generic processing behavior for this thread.
|
||||||
virtual bool process();
|
virtual bool process() override;
|
||||||
|
|
||||||
/// Determines the timeout of the wait when there are no packets to process. Default value means no timeout
|
/// Determines the timeout of the wait when there are no packets to process. Default value means no timeout
|
||||||
virtual unsigned long getMaxWait() const { return ULONG_MAX; }
|
virtual unsigned long getMaxWait() const { return ULONG_MAX; }
|
||||||
|
|
|
@ -70,9 +70,9 @@ public:
|
||||||
|
|
||||||
// QIODevice virtual functions
|
// QIODevice virtual functions
|
||||||
// WARNING: Those methods all refer to the payload ONLY and NOT the entire packet
|
// WARNING: Those methods all refer to the payload ONLY and NOT the entire packet
|
||||||
virtual bool isSequential() const { return false; }
|
virtual bool isSequential() const override { return false; }
|
||||||
virtual bool reset();
|
virtual bool reset() override;
|
||||||
virtual qint64 size() const { return _payloadCapacity; }
|
virtual qint64 size() const override { return _payloadCapacity; }
|
||||||
|
|
||||||
using QIODevice::read; // Bring QIODevice::read methods to scope, otherwise they are hidden by folling method
|
using QIODevice::read; // Bring QIODevice::read methods to scope, otherwise they are hidden by folling method
|
||||||
QByteArray read(qint64 maxSize);
|
QByteArray read(qint64 maxSize);
|
||||||
|
@ -94,8 +94,8 @@ protected:
|
||||||
BasePacket& operator=(BasePacket&& other);
|
BasePacket& operator=(BasePacket&& other);
|
||||||
|
|
||||||
// QIODevice virtual functions
|
// QIODevice virtual functions
|
||||||
virtual qint64 writeData(const char* data, qint64 maxSize);
|
virtual qint64 writeData(const char* data, qint64 maxSize) override;
|
||||||
virtual qint64 readData(char* data, qint64 maxSize);
|
virtual qint64 readData(char* data, qint64 maxSize) override;
|
||||||
|
|
||||||
void adjustPayloadStartAndCapacity(qint64 headerSize, bool shouldDecreasePayloadSize = false);
|
void adjustPayloadStartAndCapacity(qint64 headerSize, bool shouldDecreasePayloadSize = false);
|
||||||
|
|
||||||
|
|
|
@ -94,7 +94,7 @@ public:
|
||||||
template <class T> class CongestionControlFactory: public CongestionControlVirtualFactory {
|
template <class T> class CongestionControlFactory: public CongestionControlVirtualFactory {
|
||||||
public:
|
public:
|
||||||
virtual ~CongestionControlFactory() {}
|
virtual ~CongestionControlFactory() {}
|
||||||
virtual std::unique_ptr<CongestionControl> create() { return std::unique_ptr<T>(new T()); }
|
virtual std::unique_ptr<CongestionControl> create() override { return std::unique_ptr<T>(new T()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class DefaultCC: public CongestionControl {
|
class DefaultCC: public CongestionControl {
|
||||||
|
@ -102,12 +102,12 @@ public:
|
||||||
DefaultCC();
|
DefaultCC();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual void onACK(SequenceNumber ackNum);
|
virtual void onACK(SequenceNumber ackNum) override;
|
||||||
virtual void onLoss(SequenceNumber rangeStart, SequenceNumber rangeEnd);
|
virtual void onLoss(SequenceNumber rangeStart, SequenceNumber rangeEnd) override;
|
||||||
virtual void onTimeout();
|
virtual void onTimeout() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void setInitialSendSequenceNumber(SequenceNumber seqNum);
|
virtual void setInitialSendSequenceNumber(SequenceNumber seqNum) override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void stopSlowStart(); // stops the slow start on loss or timeout
|
void stopSlowStart(); // stops the slow start on loss or timeout
|
||||||
|
|
|
@ -54,8 +54,8 @@ public:
|
||||||
void closeCurrentPacket(bool shouldSendEmpty = false);
|
void closeCurrentPacket(bool shouldSendEmpty = false);
|
||||||
|
|
||||||
// QIODevice virtual functions
|
// QIODevice virtual functions
|
||||||
virtual bool isSequential() const { return false; }
|
virtual bool isSequential() const override { return false; }
|
||||||
virtual qint64 size() const { return getDataSize(); }
|
virtual qint64 size() const override { return getDataSize(); }
|
||||||
|
|
||||||
template<typename T> qint64 readPrimitive(T* data);
|
template<typename T> qint64 readPrimitive(T* data);
|
||||||
template<typename T> qint64 writePrimitive(const T& data);
|
template<typename T> qint64 writePrimitive(const T& data);
|
||||||
|
@ -68,9 +68,9 @@ protected:
|
||||||
|
|
||||||
void preparePackets(MessageNumber messageNumber);
|
void preparePackets(MessageNumber messageNumber);
|
||||||
|
|
||||||
virtual qint64 writeData(const char* data, qint64 maxSize);
|
virtual qint64 writeData(const char* data, qint64 maxSize) override;
|
||||||
// Not implemented, added an assert so that it doesn't get used by accident
|
// Not implemented, added an assert so that it doesn't get used by accident
|
||||||
virtual qint64 readData(char* data, qint64 maxSize) { Q_ASSERT(false); return 0; }
|
virtual qint64 readData(char* data, qint64 maxSize) override { Q_ASSERT(false); return 0; }
|
||||||
|
|
||||||
PacketType _packetType;
|
PacketType _packetType;
|
||||||
std::list<std::unique_ptr<Packet>> _packets;
|
std::list<std::unique_ptr<Packet>> _packets;
|
||||||
|
|
|
@ -20,8 +20,8 @@ public:
|
||||||
|
|
||||||
~DirtyOctreeElementOperator() {}
|
~DirtyOctreeElementOperator() {}
|
||||||
|
|
||||||
virtual bool preRecursion(OctreeElementPointer element);
|
virtual bool preRecursion(OctreeElementPointer element) override;
|
||||||
virtual bool postRecursion(OctreeElementPointer element);
|
virtual bool postRecursion(OctreeElementPointer element) override;
|
||||||
private:
|
private:
|
||||||
glm::vec3 _point;
|
glm::vec3 _point;
|
||||||
OctreeElementPointer _element;
|
OctreeElementPointer _element;
|
||||||
|
|
|
@ -58,7 +58,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// if you're running in non-threaded mode, you must call this method regularly
|
/// if you're running in non-threaded mode, you must call this method regularly
|
||||||
virtual bool process();
|
virtual bool process() override;
|
||||||
|
|
||||||
/// Set the desired number of pending messages that the OctreeEditPacketSender should attempt to queue even if
|
/// Set the desired number of pending messages that the OctreeEditPacketSender should attempt to queue even if
|
||||||
/// servers are not present. This only applies to how the OctreeEditPacketSender will manage messages when no
|
/// servers are not present. This only applies to how the OctreeEditPacketSender will manage messages when no
|
||||||
|
|
|
@ -51,7 +51,7 @@ signals:
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
/// Implements generic processing behavior for this thread.
|
/// Implements generic processing behavior for this thread.
|
||||||
virtual bool process();
|
virtual bool process() override;
|
||||||
|
|
||||||
void persist();
|
void persist();
|
||||||
void backup();
|
void backup();
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue