Results 1 to 2 of 2

Thread: Rotating around a point in a model

  1. #1
    Junior Member Newbie
    Join Date
    Nov 2002
    Location
    Ireland
    Posts
    5

    Rotating around a point in a model

    I decided to design a 3d model in OpenGL, I finally finished the airplane and want, when a key is pressed, to rotate around a center point in the fuselage, Could someone give me this, I sure simple, answer, cheers G
    Ger

  2. #2
    Senior Member OpenGL Guru
    Join Date
    Jun 2000
    Location
    Gastonia, NC, USA
    Posts
    2,068

    Re: Rotating around a point in a model

    Simple answer, works if origin 0,0,0 is the center of the plane, else you would need to translate the plane before rotating to center.

    glPushMatrix()
    glTranslate
    glRotate

    draw_airplane()
    glPopMatrix()

Similar Threads

  1. problem de-rotating a model
    By wmelgaard in forum OpenGL: General
    Replies: 6
    Last Post: 05-09-2017, 11:50 PM
  2. rotating around a point which itself is rotating
    By xman84 in forum OpenGL: General
    Replies: 1
    Last Post: 03-30-2011, 09:14 PM
  3. Rotating each point of 3d model without Matricies
    By CoderWalker in forum OpenGL: General
    Replies: 3
    Last Post: 09-30-2010, 10:35 PM
  4. rotating model
    By Fred F in forum OpenGL: Basic Coding
    Replies: 6
    Last Post: 02-11-2008, 10:54 AM
  5. Rotating around a point and Rotating across own axis
    By Mighty in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 09-10-2004, 10:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean