[ODE] Heightfield / ray

LR logreg at free.fr
Fri Mar 30 08:35:54 MST 2007


Thank you very much for your help !!

I've made those changes:

bool needFurtherPasses;
//compute Ratio between Triangle size and O2 aabb size
if(o2->type == dRayClass)
	{
	needFurtherPasses=false;
	}
else
	{
	needFurtherPasses = (o2->type == dTriMeshClass);
	if (needFurtherPasses == false)
		{
		const dReal xratio = (o2->aabb[1] - o2->aabb[0]) *
m_p_data->m_fInvSampleWidth;
		if (xratio > 1.5)
			needFurtherPasses = true;
		else
			{
			const dReal zratio = (o2->aabb[5] - o2->aabb[4]) *
m_p_data->m_fInvSampleDepth;
			if (zratio > 1.5)
				needFurtherPasses = true;
			}
		}
	}

Because setting needFurtherPasses=false is not enought : ratio checking can
overload to 'true' ...

I've tested in my code and it seems to work fine. Thank you again.

LR
 

-----Message d'origine-----
De : tuan kuranes [mailto:tuan.kuranes at gmail.com] 
Envoyé : vendredi 30 mars 2007 16:40
À : LR
Cc : ode at ode.org
Objet : Re: [ODE] Heightfield / ray

Change

Heightfield.cpp, line 1153 from

    bool needFurtherPasses = (o2->type == dTriMeshClass);

to

    bool needFurtherPasses = (o2->type == dTriMeshClass) && (o2->type =
dRayClass);






More information about the ODE mailing list