Annotate all virtual fns with override

This commit is contained in:
Zach Pomerantz 2016-04-30 13:48:59 -07:00
parent 5dadfa9e7e
commit 13945aa4d9
22 changed files with 70 additions and 70 deletions

View file

@ -78,11 +78,11 @@ private:
void simulateAvatarFades(float deltaTime);
// virtual overrides
virtual AvatarSharedPointer newSharedAvatar();
virtual AvatarSharedPointer addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer);
virtual AvatarSharedPointer newSharedAvatar() override;
virtual AvatarSharedPointer addAvatar(const QUuid& sessionUUID, const QWeakPointer<Node>& mixerWeakPointer) override;
virtual void removeAvatar(const QUuid& sessionUUID);
virtual void handleRemovedAvatar(const AvatarSharedPointer& removedAvatar);
virtual void removeAvatar(const QUuid& sessionUUID) override;
virtual void handleRemovedAvatar(const AvatarSharedPointer& removedAvatar) override;
QVector<AvatarSharedPointer> _avatarFades;
std::shared_ptr<MyAvatar> _myAvatar;

View file

@ -23,7 +23,7 @@ public:
Base3DOverlay(const Base3DOverlay* base3DOverlay);
// getters
virtual bool is3D() const { return true; }
virtual bool is3D() const override { return true; }
const glm::vec3& getPosition() const { return _transform.getTranslation(); }
const glm::quat& getRotation() const { return _transform.getRotation(); }
const glm::vec3& getScale() const { return _transform.getScale(); }
@ -50,7 +50,7 @@ public:
void setIgnoreRayIntersection(bool value) { _ignoreRayIntersection = value; }
void setDrawInFront(bool value) { _drawInFront = value; }
virtual AABox getBounds() const = 0;
virtual AABox getBounds() const override = 0;
void setProperties(const QVariantMap& properties) override;
QVariant getProperty(const QString& property) override;

View file

@ -27,7 +27,7 @@ public:
QVariant getProperty(const QString& property) override;
protected:
virtual void applyTransformTo(Transform& transform, bool force = false);
virtual void applyTransformTo(Transform& transform, bool force = false) override;
};
#endif // hifi_Billboard3DOverlay_h

View file

@ -19,12 +19,12 @@ class Circle3DOverlay : public Planar3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Circle3DOverlay();
Circle3DOverlay(const Circle3DOverlay* circle3DOverlay);
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
void setProperties(const QVariantMap& properties) override;
QVariant getProperty(const QString& property) override;
@ -54,9 +54,9 @@ public:
void setMinorTickMarksColor(const xColor& value) { _minorTickMarksColor = value; }
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
virtual Circle3DOverlay* createClone() const;
virtual Circle3DOverlay* createClone() const override;
protected:
float _startAt;

View file

@ -18,15 +18,15 @@ class Cube3DOverlay : public Volume3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Cube3DOverlay() {}
Cube3DOverlay(const Cube3DOverlay* cube3DOverlay);
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
virtual Cube3DOverlay* createClone() const;
virtual Cube3DOverlay* createClone() const override;
float getBorderSize() const { return _borderSize; }

View file

@ -19,22 +19,22 @@ class Grid3DOverlay : public Planar3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Grid3DOverlay();
Grid3DOverlay(const Grid3DOverlay* grid3DOverlay);
virtual AABox getBounds() const;
virtual AABox getBounds() const override;
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
void setProperties(const QVariantMap& properties) override;
QVariant getProperty(const QString& property) override;
virtual Grid3DOverlay* createClone() const;
virtual Grid3DOverlay* createClone() const override;
// Grids are UI tools, and may not be intersected (pickable)
virtual bool findRayIntersection(const glm::vec3&, const glm::vec3&, float&, BoxFace&, glm::vec3&) { return false; }
virtual bool findRayIntersection(const glm::vec3&, const glm::vec3&, float&, BoxFace&, glm::vec3&) override { return false; }
private:
void updateGrid();

View file

@ -22,14 +22,14 @@ class Image3DOverlay : public Billboard3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Image3DOverlay();
Image3DOverlay(const Image3DOverlay* image3DOverlay);
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual void update(float deltatime);
virtual void update(float deltatime) override;
virtual const render::ShapeKey getShapeKey() override;
@ -41,9 +41,9 @@ public:
QVariant getProperty(const QString& property) override;
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
virtual Image3DOverlay* createClone() const;
virtual Image3DOverlay* createClone() const override;
private:
QString _url;

View file

@ -18,14 +18,14 @@ class Line3DOverlay : public Base3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Line3DOverlay();
Line3DOverlay(const Line3DOverlay* line3DOverlay);
~Line3DOverlay();
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
virtual AABox getBounds() const;
virtual AABox getBounds() const override;
// getters
const glm::vec3& getStart() const { return _start; }
@ -38,7 +38,7 @@ public:
void setProperties(const QVariantMap& properties) override;
QVariant getProperty(const QString& property) override;
virtual Line3DOverlay* createClone() const;
virtual Line3DOverlay* createClone() const override;
protected:
glm::vec3 _start;

View file

@ -20,24 +20,24 @@ class ModelOverlay : public Volume3DOverlay {
Q_OBJECT
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
ModelOverlay();
ModelOverlay(const ModelOverlay* modelOverlay);
virtual void update(float deltatime);
virtual void render(RenderArgs* args);
virtual void update(float deltatime) override;
virtual void render(RenderArgs* args) override;
void setProperties(const QVariantMap& properties) override;
QVariant getProperty(const QString& property) override;
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
virtual bool findRayIntersectionExtraInfo(const glm::vec3& origin, const glm::vec3& direction,
float& distance, BoxFace& face, glm::vec3& surfaceNormal, QString& extraInfo);
BoxFace& face, glm::vec3& surfaceNormal) override;
virtual bool findRayIntersectionExtraInfo(const glm::vec3& origin, const glm::vec3& direction,
float& distance, BoxFace& face, glm::vec3& surfaceNormal, QString& extraInfo) override;
virtual ModelOverlay* createClone() const;
virtual ModelOverlay* createClone() const override;
virtual bool addToScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges);
virtual void removeFromScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges);
virtual bool addToScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
virtual void removeFromScene(Overlay::Pointer overlay, std::shared_ptr<render::Scene> scene, render::PendingChanges& pendingChanges) override;
private:

View file

@ -22,9 +22,9 @@ public:
Overlay2D() {}
Overlay2D(const Overlay2D* overlay2D);
virtual AABox getBounds() const;
virtual AABox getBounds() const override;
virtual bool is3D() const { return false; }
virtual bool is3D() const override { return false; }
// getters
int getX() const { return _bounds.x(); }

View file

@ -20,7 +20,7 @@ public:
Planar3DOverlay();
Planar3DOverlay(const Planar3DOverlay* planar3DOverlay);
virtual AABox getBounds() const;
virtual AABox getBounds() const override;
glm::vec2 getDimensions() const { return _dimensions; }
void setDimensions(float value) { _dimensions = glm::vec2(value); }
@ -30,7 +30,7 @@ public:
QVariant getProperty(const QString& property) override;
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
protected:
glm::vec2 _dimensions;

View file

@ -18,16 +18,16 @@ class Rectangle3DOverlay : public Planar3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Rectangle3DOverlay();
Rectangle3DOverlay(const Rectangle3DOverlay* rectangle3DOverlay);
~Rectangle3DOverlay();
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
void setProperties(const QVariantMap& properties) override;
virtual Rectangle3DOverlay* createClone() const;
virtual Rectangle3DOverlay* createClone() const override;
private:
int _geometryCacheID;
glm::vec2 _previousHalfDimensions;

View file

@ -18,15 +18,15 @@ class Sphere3DOverlay : public Volume3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Sphere3DOverlay() {}
Sphere3DOverlay(const Sphere3DOverlay* Sphere3DOverlay);
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
virtual Sphere3DOverlay* createClone() const;
virtual Sphere3DOverlay* createClone() const override;
};

View file

@ -22,14 +22,14 @@ class Text3DOverlay : public Billboard3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Text3DOverlay();
Text3DOverlay(const Text3DOverlay* text3DOverlay);
~Text3DOverlay();
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual void update(float deltatime);
virtual void update(float deltatime) override;
virtual const render::ShapeKey getShapeKey() override;
@ -59,9 +59,9 @@ public:
QSizeF textSize(const QString& test) const; // Meters
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
virtual Text3DOverlay* createClone() const;
virtual Text3DOverlay* createClone() const override;
private:
TextRenderer3D* _textRenderer = nullptr;

View file

@ -20,7 +20,7 @@ public:
Volume3DOverlay() {}
Volume3DOverlay(const Volume3DOverlay* volume3DOverlay);
virtual AABox getBounds() const;
virtual AABox getBounds() const override;
const glm::vec3& getDimensions() const { return _localBoundingBox.getDimensions(); }
void setDimensions(float value) { _localBoundingBox.setBox(glm::vec3(-value / 2.0f), value); }
@ -30,7 +30,7 @@ public:
QVariant getProperty(const QString& property) override;
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
protected:
// Centered local bounding box

View file

@ -18,16 +18,16 @@ class Web3DOverlay : public Billboard3DOverlay {
public:
static QString const TYPE;
virtual QString getType() const { return TYPE; }
virtual QString getType() const override { return TYPE; }
Web3DOverlay();
Web3DOverlay(const Web3DOverlay* Web3DOverlay);
virtual ~Web3DOverlay();
virtual void render(RenderArgs* args);
virtual void render(RenderArgs* args) override;
virtual const render::ShapeKey getShapeKey() override;
virtual void update(float deltatime);
virtual void update(float deltatime) override;
// setters
void setURL(const QString& url);
@ -36,9 +36,9 @@ public:
QVariant getProperty(const QString& property) override;
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
BoxFace& face, glm::vec3& surfaceNormal);
BoxFace& face, glm::vec3& surfaceNormal) override;
virtual Web3DOverlay* createClone() const;
virtual Web3DOverlay* createClone() const override;
private:
OffscreenQmlSurface* _webSurface{ nullptr };

View file

@ -33,7 +33,7 @@ public:
QObject* getEventHandler();
void update(const quint64& now) override;
bool needsToCallUpdate() const { return _webSurface != nullptr; }
bool needsToCallUpdate() const override { return _webSurface != nullptr; }
SIMPLE_RENDERABLE();

View file

@ -27,19 +27,19 @@ public:
_needsInitialSimulation(true)
{ }
virtual bool setProperties(const EntityItemProperties& properties);
virtual bool setProperties(const EntityItemProperties& properties) override;
virtual void somethingChangedNotification() override;
virtual int readEntitySubclassDataFromBuffer(const unsigned char* data, int bytesLeftToRead,
ReadBitstreamToTreeParams& args,
EntityPropertyFlags& propertyFlags, bool overwriteLocalData,
bool& somethingChanged);
bool& somethingChanged) override;
virtual void render(RenderArgs* args);
virtual bool contains(const glm::vec3& point) const;
virtual void render(RenderArgs* args) override;
virtual bool contains(const glm::vec3& point) const override;
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;
private:
virtual void locationChanged(bool tellPhysics = true) override { EntityItem::locationChanged(tellPhysics); notifyBoundChanged(); }

View file

@ -361,7 +361,7 @@ public:
void setPhysicsInfo(void* data) { _physicsInfo = data; }
EntityTreeElementPointer getElement() const { return _element; }
EntityTreePointer getTree() const;
virtual SpatialParentTree* getParentTree() const;
virtual SpatialParentTree* getParentTree() const override;
bool wantTerseEditLogging() const;
glm::mat4 getEntityToWorldMatrix() const;

View file

@ -127,7 +127,7 @@ public:
EntityItemPointer findClosestEntity(glm::vec3 position, float targetRadius);
EntityItemPointer findEntityByID(const QUuid& id);
EntityItemPointer findEntityByEntityItemID(const EntityItemID& entityID);
virtual SpatiallyNestablePointer findByID(const QUuid& id) { return findEntityByID(id); }
virtual SpatiallyNestablePointer findByID(const QUuid& id) override { return findEntityByID(id); }
EntityItemID assignEntityID(const EntityItemID& entityItemID); /// Assigns a known ID for a creator token ID

View file

@ -98,7 +98,7 @@ public:
GeometryResource(const QUrl& url, const QUrl& textureBaseUrl = QUrl()) :
Resource(url), _textureBaseUrl(textureBaseUrl) {}
virtual bool areTexturesLoaded() const { return isLoaded() && Geometry::areTexturesLoaded(); }
virtual bool areTexturesLoaded() const override { return isLoaded() && Geometry::areTexturesLoaded(); }
virtual void deleter() override;

View file

@ -26,7 +26,7 @@ public:
virtual void clear() override;
virtual void render(gpu::Batch& batch, const ViewFrustum& frustum) const;
virtual void render(gpu::Batch& batch, const ViewFrustum& frustum) const override;
static void render(gpu::Batch& batch, const ViewFrustum& frustum, const ProceduralSkybox& skybox);
protected: