All pastes #448618 Raw Edit

Miscellany

public cpp v1 · immutable
·published 2007-04-19 19:37 UTC
rendered paste body
	lib3ds_mesh_calculate_normals(mesh, normalL);		ngVector3 tempa;		//for(int z=0; z < 3*sizeof(Lib3dsVector)*mesh->faces;z++) {		for(unsigned int p=0; p< mesh->faces;++p) {		Lib3dsFace *f=&mesh->faceL[p];		//	std::cout << mesh->pointL[z].pos[0] << std::endl;		//	std::cout << mesh->pointL[z].pos[1] << std::endl;		//	std::cout << mesh->pointL[z].pos[2] << std::endl;			//std::cout << normalL[z][0] << std::endl;		for(int i=0;i<3;++i) {	 	tempa.x = normalL[p*3+i][0] + f->normal[0];		 	tempa.y = normalL[p*3+i][1] + f->normal[1];		 	tempa.z = normalL[p*3+i][2] + f->normal[2];		ngVectorNormalize(&tempa, &tempa);	//	std::cout << f->normal[0] << std::endl;	//	std::cout << f->normal[1] << std::endl;	//	std::cout << f->normal[2] << std::endl;	//	std::cout << tempa.y << std::endl;	//	std::cout << te << std::endl;		normalL2[p].pos[0] = tempa.x;		normalL2[p].pos[1] = tempa.y;		normalL2[p].pos[2] = tempa.z;//		glNormal3fv(normalL[3*p+i]);		}