Matrix transformations corrected in glCylinder and glArrow.

This commit is contained in:
Paolo Cignoni 2008-06-23 14:33:51 +00:00
parent 22aa059de2
commit 17369b521b
1 changed files with 3 additions and 3 deletions

View File

@ -333,7 +333,7 @@ public:
vcg::Point3f Direct=(head-tail); vcg::Point3f Direct=(head-tail);
float l_body=Direct.Norm()-head_lenght; float l_body=Direct.Norm()-head_lenght;
glPushMatrix(); glPushMatrix();
glTranslate(vcg::Point3f(tail.Norm(),0,0)); //glTranslate(vcg::Point3f(tail.Norm(),0,0));
Cylinder(body_slice,l_body,body_width,useDisplList); Cylinder(body_slice,l_body,body_width,useDisplList);
glPopMatrix(); glPopMatrix();
glTranslate(vcg::Point3f(l_body,0,0)); glTranslate(vcg::Point3f(l_body,0,0));
@ -361,7 +361,7 @@ public:
glMultMatrixf(&tr[0][0]); glMultMatrixf(&tr[0][0]);
vcg::Point3f Direct=(head-tail); vcg::Point3f Direct=(head-tail);
float l_body=Direct.Norm(); float l_body=Direct.Norm();
glTranslate(vcg::Point3f(tail.Norm(),0,0)); //glTranslate(vcg::Point3f(tail.Norm(),0,0));
Cone(slice,l_body,width,useDisplList); Cone(slice,l_body,width,useDisplList);
glPopMatrix(); glPopMatrix();
glPopAttrib(); glPopAttrib();
@ -384,7 +384,7 @@ public:
glMultMatrixf(&tr[0][0]); glMultMatrixf(&tr[0][0]);
vcg::Point3f Direct=(head-tail); vcg::Point3f Direct=(head-tail);
float l_body=Direct.Norm(); float l_body=Direct.Norm();
glTranslate(vcg::Point3f(tail.Norm(),0,0)); //glTranslate(vcg::Point3f(tail.Norm(),0,0));
Cylinder(slice,l_body,width,useDisplList); Cylinder(slice,l_body,width,useDisplList);
glPopMatrix(); glPopMatrix();
glPopAttrib(); glPopAttrib();