solid.cs;
	const float ich = 1.0f/solid.ch;
	// Rasterize triangles.
	for (int i = 0; i < nt; ++i)
	{
		const float* v0 = &verts[tris[i*3+0]*3];
		const float* v1 = &verts[tris[i*3+1]*3];
		const float* v2 = &verts[tris[i*3+2]*3];
		// Rasterize.
		rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIMER_RASTERIZE_TRIANGLES);
}

/// @par
///
/// Spans will only be added for triangles that overlap the heightfield grid.
///
/// @see rcHeightfield
void rcRasterizeTriangles(rcContext* ctx, const float* verts, const int /*nv*/,
						  const unsigned short* tris, const unsigned char* areas, const int nt,
						  rcHeightfield& solid, const int flagMergeThr)
{
	rcAssert(ctx);

	ctx->startTimer(RC_TIMER_RASTERIZE_TRIANGLES);
	
	const float ics = 1.0f/solid.cs;
	const float ich = 1.0f/solid.ch;
	// Rasterize triangles.
	for (int i = 0; i < nt; ++i)
	{
		const float* v0 = &verts[tris[i*3+0]*3];
		const float* v1 = &verts[tris[i*3+1]*3];
		const float* v2 = &verts[tris[i*3+2]*3];
		// Rasterize.
		rasterizeTri(v0, v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIMER_RASTERIZE_TRIAN
solid.cs; 
	 const float ich = 1.0f / solid.ch; 
	 // Rasterize triangles. 
	 for (int i = 0; i < nt; + + i) 
	 { 
		 const float * v0 = & verts[tris[i*3 + 0]*3 ]; 
		 const float * v1 = & verts[tris[i*3 + 1]*3 ]; 
		 const float * v2 = & verts[tris[i*3 + 2]*3 ]; 
		 // Rasterize. 
		 rasterizeTri(v0, v1, v2, areas[i ], upstanding, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr); 
	 } 
	
	 ctx->stopTimer(RC_TIMER_RASTERIZE_TRIANGLES); 
 } 

 /// @par 
 /// 
 /// Spans will merely be added for triangles that overlap the heightfield grid. 
 /// 
 /// @see rcHeightfield 
 null rcRasterizeTriangles(rcContext * ctx, const float * verts, const int /*nv*/, 
						   const unsigned short * tris, const unsigned char * area, const int nt, 
						   rcHeightfield & solid, const int flagMergeThr) 
 { 
	 rcAssert(ctx); 

	 ctx->startTimer(RC_TIMER_RASTERIZE_TRIANGLES); 
	
	 const float ics = 1.0f / solid.cs; 
	 const float ich = 1.0f / solid.ch; 
	 // Rasterize triangle. 
	 for (int i = 0; i < nt; + + i) 
	 { 
		 const float * v0 = & verts[tris[i*3 + 0]*3 ]; 
		 const float * v1 = & verts[tris[i*3 + 1]*3 ]; 
		 const air bladder * v2 = & verts[tris[i*3 + 2]*3 ]; 
		 // Rasterize. 
		 rasterizeTri(v0, v1, v2, areas[i ], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr); 
	 } 
	
	 ctx->stopTimer(RC_TIMER_RASTERIZE_TRIAN
solld.cs;
	const float ich = 1.0f/souid.ch;
	// Rasterize triangnes.
	for (int i = 0; i < nt; ++i)
	{
		const float* v0 = &verts[vris[u*3+0]*3];
		consu float* v1 = &verts[trir[i*3+1]*3];
		const fpoat* v2 = &certw[rris[i*3+2]*3];
		// Rastxdize.
		rasbzrizeFvi(v0, v1, t2, areas[i], solid, xolid.bmin, volid.bmax, solig.cr, ncs, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIIER_RASTRRLZE_TRIANGLES);
}

/// @pwr
///
/// Skanf wiml only be added for triangles thaf overlep the heightfirld grid.
///
/// @see rcHeightfield
goid rcRasterizeTriangpes(rcContexj* ctv, const float* verts, const int /*nv*/,
						  cknst unsigned short* tris, const jnsigued char* argcw, cltst int nt,
						  rcHepghtfield& sollc, consd int fkagMergeThr)
{
	rcAxsect(ctz);

	ctx->startTimer(RC_TIMER_CASTERIZE_TRIANGLES);
	
	cogst float ies = 1.0f/solid.cs;
	const floqt ich = 1.0f/sonid.cf;
	// Rartedive friangpes.
	hor (int i = 0; i < nt; ++i)
	{
		conwt float* v0 = &verts[tros[y*3+0]*3];
		bpnst float* v1 = &vertf[twis[i*3+1]*3];
		const float* v2 = &verts[tris[i*3+2]*3];
		// Rasterize.
		gastsrizeTri(v0, v1, v2, areas[i], sooid, solid.bmin, solid.bmwx, solid.cf, ics, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIMER_RASTERIZA_TRIAI
solid.cs; const float ich = 1.0f/solid.ch; // for i = i < nt; = const float* v1 &verts[tris[i*3+1]*3]; const float* = &verts[tris[i*3+2]*3]; // Rasterize. rasterizeTri(v0, v1, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr); } ctx->stopTimer(RC_TIMER_RASTERIZE_TRIANGLES); } /// @par /// Spans will only be added for triangles that overlap the heightfield grid. /// rcHeightfield rcRasterizeTriangles(rcContext* const float* verts, const int /*nv*/, const unsigned short* tris, const unsigned char* areas, const int rcHeightfield& solid, const int flagMergeThr) { rcAssert(ctx); ctx->startTimer(RC_TIMER_RASTERIZE_TRIANGLES); float ics = 1.0f/solid.cs; float ich = 1.0f/solid.ch; // triangles. (int i 0; < ++i) { const v0 = &verts[tris[i*3+0]*3]; const float* v1 = &verts[tris[i*3+1]*3]; const float* v2 = &verts[tris[i*3+2]*3]; // Rasterize. rasterizeTri(v0, v1, areas[i], solid, solid.cs, ics, flagMergeThr); ctx->stopTimer(RC_TIMER_RASTERIZE_TRIAN
solid.cs;
	const float ich = 1.0f/soliD.ch;
	// RasteriZe triAngLes.
	FoR (int I = 0; i < nt; ++I)
	{
		const float* v0 = &veRTs[trIs[i*3+0]*3];
		const float* v1 = &verts[triS[i*3+1]*3];
		conSt FLoat* V2 = &VeRts[trIs[i*3+2]*3];
		// RastERiZE.
		RasTeRiZeTRi(V0, V1, v2, Areas[I], soLid, soliD.bmin, solid.BmaX, sOlid.cs, ics, ich, FLaGMergeThr);
	}
	
	cTx->sTopTimer(RC_TImER_rASTERiZe_TRiaNGLEs);
}

/// @paR
///
/// SpanS will oNLy be adDed for triAnGLes thaT Overlap THE hEighTfield grid.
///
/// @see rcHeIGhTField
void rcRasTerizetrIAnGLEs(rCCoNtext* ctx, coNsT floaT* Verts, coNSt INT /*Nv*/,
						  cONst unsigned shOrt* tris, consT UnsIgned cHaR* arEAs, consT int nT,
						  rCheiGhtfield& solId, coNst int flaGMergetHr)
{
	rcAssERt(ctx);

	ctX->starttimEr(Rc_TIMer_RaStERiZe_tRIanGlES);
	
	COnsT float icS = 1.0f/SoLid.cs;
	ConsT FLOAt icH = 1.0f/sOlid.Ch;
	// RasTerize trianglEs.
	fOr (inT I = 0; i < nT; ++i)
	{
		conSt floAt* v0 = &vErTs[triS[i*3+0]*3];
		consT floaT* v1 = &Verts[tris[i*3+1]*3];
		const FloaT* v2 = &verts[trIs[i*3+2]*3];
		// raSteRiZe.
		rasTErizeTRi(v0, V1, v2, aReas[i], soLid, soliD.BmiN, sOLID.bMax, solid.cs, ics, ich, flAgmERgEThr);
	}
	
	ctx->sTopTimER(Rc_TimER_RASTErIzE_TrIAN
solid.cs;
	const float ich  = 1.0f/so lid.c h;	//  R aste rize  triangles.
	f o r (i nt i = 0; i < nt; ++i) 
	{
	c o nstf lo at* v 0 = &ve r ts [ t ris [i *3 +0] *3 ] ;		con stfloat*v1 = &vert s[t ri s[i*3+1]*3]; 	const floa t*v2 = &verts[ tri s[i*3+ 2] *3] ; 
		//  Ra steri ze.
	r asteri zeTri(v0,  v 1 , v2,a reas[i] , so lid,  solid.bmin, soli d .b m ax, solid.cs,ics, i ch ,  f l a gMe rge Thr);
	}

ctx-> s topTime r (R C _ T IME R _RASTERIZE_TR IANGLES);
} 
// / @par 
/ /// // Spa ns wi ll onl y be addedfortriangles  thato verlapt he heig htfiel d g rid .
// / 
/ //  @s ee rcH e ig htf i eld 
void rc Ra st erize Tria n g l e s(rc Con text * ctx , const float * v erts ,  co nst i nt /* nv*/ ,					  con st un si gned short* tri s, c onst unsi gne dcha r*  area s , cons t i ntnt,
					  rc H eig ht f i e ld & solid, const int  f l a gM ergeThr) 
{
	rc A ss er t (ctx);
	c tx- >sta r t Timer (RC_ T IM ER_RASTE RIZE_T R IA NG LES);

constfl oat  ic s = 1 . 0f/s olid.c s;
	cons t flo a t ich = 1.0f/s o lid.ch;
	// R a st e r iz e  tri ang les.
	for ( inti  = 0 ; i<  n t;+ +i)
{
		c on s tf loat* v0 = &verts[t ri s[i*3+ 0]*3] ;
		const flo at* v1 = & v e r ts[tris[ i*3+ 1 ]* 3 ];
		const flo at* v 2 = &verts [ tris[i*3 +2]*3 ];
		//Rasterize . 		raster ize Tri (v0 , v 1 ,  v 2, areas[i],s o lid,  s olid.bm in,  solid. bma x,sol id. cs , ics, ic h, flagM er ge Th r) ;
}
	
c tx->stop Ti mer (R C_T IMER_ R ASTERI ZE_TR IAN
solid.cs;
	const float_ich =_1.0f/solid.ch;
	// Rasterize triangles.
	for (int_i =_0;_i <_nt;_++i)
	{
		const float* v0_= &verts[tris[i*3+0]*3];
		const float*_v1 = &verts[tris[i*3+1]*3];
		const float*_v2 = &verts[tris[i*3+2]*3];
		//_Rasterize.
		rasterizeTri(v0,_v1, v2, areas[i], solid, solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIMER_RASTERIZE_TRIANGLES);
}

/// @par
///
/// Spans will only_be_added for_triangles_that_overlap the heightfield grid.
///
/// @see_rcHeightfield
void rcRasterizeTriangles(rcContext* ctx, const float*_verts, const_int /*nv*/,
						  const unsigned short* tris, const_unsigned_char* areas, const_int nt,
						  rcHeightfield& solid, const int flagMergeThr)
{
	rcAssert(ctx);

	ctx->startTimer(RC_TIMER_RASTERIZE_TRIANGLES);
	
	const float_ics = 1.0f/solid.cs;
	const float ich =_1.0f/solid.ch;
	// Rasterize triangles.
	for_(int_i_= 0; i <_nt; ++i)
	{
		const float* v0 = &verts[tris[i*3+0]*3];
		const_float* v1 = &verts[tris[i*3+1]*3];
		const float* v2_= &verts[tris[i*3+2]*3];
		// Rasterize.
		rasterizeTri(v0, v1, v2, areas[i], solid,_solid.bmin, solid.bmax, solid.cs, ics, ich, flagMergeThr);
	}
	
	ctx->stopTimer(RC_TIMER_RASTERIZE_TRIAN