Coordinate translation

Jan 5, 2013 at 3:17pm

Coordinate translation

Hi, the default coords for drawing in Jitter are -0.5 to 0.5. Is there anyway I can change this so that I can have 0,0 top left corner and e.g., 320,200 bottom right corner and all drawing adjusts itself? I’ve tried using glortho but this doesn’t seem to do the trick…

thx

#65931
Jan 13, 2013 at 12:41pm

Hi. Anyone any input?

#237444
Jan 13, 2013 at 3:20pm

… scaling the input range is not sufficient?

#237445
Jan 14, 2013 at 7:59am

Not very clear from your message, but it seems you are talking about OpenGL drawing which happens in a coord system ruled by camera position, look-at, lens_angle.
In short, the default settings will give you a y-range from -/+ 0,82842712474619 (corresponding to the 45° lens_angle) and x-range equals y-range multiplied by your jit.window screen ratio.

A good way to translate you GL coord system to screen coord system in to use worldtoscreen function of the jit.gl.render.

#237446

You must be logged in to reply to this topic.