Add 2d variant of bounding box

This commit is contained in:
Georg Hagen
2025-01-06 00:28:10 +01:00
parent ceee3ef12e
commit 7ef6503a78
5 changed files with 92 additions and 79 deletions

View File

@@ -53,7 +53,7 @@ namespace OpenVulkano::Scene
[[nodiscard]] UniformBuffer* GetLabelBuffer() { return &m_labelBuffer; }
[[nodiscard]] Math::Vector3f& GetPosition() { return m_position; }
[[nodiscard]] bool IsBillboard() const { return m_settings.isBillboard; }
[[nodiscard]] const Math::AABB& GetBoundingBox() const { return m_bbox; }
[[nodiscard]] const Math::AABB2f& GetBoundingBox() const { return m_bbox; }
std::optional<RayHit> Intersect(const Ray& ray) const override;
private:
@@ -63,6 +63,6 @@ namespace OpenVulkano::Scene
LabelDrawableSettings m_settings;
LabelUniformData m_labelData;
Math::Vector3f m_position = { 0, 0, 0 };
Math::AABB m_bbox;
Math::AABB2f m_bbox;
};
}