69 if( ( tPlane >= aHitInfo.
m_tHit ) || ( tPlane < FLT_EPSILON ) )
75 float dSquared =
m_segment.DistanceToPointSquared( planeHitPoint2d );
79 if( tPlane < aHitInfo.
m_tHit )
98 if( normal_dot_ray < 0.0f )
102 const float t = n_dot_ray_origin / normal_dot_ray;
109 const float len = glm::dot( v, v );
112 && ( hitP.z <=
m_bbox.Max().z ) )
135 if( normal_dot_ray < 0.0f )
139 const float t = n_dot_ray_origin / normal_dot_ray;
146 const float len = glm::dot( v, v );
149 && ( hitP.z <=
m_bbox.Max().z ) )
175 const double p_dot_p_Start = OCx_Start * OCx_Start + OCy_Start * OCy_Start;
177 const double a = (double)aRay.
m_Dir.x * (
double)aRay.
m_Dir.x +
180 const double b_Start = (double)aRay.
m_Dir.x * (
double)OCx_Start +
181 (double)aRay.
m_Dir.y * (
double)OCy_Start;
185 const float delta_Start = (float) ( b_Start * b_Start - a * c_Start );
187 if( delta_Start > FLT_EPSILON )
189 const float sdelta = sqrtf( delta_Start );
190 const float t = ( -b_Start - sdelta ) / a;
193 if( ( z >=
m_bbox.Min().z ) && ( z <=
m_bbox.Max().z ) )
220 const double p_dot_p_End = OCx_End * OCx_End + OCy_End * OCy_End;
222 const double b_End = (double)aRay.
m_Dir.x * (
double)OCx_End +
223 (double)aRay.
m_Dir.y * (
double)OCy_End;
227 const float delta_End = (float)(b_End * b_End - a * c_End);
229 if( delta_End > FLT_EPSILON )
231 const float sdelta = sqrtf( delta_End );
232 const float t = ( -b_End - sdelta ) / a;
235 if( ( z >=
m_bbox.Min().z ) && ( z <=
m_bbox.Max().z ) )
269 if( ( tPlane >= aMaxDistance) || ( tPlane < FLT_EPSILON ) )
275 const float dSquared =
m_segment.DistanceToPointSquared( planeHitPoint2d );
279 if( tPlane < aMaxDistance )
294 if( normal_dot_ray < 0.0f )
297 float t = n_dot_ray_origin / normal_dot_ray;
304 float len = glm::dot( v, v );
307 ( hitP.z >=
m_bbox.Min().z ) && ( hitP.z <=
m_bbox.Max().z ) )
309 if( t < aMaxDistance )
320 if( normal_dot_ray < 0.0f )
324 const float t = n_dot_ray_origin / normal_dot_ray;
331 float len = glm::dot( v, v );
334 ( hitP.z >=
m_bbox.Min().z ) && ( hitP.z <=
m_bbox.Max().z ) )
336 if( t < aMaxDistance )
351 double p_dot_p_Start = OCx_Start * OCx_Start + OCy_Start * OCy_Start;
353 double a = (double)aRay.
m_Dir.x * (
double)aRay.
m_Dir.x +
356 double b_Start = (double)aRay.
m_Dir.x * (
double)OCx_Start +
357 (double)aRay.
m_Dir.y * (
double)OCy_Start;
361 float delta_Start = (float)( b_Start * b_Start - a * c_Start );
363 if( delta_Start > FLT_EPSILON )
365 float sdelta = sqrtf( delta_Start );
366 float t = ( -b_Start - sdelta ) / a;
369 if( ( z >=
m_bbox.Min().z ) && ( z <=
m_bbox.Max().z ) )
371 if( t < aMaxDistance )
381 double p_dot_p_End = OCx_End * OCx_End + OCy_End * OCy_End;
384 double b_End = (double)aRay.
m_Dir.x * (
double)OCx_End +
385 (double)aRay.
m_Dir.y * (
double)OCy_End;
389 float delta_End = (float)(b_End * b_End - a * c_End);
391 if( delta_End > FLT_EPSILON )
393 float sdelta = sqrtf( delta_End );
394 float t = ( -b_End - sdelta ) / a;
397 if( ( z >=
m_bbox.Min().z ) && ( z <=
m_bbox.Max().z ) )
399 if( t < aMaxDistance )