View Full Version : hoi ve quay ham glRotate
ngocquang19877
09-12-2003, 07:34
tai seo khi em tao 3 shape.rui cho tui no quay theo x,y,z khac nhau.ban dau chi thay tui no quay theo 1 huong,theo loi khuyen cua bac NEHE thi em de ham glloadindentity de no reset lai toa do ,nhung bi gio no chi con lai 1 shape moi tuc cho
please help me!!
thank a lot
Post code lên đi.
Chắc là ông muốn cho 3 shape đó tự quay chung quanh chính bản thân nó chứ gì.
Vậy thì ông cần phải làm theo trình tự sau :
///////////////////////////////////////////////
glLoadIdentity(); // reset hệ toạ độ
glTranslate("điểm cần vẽ shape A");
glRotate("shape A");
Vẽ shape A;
glLoadIdentity();
glTranslate("điểm cần vẽ shape B");
glRotate("shape B");
Vẽ shape B;
glLoadIdentity();
glTranslate("điểm cần vẽ shape C");
glRotate("shape C");
Vẽ shape C;
////////////////////////////////////////////////
Powered by vBulletin® Version 4.2.0 Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.