change coodinate syste

by Paolo » Tue, 27 Apr 2010 23:24:27 GMT

Sponsored Links
 Is it possibile to change the corrdinate system of openGL?

Now i have the origin in the botton-left corner, with the x-axis
points to right, the y-axis points to up and the z-axis points to me.

I want the origin in the botton-right corner, with the x-axis point to
left, the y-axis point to up and z-axis point always to me.

is it possible? How?

Thanks to all.


change coodinate syste

by Juan Aranda-Alvarez » Thu, 29 Apr 2010 07:15:09 GMT

change coodinate syste

by Juan Aranda-Alvarez » Thu, 29 Apr 2010 07:15:24 GMT

 OpenGL works in 3D space, so if you would like another orientation you could
rotate the scene moving the POV (camera) position. But there is no way to
move from a right-hand coordinate system to a Left-side one.


change coodinate syste

by Max Gilead » Thu, 29 Apr 2010 08:12:13 GMT

 Sure there is, you just have to multiply by a suitable matrix. A simple
google query will tell you how it should be done.


change coodinate syste

by Bob Kerns » Thu, 29 Apr 2010 08:39:26 GMT

 You mean, other than any affine transform that decomposes to include
scaling of an odd number of axis by a negative value? Nope, other than
that infinite number of ways, nope, no way.

On Apr 27, 7:13pm, Juan Aranda-Alvarez <>


change coodinate syste

by Robert Green » Thu, 29 Apr 2010 12:02:30 GMT

 Juan, their sarcasm is well-founded.  It's not only possible but

One easy way to change the coordinate system:

// start drawing
gl.glScalef (1, 1, -1);
GLU.gluLookAt(gl, pos.x, pos.y, pos.z, lookAt.x, lookAt.y, lookAt.z,
upVec.x, upVec.y, upVec.z);

Enjoy your new left-handed coordinate system.


change coodinate syste

by Juan Aranda-Alvarez » Thu, 29 Apr 2010 23:25:12 GMT

 Thanks, wow, it really was simple. Thanks for the sane answer.


> >

change coodinate syste

by Bob Kerns » Fri, 30 Apr 2010 15:27:07 GMT

 Sorry, I didn't really mean it to be that sarcastic -- more
educational with a humorous note. But I was a bit rushed, so I kind of
skipped over the explanation part, and the humor, well, my humor is of
a hit-or-miss variety...but usually I have the good sense to not apply
it in online discussions like that.

You'll notice that Robert's code does exactly what I said -- an odd
number of axis in the scaling are negative. Think about what that does
-- it mirrors it across the plane formed by the other two axis. Any
odd number of mirrorings will leave you with the handedness of the
coordinate system flipped.

This can be across ANY planes. But you can decompose any set of linear
transformations to be a scaling times every everything else, so you
can flip, then move that plane around, to achieve mirroring across any
plane whatsoever.

There's no other way to do it, this is the complete set.

See, I really was giving you a complete solution -- in condensed form!

Now, I was slightly careless in my description. If you scale any axis
by zero, you reduce the number of dimensions by one. Do it once, and
you have Flatland -- and you no longer have a concept of "handedness"
at all. Do it twice, and you get a linear world. Not very interesting.
Do it three times, and you've got a point -- but I can't see it!

On Apr 29, 8:24am, Juan Aranda-Alvarez <>

> > >

Other Threads

1. GK: How to generate "android.jar" using open source platform.

After you build the whole source,
you can find mydroid/out/target/common/obj/JAVA_LIBRARIES/
it is same as android.jar. just rename and use it.

or just 'make sdk'.


2. Activity Background "Wallpaper" Size

Hey everyone,

I'm looking to make a background for my very simple "test" activity.
What is the best way to design the wallpaper? Dimension-wise.



3. Motorola Cliq sales is slipping...Android 2.1 Screen Shots

4. issues in adding anew module

5. CPM plugin and root privilege (donut)

6. How to build C++ library within android build system

7. Resolution specific graphic packages