mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
works now
This commit is contained in:
parent
bb370caccc
commit
a5b94f22fa
4 changed files with 8 additions and 3 deletions
|
@ -56,7 +56,7 @@ public:
|
||||||
virtual void setDrawInFront(bool value) { _drawInFront = value; }
|
virtual void setDrawInFront(bool value) { _drawInFront = value; }
|
||||||
virtual void setDrawHUDLayer(bool value) { _drawHUDLayer = value; }
|
virtual void setDrawHUDLayer(bool value) { _drawHUDLayer = value; }
|
||||||
void setIsGrabbable(bool value) { _isGrabbable = value; }
|
void setIsGrabbable(bool value) { _isGrabbable = value; }
|
||||||
void setIsVisibleInSecondaryCamera(bool value) { _isVisibleInSecondaryCamera = value; }
|
virtual void setIsVisibleInSecondaryCamera(bool value) { _isVisibleInSecondaryCamera = value; }
|
||||||
|
|
||||||
virtual AABox getBounds() const override = 0;
|
virtual AABox getBounds() const override = 0;
|
||||||
|
|
||||||
|
|
|
@ -92,7 +92,7 @@ void ModelOverlay::update(float deltatime) {
|
||||||
// don't show overlays in mirrors or spectator-cam unless _isVisibleInSecondaryCamera is true
|
// don't show overlays in mirrors or spectator-cam unless _isVisibleInSecondaryCamera is true
|
||||||
_model->setVisibleInScene(getVisible(), scene,
|
_model->setVisibleInScene(getVisible(), scene,
|
||||||
render::ItemKey::TAG_BITS_0 |
|
render::ItemKey::TAG_BITS_0 |
|
||||||
_isVisibleInSecondaryCamera ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE,
|
(_isVisibleInSecondaryCamera ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE),
|
||||||
false);
|
false);
|
||||||
}
|
}
|
||||||
if (_drawInFrontDirty) {
|
if (_drawInFrontDirty) {
|
||||||
|
|
|
@ -36,6 +36,11 @@ public:
|
||||||
void clearSubRenderItemIDs();
|
void clearSubRenderItemIDs();
|
||||||
void setSubRenderItemIDs(const render::ItemIDs& ids);
|
void setSubRenderItemIDs(const render::ItemIDs& ids);
|
||||||
|
|
||||||
|
virtual void setIsVisibleInSecondaryCamera(bool value) override {
|
||||||
|
Base3DOverlay::setIsVisibleInSecondaryCamera(value);
|
||||||
|
_visibleDirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
void setProperties(const QVariantMap& properties) override;
|
void setProperties(const QVariantMap& properties) override;
|
||||||
QVariant getProperty(const QString& property) override;
|
QVariant getProperty(const QString& property) override;
|
||||||
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
|
virtual bool findRayIntersection(const glm::vec3& origin, const glm::vec3& direction, float& distance,
|
||||||
|
|
|
@ -51,7 +51,7 @@ namespace render {
|
||||||
|
|
||||||
// always visible in primary view. if isVisibleInSecondaryCamera, also draw in secondary view
|
// always visible in primary view. if isVisibleInSecondaryCamera, also draw in secondary view
|
||||||
uint32_t viewTaskBits = render::ItemKey::TAG_BITS_0 |
|
uint32_t viewTaskBits = render::ItemKey::TAG_BITS_0 |
|
||||||
overlay->getIsVisibleInSecondaryCamera() ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE;
|
(overlay->getIsVisibleInSecondaryCamera() ? render::ItemKey::TAG_BITS_1 : render::ItemKey::TAG_BITS_NONE);
|
||||||
|
|
||||||
builder.withTagBits(viewTaskBits);
|
builder.withTagBits(viewTaskBits);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue