Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: rotate wheel of car model

  1. #1
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    2

    rotate wheel of car model

    Hello, i have a car model and i like rotate one wheel. First i traslate the center to center wheel and after rotate from axis X but the wheel not rotate how i like.
    Any idea?
    I have translate respect to angle of rotation.

  2. #2
    Junior Member Regular Contributor
    Join Date
    Apr 2012
    Location
    Los Angeles
    Posts
    177
    Quote Originally Posted by Pepis77 View Post
    Hello, i have a car model and i like rotate one wheel. First i traslate the center to center wheel and after rotate from axis X but the wheel not rotate how i like. Any idea? I have translate respect to angle of rotation.
    If you are programming in C/C++, classic GL, and GLUT, post your code. I'm sure people can help if you do that much. If I can compile and run it. I'll try to help you.

  3. #3
    Newbie Newbie
    Join Date
    Jul 2013
    Posts
    2

    Code

    Quote Originally Posted by Carmine View Post
    If you are programming in C/C++, classic GL, and GLUT, post your code. I'm sure people can help if you do that much. If I can compile and run it. I'll try to help you.
    Hello, I used OpenTK and first calculate of center of my object and after translate the center and rotate:



    Code :
    center =  CalculeCenterGroup("Cylinder01");          
     
                    GL.Translate(-center.X, -center.Y, -center.Z);
                    GL.Rotate(bladeAngle, 0, 0, 1);
                    GL.Translate(center.X, center.Y, center.Z);

    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •