introduce intersectable interface

This commit is contained in:
ohyzha
2024-11-04 18:20:32 +02:00
parent 4f3336014a
commit 4956884d5f
6 changed files with 95 additions and 1 deletions

View File

@@ -80,6 +80,11 @@ namespace OpenVulkano::Scene
m_billboardSettings = settings;
}
std::optional<RayHit> LabelDrawable::Intersect(const Ray& ray) const
{
return ray.IntersectAABB(m_bbox);
}
void LabelDrawable::RecalculateBbox(const Math::AABB& other)
{
if (m_bbox.IsEmpty())