mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 01:13:32 +02:00
Use implicit copy constructor for PanelAttachable.
This commit is contained in:
parent
13a63a5a3d
commit
c7639537d0
3 changed files with 4 additions and 21 deletions
|
@ -19,7 +19,7 @@ Billboard3DOverlay::Billboard3DOverlay() :
|
|||
|
||||
Billboard3DOverlay::Billboard3DOverlay(const Billboard3DOverlay* billboard3DOverlay) :
|
||||
Planar3DOverlay(billboard3DOverlay),
|
||||
PanelAttachable(billboard3DOverlay),
|
||||
PanelAttachable(*billboard3DOverlay),
|
||||
_isFacingAvatar(billboard3DOverlay->_isFacingAvatar)
|
||||
{
|
||||
}
|
||||
|
|
|
@ -13,20 +13,6 @@
|
|||
|
||||
#include <RegisteredMetaTypes.h>
|
||||
|
||||
PanelAttachable::PanelAttachable() :
|
||||
_parentPanel(nullptr),
|
||||
_offsetPosition(0, 0, 0),
|
||||
_offsetRotation(1, 0, 0, 0)
|
||||
{
|
||||
}
|
||||
|
||||
PanelAttachable::PanelAttachable(const PanelAttachable* panelAttachable) :
|
||||
_parentPanel(panelAttachable->_parentPanel),
|
||||
_offsetPosition(panelAttachable->_offsetPosition),
|
||||
_offsetRotation(panelAttachable->_offsetRotation)
|
||||
{
|
||||
}
|
||||
|
||||
bool PanelAttachable::getParentVisible() const {
|
||||
if (getParentPanel()) {
|
||||
return getParentPanel()->getVisible() && getParentPanel()->getParentVisible();
|
||||
|
|
|
@ -19,9 +19,6 @@
|
|||
|
||||
class PanelAttachable {
|
||||
public:
|
||||
PanelAttachable();
|
||||
PanelAttachable(const PanelAttachable* panelAttachable);
|
||||
|
||||
OverlayPanel::Pointer getParentPanel() const { return _parentPanel; }
|
||||
virtual glm::vec3 getOffsetPosition() const { return _offsetPosition; }
|
||||
virtual glm::quat getFacingRotation() const { return _offsetRotation; }
|
||||
|
@ -38,9 +35,9 @@ protected:
|
|||
virtual void applyTransformTo(Transform& transform);
|
||||
|
||||
private:
|
||||
OverlayPanel::Pointer _parentPanel;// = nullptr;
|
||||
glm::vec3 _offsetPosition;// = {0, 0, 0};
|
||||
glm::quat _offsetRotation;// = {1, 0, 0, 0};
|
||||
OverlayPanel::Pointer _parentPanel = nullptr;
|
||||
glm::vec3 _offsetPosition = {0, 0, 0};
|
||||
glm::quat _offsetRotation = {1, 0, 0, 0};
|
||||
};
|
||||
|
||||
#endif // hifi_PanelAttachable_h
|
||||
|
|
Loading…
Reference in a new issue