File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -237,12 +237,13 @@ int AABTreeClass::Cast_Semi_Infinite_Axis_Aligned_Ray_Recursive(CullNodeStruct *
237237 int direction,
238238 unsigned char &flags)
239239{
240- static const float sign[2 ] = { -1 .0f , 1 .0f };
241- float bounds[2 ], start[2 ];
242- bounds[0 ] = -node->m_min [axis_r];
243- bounds[1 ] = node->m_max [axis_r];
244- start[0 ] = -start_point[axis_r];
245- start[1 ] = start_point[axis_r];
240+ constexpr float sign[2 ] = { -1 .0f , 1 .0f };
241+ float bounds[2 ];
242+ float start[2 ];
243+ bounds[0 ] = node->m_min [axis_r] * sign[0 ];
244+ bounds[1 ] = node->m_max [axis_r] * sign[1 ];
245+ start[0 ] = start_point[axis_r] * sign[0 ];
246+ start[1 ] = start_point[axis_r] * sign[1 ];
246247
247248 if (start_point[axis_1] < node->m_min [axis_1] || start_point[axis_2] < node->m_min [axis_2]
248249 || start_point[axis_1] > node->m_max [axis_1] || start_point[axis_2] > node->m_max [axis_2]
You can’t perform that action at this time.
0 commit comments