code refactoring

This commit is contained in:
ohyzha
2024-11-04 22:48:35 +02:00
parent 3d96889778
commit e2df88ca22
7 changed files with 71 additions and 45 deletions

View File

@@ -52,17 +52,17 @@ namespace OpenVulkano::Scene
}
}
}
if (res)
{
if (SimpleDrawable* sd = dynamic_cast<SimpleDrawable*>(res->drawable))
{
Logger::APP->info("Ray intersects object {}", sd->GetMesh()->name);
}
else if (LabelDrawable* sd = dynamic_cast<LabelDrawable*>(res->drawable))
{
Logger::APP->info("Ray intersects label {}", sd->GetTexts().front().GetText());
}
}
//if (res)
//{
// if (SimpleDrawable* sd = dynamic_cast<SimpleDrawable*>(res->drawable))
// {
// Logger::APP->info("Ray intersects object {}", sd->GetMesh()->name);
// }
// else if (LabelDrawable* sd = dynamic_cast<LabelDrawable*>(res->drawable))
// {
// Logger::APP->info("Ray intersects label {}", sd->GetTexts().front().GetText());
// }
//}
return res;
}
}