mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-09 21:47:45 +00:00
CSceneNode: Make use of structured bindings in RayAABoxIntersectTest()
Same thing, but lets the returned values have more self-explanatory names.
This commit is contained in:
@@ -39,10 +39,10 @@ void CSceneNode::DrawSelection()
|
|||||||
void CSceneNode::RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& /*rkViewInfo*/)
|
void CSceneNode::RayAABoxIntersectTest(CRayCollisionTester& rTester, const SViewInfo& /*rkViewInfo*/)
|
||||||
{
|
{
|
||||||
// Default implementation for virtual function
|
// Default implementation for virtual function
|
||||||
std::pair<bool,float> Result = AABox().IntersectsRay(rTester.Ray());
|
const auto [hit, distance] = AABox().IntersectsRay(rTester.Ray());
|
||||||
|
|
||||||
if (Result.first)
|
if (hit)
|
||||||
rTester.AddNode(this, -1, Result.second);
|
rTester.AddNode(this, -1, distance);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CSceneNode::IsVisible() const
|
bool CSceneNode::IsVisible() const
|
||||||
|
|||||||
Reference in New Issue
Block a user