Part of the Khronos Group

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: object selection and then rotation....

  1. #1
    Junior Member Newbie
    Join Date
    Feb 2000

    object selection and then rotation....

    I am a OpenGL newbie and now working with an assginment on furniture models design and layout with OpenGL programming. And I need to select a single furniture object among all rendered objects and then make itself rotate or translate (by pressing a key, say, 'R' for rotation, 'T' for translation). After studying selection on the red book, I still dunno how to do it since we can only redraw the scene once the object is picked/selected. Can it wait for an keyboard event to redraw the scene?
    it may be a silly question, grateful if you can help...thx!

  2. #2
    Intern Contributor
    Join Date
    Feb 2000
    Stafford, UK

    Re: object selection and then rotation....

    Im not entirely sure what you need to know but if you want to update a scene (ie re-run your display function) you can use GlutPostRedisplay(); if you are using glut.

    If you want to pick an object and then rotate it, assign it a number as a name (as in the red book) assign each object a number in your linked list, then traverse your linked list until you reach your object and assign a pointer to that object, then use that pointer to rotate the object etc.

Posting Permissions

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