mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
commit
49a7852d76
15 changed files with 71 additions and 75 deletions
|
@ -50,10 +50,10 @@ public:
|
|||
|
||||
virtual void entityCreated(const EntityItem& newEntity, const SharedNodePointer& senderNode) override;
|
||||
virtual void readAdditionalConfiguration(const QJsonObject& settingsSectionObject) override;
|
||||
virtual QString serverSubclassStats();
|
||||
virtual QString serverSubclassStats() override;
|
||||
|
||||
virtual void trackSend(const QUuid& dataID, quint64 dataLastEdited, const QUuid& viewerNode);
|
||||
virtual void trackViewerGone(const QUuid& viewerNode);
|
||||
virtual void trackSend(const QUuid& dataID, quint64 dataLastEdited, const QUuid& viewerNode) override;
|
||||
virtual void trackViewerGone(const QUuid& viewerNode) override;
|
||||
|
||||
public slots:
|
||||
void pruneDeletedEntities();
|
||||
|
|
|
@ -533,15 +533,13 @@ bool Overlays::isLoaded(unsigned int id) {
|
|||
QSizeF Overlays::textSize(unsigned int id, const QString& text) const {
|
||||
Overlay::Pointer thisOverlay = _overlaysHUD[id];
|
||||
if (thisOverlay) {
|
||||
if (typeid(*thisOverlay) == typeid(TextOverlay)) {
|
||||
return std::dynamic_pointer_cast<TextOverlay>(thisOverlay)->textSize(text);
|
||||
if (auto textOverlay = std::dynamic_pointer_cast<TextOverlay>(thisOverlay)) {
|
||||
return textOverlay->textSize(text);
|
||||
}
|
||||
} else {
|
||||
thisOverlay = _overlaysWorld[id];
|
||||
if (thisOverlay) {
|
||||
if (typeid(*thisOverlay) == typeid(Text3DOverlay)) {
|
||||
return std::dynamic_pointer_cast<Text3DOverlay>(thisOverlay)->textSize(text);
|
||||
}
|
||||
if (auto text3dOverlay = std::dynamic_pointer_cast<Text3DOverlay>(thisOverlay)) {
|
||||
return text3dOverlay->textSize(text);
|
||||
}
|
||||
}
|
||||
return QSizeF(0.0f, 0.0f);
|
||||
|
|
|
@ -1324,64 +1324,64 @@ static int scaleDelay(float delay, float sampleRate) {
|
|||
// input clamped to [0.0f, 100.0f]
|
||||
//
|
||||
static const float earlyMix0Table[][2] = {
|
||||
0.0000f, 0.6000f,
|
||||
63.3333f, 0.0800f,
|
||||
83.3333f, 0.0200f,
|
||||
93.3333f, 0.0048f,
|
||||
100.0000f, 0.0048f,
|
||||
{0.0000f, 0.6000f},
|
||||
{63.3333f, 0.0800f},
|
||||
{83.3333f, 0.0200f},
|
||||
{93.3333f, 0.0048f},
|
||||
{100.0000f, 0.0048f},
|
||||
};
|
||||
|
||||
static const float earlyMix1Table[][2] = {
|
||||
0.0000f, 0.3360f,
|
||||
20.0000f, 0.6000f,
|
||||
100.0000f, 0.0240f,
|
||||
{0.0000f, 0.3360f},
|
||||
{20.0000f, 0.6000f},
|
||||
{100.0000f, 0.0240f},
|
||||
};
|
||||
|
||||
static const float earlyMix2Table[][2] = {
|
||||
0.0000f, 0.0480f,
|
||||
13.3333f, 0.0960f,
|
||||
53.3333f, 0.9600f,
|
||||
100.0000f, 0.1200f,
|
||||
{0.0000f, 0.0480f},
|
||||
{13.3333f, 0.0960f},
|
||||
{53.3333f, 0.9600f},
|
||||
{100.0000f, 0.1200f},
|
||||
};
|
||||
|
||||
static const float lateMix0Table[][2] = {
|
||||
0.0000f, 0.1250f,
|
||||
13.3333f, 0.1875f,
|
||||
66.6666f, 0.7500f,
|
||||
100.0000f, 0.8750f,
|
||||
{0.0000f, 0.1250f},
|
||||
{13.3333f, 0.1875f},
|
||||
{66.6666f, 0.7500f},
|
||||
{100.0000f, 0.8750f},
|
||||
};
|
||||
|
||||
static const float lateMix1Table[][2] = {
|
||||
0.0000f, 0.9990f,
|
||||
33.3333f, 0.5000f,
|
||||
66.6666f, 0.9990f,
|
||||
93.3333f, 0.6000f,
|
||||
100.0000f, 0.6000f,
|
||||
{0.0000f, 0.9990f},
|
||||
{33.3333f, 0.5000f},
|
||||
{66.6666f, 0.9990f},
|
||||
{93.3333f, 0.6000f},
|
||||
{100.0000f, 0.6000f},
|
||||
};
|
||||
|
||||
static const float lateMix2Table[][2] = {
|
||||
0.0000f, 0.9990f,
|
||||
33.3333f, 0.9990f,
|
||||
63.3333f, 0.4500f,
|
||||
100.0000f, 0.9990f,
|
||||
{0.0000f, 0.9990f},
|
||||
{33.3333f, 0.9990f},
|
||||
{63.3333f, 0.4500f},
|
||||
{100.0000f, 0.9990f},
|
||||
};
|
||||
|
||||
static const float diffusionCoefTable[][2] = {
|
||||
0.0000f, 0.0000f,
|
||||
20.0000f, 0.0470f,
|
||||
33.3333f, 0.0938f,
|
||||
46.6666f, 0.1563f,
|
||||
60.0000f, 0.2344f,
|
||||
73.3333f, 0.3125f,
|
||||
93.3333f, 0.5000f,
|
||||
100.0000f, PHI,
|
||||
{0.0000f, 0.0000f},
|
||||
{20.0000f, 0.0470f},
|
||||
{33.3333f, 0.0938f},
|
||||
{46.6666f, 0.1563f},
|
||||
{60.0000f, 0.2344f},
|
||||
{73.3333f, 0.3125f},
|
||||
{93.3333f, 0.5000f},
|
||||
{100.0000f, PHI},
|
||||
};
|
||||
|
||||
static const float roomSizeTable[][2] = {
|
||||
0.0000f, 0.1500f,
|
||||
25.0000f, 0.3000f,
|
||||
50.0000f, 0.5000f,
|
||||
100.0000f, 1.0000f,
|
||||
{0.0000f, 0.1500f},
|
||||
{25.0000f, 0.3000f},
|
||||
{50.0000f, 0.5000f},
|
||||
{100.0000f, 1.0000f},
|
||||
};
|
||||
|
||||
static float interpolateTable(const float table[][2], float x) {
|
||||
|
|
|
@ -23,10 +23,10 @@ class ActionEndpoint : public Endpoint {
|
|||
public:
|
||||
ActionEndpoint(const Input& id = Input::INVALID_INPUT) : Endpoint(id) { }
|
||||
|
||||
virtual float peek() const { return _currentValue; }
|
||||
virtual float peek() const override { return _currentValue; }
|
||||
virtual void apply(float newValue, const Pointer& source) override;
|
||||
|
||||
virtual Pose peekPose() const { return _currentPose; }
|
||||
virtual Pose peekPose() const override { return _currentPose; }
|
||||
virtual void apply(const Pose& value, const Pointer& source) override;
|
||||
|
||||
virtual void reset() override;
|
||||
|
|
|
@ -28,9 +28,9 @@ public:
|
|||
virtual Pose pose() override;
|
||||
virtual void apply(const Pose& value, const Pointer& source) override { }
|
||||
|
||||
virtual bool writeable() const { return false; }
|
||||
virtual bool readable() const { return !_read; }
|
||||
virtual void reset() { _read = false; }
|
||||
virtual bool writeable() const override { return false; }
|
||||
virtual bool readable() const override { return !_read; }
|
||||
virtual void reset() override { _read = false; }
|
||||
|
||||
private:
|
||||
bool _read { false };
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
|
||||
virtual float apply(float value) const override;
|
||||
|
||||
virtual bool parseParameters(const QJsonValue& parameters);
|
||||
virtual bool parseParameters(const QJsonValue& parameters) override;
|
||||
|
||||
private:
|
||||
static const float DEFAULT_LAST_EMIT_TIME;
|
||||
|
|
|
@ -23,7 +23,7 @@ public:
|
|||
virtual float apply(float value) const override {
|
||||
return value * _scale;
|
||||
}
|
||||
virtual bool parseParameters(const QJsonValue& parameters);
|
||||
virtual bool parseParameters(const QJsonValue& parameters) override;
|
||||
|
||||
private:
|
||||
float _scale = 1.0f;
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
// See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
//
|
||||
#include "OpenGLDisplayPlugin.h"
|
||||
#include <QOpenGLContext>
|
||||
#include <QCoreApplication>
|
||||
|
||||
#include <gl/Config.h>
|
||||
|
|
|
@ -8,7 +8,6 @@
|
|||
#include "WindowOpenGLDisplayPlugin.h"
|
||||
|
||||
#include <QGLWidget>
|
||||
#include <QOpenGLContext>
|
||||
|
||||
#include "plugins/PluginContainer.h"
|
||||
|
||||
|
|
|
@ -30,42 +30,42 @@ public:
|
|||
|
||||
virtual void setDimensions(const glm::vec3& value) override;
|
||||
|
||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const;
|
||||
virtual bool setProperties(const EntityItemProperties& properties);
|
||||
virtual EntityItemProperties getProperties(EntityPropertyFlags desiredProperties = EntityPropertyFlags()) const override;
|
||||
virtual bool setProperties(const EntityItemProperties& properties) override;
|
||||
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
|
||||
ReadBitstreamToTreeParams& args,
|
||||
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
|
||||
bool& somethingChanged);
|
||||
bool& somethingChanged) override;
|
||||
|
||||
virtual void somethingChangedNotification() {
|
||||
virtual void somethingChangedNotification() override {
|
||||
// FIX ME: this is overly aggressive. We only really need to simulate() if something about
|
||||
// the world space transform has changed and/or if some animation is occurring.
|
||||
_needsInitialSimulation = true;
|
||||
}
|
||||
|
||||
virtual bool readyToAddToScene(RenderArgs* renderArgs = nullptr);
|
||||
virtual bool addToScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges);
|
||||
virtual void removeFromScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges);
|
||||
virtual bool addToScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
|
||||
virtual void removeFromScene(EntityItemPointer self, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
|
||||
|
||||
|
||||
virtual void render(RenderArgs* args);
|
||||
virtual bool supportsDetailedRayIntersection() const { return true; }
|
||||
virtual void render(RenderArgs* args) override;
|
||||
virtual bool supportsDetailedRayIntersection() const override { return true; }
|
||||
virtual bool findDetailedRayIntersection(const glm::vec3& origin, const glm::vec3& direction,
|
||||
bool& keepSearching, OctreeElementPointer& element, float& distance,
|
||||
BoxFace& face, glm::vec3& surfaceNormal,
|
||||
void** intersectedObject, bool precisionPicking) const;
|
||||
void** intersectedObject, bool precisionPicking) const override;
|
||||
|
||||
Model* getModel(EntityTreeRenderer* renderer);
|
||||
|
||||
virtual bool needsToCallUpdate() const;
|
||||
virtual void update(const quint64& now);
|
||||
virtual bool needsToCallUpdate() const override;
|
||||
virtual void update(const quint64& now) override;
|
||||
|
||||
virtual void setCompoundShapeURL(const QString& url);
|
||||
virtual void setCompoundShapeURL(const QString& url) override;
|
||||
|
||||
bool isReadyToComputeShape();
|
||||
void computeShapeInfo(ShapeInfo& info);
|
||||
virtual bool isReadyToComputeShape() override;
|
||||
virtual void computeShapeInfo(ShapeInfo& info) override;
|
||||
|
||||
virtual bool contains(const glm::vec3& point) const;
|
||||
virtual bool contains(const glm::vec3& point) const override;
|
||||
|
||||
private:
|
||||
void remapTextures();
|
||||
|
|
|
@ -11,6 +11,8 @@
|
|||
#ifndef hifi_gpu_GLBackend_Shared_h
|
||||
#define hifi_gpu_GLBackend_Shared_h
|
||||
|
||||
#include <gl/Config.h>
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include "GPULogging.h"
|
||||
|
|
|
@ -32,7 +32,7 @@ public:
|
|||
return _frames.size();
|
||||
}
|
||||
|
||||
Clip::Pointer duplicate() const {
|
||||
virtual Clip::Pointer duplicate() const override {
|
||||
auto result = newClip();
|
||||
Locker lock(_mutex);
|
||||
for (size_t i = 0; i < _frames.size(); ++i) {
|
||||
|
@ -41,7 +41,7 @@ public:
|
|||
return result;
|
||||
}
|
||||
|
||||
virtual void seekFrameTime(Frame::Time offset) {
|
||||
virtual void seekFrameTime(Frame::Time offset) override {
|
||||
Locker lock(_mutex);
|
||||
auto itr = std::lower_bound(_frames.begin(), _frames.end(), offset,
|
||||
[](const T& a, Frame::Time b)->bool {
|
||||
|
|
|
@ -45,7 +45,7 @@ public:
|
|||
// FIXME move to frame?
|
||||
static const qint64 MINIMUM_FRAME_SIZE = sizeof(FrameType) + sizeof(Frame::Time) + sizeof(FrameSize);
|
||||
protected:
|
||||
void reset();
|
||||
void reset() override;
|
||||
virtual FrameConstPointer readFrame(size_t index) const override;
|
||||
QJsonDocument _header;
|
||||
uchar* _data { nullptr };
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
#ifndef hifi_FboCache_h
|
||||
#define hifi_FboCache_h
|
||||
|
||||
#include <QOpenGLContext>
|
||||
#include <QOffscreenSurface>
|
||||
#include <QQueue>
|
||||
#include <QMap>
|
||||
|
|
|
@ -14,7 +14,6 @@
|
|||
#include <GLMHelpers.h>
|
||||
#include <QEvent>
|
||||
#include <QtGui/QResizeEvent>
|
||||
#include <QtGui/QOpenGLContext>
|
||||
#include <QtGui/QGuiApplication>
|
||||
#include <QtGui/QScreen>
|
||||
|
||||
|
|
Loading…
Reference in a new issue