From 129d83374fe606a50b6af5d9622359dfd932fe1f Mon Sep 17 00:00:00 2001 From: Georg Hagen Date: Mon, 6 Jan 2025 17:09:18 +0100 Subject: [PATCH] Relayout file to reduce memory footprint --- openVulkanoCpp/Scene/Prefabs/LabelDrawable.hpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openVulkanoCpp/Scene/Prefabs/LabelDrawable.hpp b/openVulkanoCpp/Scene/Prefabs/LabelDrawable.hpp index fe0e747..03eff25 100644 --- a/openVulkanoCpp/Scene/Prefabs/LabelDrawable.hpp +++ b/openVulkanoCpp/Scene/Prefabs/LabelDrawable.hpp @@ -48,24 +48,24 @@ namespace OpenVulkano::Scene void AddText(const std::string& text, const TextConfig& config = TextConfig()); void SetLabelSettings(const LabelDrawableSettings& settings); - void SetPosition(const Math::Vector3f& pos) { m_position = pos; } + void SetPosition(const Math::Vector2f& pos) { m_position = pos; } [[nodiscard]] std::list& GetTexts() { return m_texts; } [[nodiscard]] LabelDrawableSettings& GetSettings() { return m_settings; } [[nodiscard]] UniformBuffer* GetLabelBuffer() { return &m_labelBuffer; } - [[nodiscard]] Math::Vector3f& GetPosition() { return m_position; } + [[nodiscard]] Math::Vector2f& GetPosition() { return m_position; } [[nodiscard]] bool IsBillboard() const { return m_settings.isBillboard; } [[nodiscard]] const Math::AABB2f& GetBoundingBox() const { return m_bbox; } [[nodiscard]] std::optional Intersect(const Ray& ray) const override; private: + LabelDrawableSettings m_settings; std::shared_ptr m_atlasData; UniformBuffer m_labelBuffer; - std::list m_texts; // Using list instead of vector for stable iterators - LabelDrawableSettings m_settings; LabelUniformData m_labelData; - Math::Vector3f m_position = { 0, 0, 0 }; + std::list m_texts; // Using list instead of vector for stable iterators + Math::Vector2f m_position = { 0, 0 }; Math::AABB2f m_bbox; }; }