PDA

View Full Version : CORDINATE SYSTEMS



12-19-2002, 09:23 PM
i am having a problem in seeting cordinates..for windows/viewport...
plz guide me in this regard

thanks
Raza

MickeyMouse
12-21-2002, 03:01 AM
Hi!
Here's everything you need: http://ask.ii.uib.no/ebt-bin/nph-dweb/dynaweb/SGI_Developer/OpenGL_PG/
Good luck!

MOON-GIRL
12-21-2002, 08:53 AM
HI

try use this equation
XV=XVmin+(XW+XWmin)*((XVmax-XVmin)/(XWmax-XWmin)

and the same things about y

for example if you have viewport(200,100,500,400);

xvmin=200
xmax=500

and don't forget the mouse coordinate

and thr the ortho must be exactly the same size of the window


if you want like this tell ,e and i well try help you


best regards
Monn_Girl

nexusone
12-21-2002, 11:56 AM
Moon-girl need to correct you on the ortho view vs. view port settings.

The ortho view does not have to be the same size as your view port or window.

Viewport is screen area that is to be rendered to.

Ortho, perspective, etc, is the area in 3D space in which to render from.


See my examples on my website: http://www.angelfire.com/linux/nexusone/


Originally posted by MOON-GIRL:
HI

try use this equation
XV=XVmin+(XW+XWmin)*((XVmax-XVmin)/(XWmax-XWmin)

and the same things about y

for example if you have viewport(200,100,500,400);

xvmin=200
xmax=500

and don't forget the mouse coordinate

and thr the ortho must be exactly the same size of the window


if you want like this tell ,e and i well try help you


best regards
Monn_Girl



[This message has been edited by nexusone (edited 12-21-2002).]

[This message has been edited by nexusone (edited 12-21-2002).]