mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 18:54:02 +02:00
Fix AABox bounds handling in Overlays
This commit is contained in:
parent
b21d0a3a53
commit
0e5cf273ab
5 changed files with 7 additions and 14 deletions
|
@ -225,8 +225,3 @@ float Overlay::updatePulse() {
|
|||
|
||||
return _pulse;
|
||||
}
|
||||
|
||||
AABox Overlay::getBounds() const {
|
||||
return AABox();
|
||||
}
|
||||
|
||||
|
|
|
@ -57,9 +57,6 @@ public:
|
|||
float getGlowLevel();
|
||||
Anchor getAnchor() const { return _anchor; }
|
||||
|
||||
virtual AABox getBounds() const = 0;
|
||||
|
||||
|
||||
float getPulseMax() const { return _pulseMax; }
|
||||
float getPulseMin() const { return _pulseMin; }
|
||||
float getPulsePeriod() const { return _pulsePeriod; }
|
||||
|
|
|
@ -28,10 +28,6 @@ Overlay2D::Overlay2D(const Overlay2D* overlay2D) :
|
|||
Overlay2D::~Overlay2D() {
|
||||
}
|
||||
|
||||
AABox Overlay2D::getBounds() const {
|
||||
return AABox(glm::vec3(_bounds.x, _bounds.y, 0.0f), glm::vec3(_bounds.width, _bounds.height, 0.1f));
|
||||
}
|
||||
|
||||
void Overlay2D::setProperties(const QScriptValue& properties) {
|
||||
Overlay::setProperties(properties);
|
||||
|
||||
|
|
|
@ -38,7 +38,6 @@ public:
|
|||
int getWidth() const { return _bounds.width(); }
|
||||
int getHeight() const { return _bounds.height(); }
|
||||
const QRect& getBounds() const { return _bounds; }
|
||||
virtual AABox getBounds() const;
|
||||
|
||||
// setters
|
||||
void setX(int x) { _bounds.setX(x); }
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
#include <Application.h>
|
||||
#include <avatar/AvatarManager.h>
|
||||
#include <LODManager.h>
|
||||
#include <render/Scene.h>
|
||||
|
||||
#include "BillboardOverlay.h"
|
||||
#include "Circle3DOverlay.h"
|
||||
|
@ -45,7 +46,12 @@ namespace render {
|
|||
}
|
||||
}
|
||||
template <> const Item::Bound payloadGetBound(const Overlay::Pointer& overlay) {
|
||||
return static_cast<Overlay*>(overlay.get())->getBounds();
|
||||
if (overlay->is3D()) {
|
||||
return static_cast<Base3DOverlay*>(overlay.get())->getBounds();
|
||||
} else {
|
||||
QRect bounds = static_cast<Overlay2D*>(overlay.get())->getBounds();
|
||||
return AABox(glm::vec3(bounds.x(), bounds.y(), 0.0f), glm::vec3(bounds.width(), bounds.height(), 0.1f));
|
||||
}
|
||||
}
|
||||
template <> void payloadRender(const Overlay::Pointer& overlay, RenderArgs* args) {
|
||||
if (args) {
|
||||
|
|
Loading…
Reference in a new issue