mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-09 13:37:43 +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*/)
|
||||
{
|
||||
// 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)
|
||||
rTester.AddNode(this, -1, Result.second);
|
||||
if (hit)
|
||||
rTester.AddNode(this, -1, distance);
|
||||
}
|
||||
|
||||
bool CSceneNode::IsVisible() const
|
||||
|
||||
Reference in New Issue
Block a user