Matrix transformations corrected in glCylinder and glArrow.
This commit is contained in:
parent
22aa059de2
commit
17369b521b
|
@ -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();
|
||||||
|
|
Loading…
Reference in New Issue