View Full Version : Using Mouse application in some defined area
11-18-2004, 12:24 AM
I have made an appliction in which I will be using mouse click to display some content(more geometric objects).But here I want to restrict the area for my mouse click.Like I have created a 3D object .I want that the further contents shud get displayed only when I click on my parent geometric object only.
So how can I give my coordinates for mouse functionality?
Thanks in advance.
11-18-2004, 10:40 AM
Maybe you should consult the NeHe OpenGL^Win32 web page (http://nehe.gamedev.net) I know there is a tutorial about the picking (interactions between mouse and object)
If not, try to consulte the OpenGL RedBook on this website
11-24-2004, 07:04 PM
Thanks Gollum but there in Nehe's site I haven't found anything related to my query as I want that my Mouse click(whether right or left) shud be recognised only in some defined area.
Can I define that area in my code so that the mouse click is recognised in this predefined area only and no where else.
Thanks in advance,
11-24-2004, 08:26 PM
Why does it matter WHO ignores clicks you don't want? Can't you the filtering in your app instead of in ogl?
11-24-2004, 09:32 PM
Just check the coordinates before you use them, if they are outside the area drop the mouse events.
11-25-2004, 02:00 AM
Ya Mikael u r true that we shud use the co-ordinates.But if I choose the range for x,y & z co-ordinates(Screen Co-ordinates) and then click outside this range then also the event takes place.I also tried with object co-ordinates but doesn't satisfy the functionality I required.
Can anyone tell me what co-ordinates do I need to specify :-
Object Co-ordinates or screen co-ordinates or Mouse Coordinates or sumthing else...
Or is there some other technique?
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.