select, drag and modify

Fba0e4e167e475e06f982d69e3a4aee0
0
cellox 101 Feb 09, 2003 at 00:29

Hi,

I have problem about picking, selection with special issue which is “drag and modify” selected object in OpenGL…

Helps, tutorials suggestions or references will greatly be appreciated…

Thanx you all…:unsure:

3 Replies

Please log in or register to post a reply.

Fdbdc4176840d77fe6a8deca457595ab
0
dk 158 Feb 09, 2003 at 01:55

you could try out the tutorial at http://www.gametutorials.com/Tutorials/ope…/OpenGL_Pg3.htm which is the 4 tutorial down (called: Object Selection). It deals with picking in opengl.

I hope that helps.

Fba0e4e167e475e06f982d69e3a4aee0
0
cellox 101 Feb 09, 2003 at 02:18

@apex

you could try out the tutorial at http://www.gametutorials.com/Tutorials/ope…/OpenGL_Pg3.htm which is the 4 tutorial down (called: Object Selection). It deals with picking in opengl. I hope that helps.

Well thanx,

I have checked the website and indeed there unfortunately is nothing new to me, only a classical selection
sample code…

But my problem is a bit more complicated as I think…What i want to do is select an object among others, drag it, change position or modify it by draging, and drop it…

This is not so advaced a topic as far as i think but i need help…

Thanx again…

C24eb7e6aaefba78b94c831ddc7b4d0b
0
donBerto 101 Feb 09, 2003 at 03:19

sounds like you need to be more specific. you could give us an example of what you want accomplished or maybe show us where you think the problem is by showing some code.

here’s something I would do [pseudocode]

. . .
  if ( 'picked' and choice_button_down)
    click-dragging for this object is enabled.
    (picked object's new location) temporary location --> x = current mouse position
    (picked object's new location) temporary location --> y = current mouse position

  if ( click-dragging for any object was enabled AND no mouse button | dragging is going on)
    current or enabled object's new position temporary location
. . .

I hope that places you in the right direction.

my regards.