PDA

View Full Version : Using Mouse application in some defined area



queries
11-18-2004, 01:24 AM
Hi....
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.

Queries....

Silkut
11-18-2004, 11:40 AM
Hi
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

queries
11-24-2004, 08:04 PM
Hi,

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,
Queries

gmeed
11-24-2004, 09: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?

mikael_aronsson
11-24-2004, 10:32 PM
Hi !

Just check the coordinates before you use them, if they are outside the area drop the mouse events.

Mikael

queries
11-25-2004, 03:00 AM
Hi,

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?

Thanx,
Queries