Thank you for your reply!
But I haven't get it yet..
OpenGL's default coordinate system is right handed, with positive Y axis toward upward, and positive Z axis toward 'outside',
so how the code I posted tranforms OpenGL's coordinates into Processing's counterpart?
That was true for Processing before V2. In those days P3D was not based on OpenGL is was a 3D software renderer created for Processing. I think the P3D reference needs updating :)
Answers
In 2D you are talking about pixel positions and [0,0] is the top left corner with x increasing to the right and y increasing downwards.
The camera() command controls viewing in 3D and Processing uses OpenGL and OpenGL defines the up direction as [0,1,0]
Thank you for your reply! But I haven't get it yet..
OpenGL's default coordinate system is right handed, with positive Y axis toward upward, and positive Z axis toward 'outside', so how the code I posted tranforms OpenGL's coordinates into Processing's counterpart?
camera(...)
is used in P3D and OPENGL modes (both of these modes use OpenGL)Processing (since V2) does not have its own 3D coordinate system so there is no counterpart only OpenGL's coordinate system.
Since Processing 2 series, P3D & OPENGL refer to the very same renderer:
println(P3D == OPENGL);
// trueWe can also test whether current renderer is OpenGL based:
println(isGL());
P.S.: Old Processing 1's P3D wasn't OpenGL based. Only OPENGL mode was so back then! :P
Thank you!
so, 3D coordinate system in Processing is right-handed, right? but according to THIS, the system in Processing is left-handed..
Am I losing anything?
That was true for Processing before V2. In those days P3D was not based on OpenGL is was a 3D software renderer created for Processing. I think the P3D reference needs updating :)
After testing, it makes me even more confused, as the default setting of P3D does make a left-handed system, just like the reference says.