Relayout file to reduce memory footprint
This commit is contained in:
@@ -48,24 +48,24 @@ namespace OpenVulkano::Scene
|
|||||||
|
|
||||||
void AddText(const std::string& text, const TextConfig& config = TextConfig());
|
void AddText(const std::string& text, const TextConfig& config = TextConfig());
|
||||||
void SetLabelSettings(const LabelDrawableSettings& settings);
|
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]] std::list<TextDrawable>& GetTexts() { return m_texts; }
|
||||||
[[nodiscard]] LabelDrawableSettings& GetSettings() { return m_settings; }
|
[[nodiscard]] LabelDrawableSettings& GetSettings() { return m_settings; }
|
||||||
[[nodiscard]] UniformBuffer* GetLabelBuffer() { return &m_labelBuffer; }
|
[[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]] bool IsBillboard() const { return m_settings.isBillboard; }
|
||||||
[[nodiscard]] const Math::AABB2f& GetBoundingBox() const { return m_bbox; }
|
[[nodiscard]] const Math::AABB2f& GetBoundingBox() const { return m_bbox; }
|
||||||
|
|
||||||
[[nodiscard]] std::optional<RayHit> Intersect(const Ray& ray) const override;
|
[[nodiscard]] std::optional<RayHit> Intersect(const Ray& ray) const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
LabelDrawableSettings m_settings;
|
||||||
std::shared_ptr<AtlasData> m_atlasData;
|
std::shared_ptr<AtlasData> m_atlasData;
|
||||||
UniformBuffer m_labelBuffer;
|
UniformBuffer m_labelBuffer;
|
||||||
std::list<TextDrawable> m_texts; // Using list instead of vector for stable iterators
|
|
||||||
LabelDrawableSettings m_settings;
|
|
||||||
LabelUniformData m_labelData;
|
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;
|
Math::AABB2f m_bbox;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user