Relayout file to reduce memory footprint

This commit is contained in:
Georg Hagen
2025-01-06 17:09:18 +01:00
parent 89d732d570
commit 129d83374f

View File

@@ -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<TextDrawable>& 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<RayHit> Intersect(const Ray& ray) const override;
private:
LabelDrawableSettings m_settings;
std::shared_ptr<AtlasData> m_atlasData;
UniformBuffer m_labelBuffer;
std::list<TextDrawable> 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<TextDrawable> m_texts; // Using list instead of vector for stable iterators
Math::Vector2f m_position = { 0, 0 };
Math::AABB2f m_bbox;
};
}