Results 1 to 2 of 2

Thread: object selection and then rotation....

  1. #1
    kevin
    Guest

    object selection and then rotation....

    Hi...
    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
    Member Contributor
    Join Date
    Feb 2000
    Location
    Stafford, UK
    Posts
    60

    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.

Similar Threads

  1. Rotation of an object by rotation matrix
    By MrFoil in forum OpenGL: Basic Coding
    Replies: 2
    Last Post: 03-02-2015, 04:41 PM
  2. Object Selection
    By Blacknight in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 10-25-2010, 10:01 PM
  3. Object selection
    By vibi in forum OpenGL: Advanced Coding
    Replies: 1
    Last Post: 04-10-2001, 12:18 AM
  4. Object Selection
    By chrisbe in forum OpenGL: Basic Coding
    Replies: 1
    Last Post: 07-31-2000, 10:03 PM
  5. Object Selection
    By David in forum OpenGL: Advanced Coding
    Replies: 5
    Last Post: 02-12-2000, 05:29 AM

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