Bugfix/chunkytrimesh subdivide maxnodes (#451)
* minor redundant: dir * bugfix: ChunkyTriMesh nodes array: out of bounds
This commit is contained in:
parent
65b314a44e
commit
24230e8e8d
@ -83,7 +83,7 @@ static void subdivide(BoundsItem* items, int nitems, int imin, int imax, int tri
|
||||
int inum = imax - imin;
|
||||
int icur = curNode;
|
||||
|
||||
if (curNode > maxNodes)
|
||||
if (curNode >= maxNodes)
|
||||
return;
|
||||
|
||||
rcChunkyTriMeshNode& node = nodes[curNode++];
|
||||
|
@ -424,9 +424,6 @@ static bool isectSegAABB(const float* sp, const float* sq,
|
||||
|
||||
bool InputGeom::raycastMesh(float* src, float* dst, float& tmin)
|
||||
{
|
||||
float dir[3];
|
||||
rcVsub(dir, dst, src);
|
||||
|
||||
// Prune hit ray.
|
||||
float btmin, btmax;
|
||||
if (!isectSegAABB(src, dst, m_meshBMin, m_meshBMax, btmin, btmax))
|
||||
|
Loading…
x
Reference in New Issue
Block a user