7 #ifndef __solve_RayCurveIntersect_h__ 8 #define __solve_RayCurveIntersect_h__ 28 static T solve(
const Vector<3,T>* a_pVertex,
const U32 a_vertCount,
29 const T a_radiusAt0,
const T a_radiusAt1,
39 const T a_radiusAt0,
const T a_radiusAt1,
45 for(U32 m=0;m<a_vertCount-1;m++)
48 const Real distance=magnitude(center-a_origin);
49 const Real radius=a_radiusAt0+(a_radiusAt1-a_radiusAt0)*distance;
54 a_pVertex[m+1]-a_pVertex[m],radius,
55 a_origin,a_direction,oneAlong,oneIntersection);
56 if(oneMag>=0.0 && (bestMag<0.0 || oneMag<bestMag))
58 a_intersection=oneIntersection;
64 a_along=(bestMag<0.0)? -1.0: (realIndex)/T(a_vertCount-1);
kernel
Definition: namespace.dox:3
Find intersection between ray and cylinder.
Definition: RayCylinderIntersect.h:26
Find intersection between ray and curve with radius.
Definition: RayCurveIntersect.h:25