Jump to content
  • Advertisement
Sign in to follow this  
luckyyyyyy

Rotation & Translation Problem..

This topic is 3662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi.....guys... please see this picture and help me.........actually i have 3D mesh Model.....and that model don;t have (0.0, 0.0, 0.0) origin.....so when i start to rotate with mouse....its rotation of model is far from origin......but i want to rotate like for example if i pick this triangle from center of triangle then it will rotate along picking axis.... thanks,,,

Share this post


Link to post
Share on other sites
Advertisement
sorry i couldn't understand.......what kind of translation and rotation u are saying...



this is code....what u suggest now..
---------------------------
mouse
---------------------------
glTranslatef(0.0f, 0.0f, zoom); // Translate the Model in Z-Direction
glRotatef(spin_y, 1.0f, 0.0f, 0.0f); // Rotate The Model On It's X-Axis
glRotatef(spin_x, 0.0f, 1.0f, 0.0f); // Rotate The Model On It's Y-Axis
Drawobject(); // Draw object Model



--------------------

and i draw 3D mesh model with vertex array....

Share this post


Link to post
Share on other sites

This topic is 3662 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Guest
This topic is now closed to further replies.
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!