示例#1
0
IC	const Fvector vertex_position(const CLevelGraph::CPosition &Psrc, const Fbox &bb, const SAIParams &params)
{
	Fvector				Pdest;
	int	x,z, row_length;
	row_length			= iFloor((bb.max.z - bb.min.z)/params.fPatchSize + EPS_L + 1.5f);
	x					= Psrc.xz() / row_length;
	z					= Psrc.xz() % row_length;
	Pdest.x =			float(x)*params.fPatchSize + bb.min.x;
	Pdest.y =			(float(Psrc.y())/65535)*(bb.max.y-bb.min.y) + bb.min.y;
	Pdest.z =			float(z)*params.fPatchSize + bb.min.z;
	return				(Pdest);
}