mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 18:03:56 -04:00
prevent infinite recursion
This commit is contained in:
parent
81bef7355c
commit
336fb90627
@ -767,6 +767,7 @@ intersects_parabola(double &t, const Parabolaf ¶bola,
|
||||
// point and comparing its distance from the linear intervening
|
||||
// point.
|
||||
double tmid = (t1 + t2) * 0.5;
|
||||
if (tmid != t1 && tmid != t2) {
|
||||
LPoint3f pmid = parabola.calc_point(tmid);
|
||||
LPoint3f pmid2 = (p1 + p2) * 0.5f;
|
||||
|
||||
@ -777,6 +778,7 @@ intersects_parabola(double &t, const Parabolaf ¶bola,
|
||||
}
|
||||
return intersects_parabola(t, parabola, tmid, t2, pmid, p2);
|
||||
}
|
||||
}
|
||||
|
||||
// The line segment is sufficiently close; compare the segment itself.
|
||||
double t1a, t2a;
|
||||
|
@ -853,6 +853,8 @@ intersects_parabola(double &t, const Parabolaf ¶bola,
|
||||
// point and comparing its distance from the linear intervening
|
||||
// point.
|
||||
double tmid = (t1 + t2) * 0.5;
|
||||
|
||||
if (tmid != t1 && tmid != t2) {
|
||||
LPoint3f pmid = parabola.calc_point(tmid);
|
||||
LPoint3f pmid2 = (p1 + p2) * 0.5f;
|
||||
|
||||
@ -863,6 +865,7 @@ intersects_parabola(double &t, const Parabolaf ¶bola,
|
||||
}
|
||||
return intersects_parabola(t, parabola, tmid, t2, pmid, p2);
|
||||
}
|
||||
}
|
||||
|
||||
// The line segment is sufficiently close; compare the segment itself.
|
||||
double t1a, t2a;
|
||||
|
Loading…
x
Reference in New Issue
Block a user