Page 1 of 1

What screen coordinate system is used in Irrlicht?

Posted: Wed Apr 29, 2009 8:24 pm
by pir
I'm trying to do pick selection by using ISceneCollisionManager::getSceneNodeFromScreenCoordinatesBB.
What is the screen coordinate system used when defining the screen coordinates to use?
Is the coordinates of the upper left corner (0,0) and lower right (width, height)? I've tried to search the forum and documentation about this, but without any luck.

hope someone have time to answer my question.

Posted: Wed Apr 29, 2009 9:10 pm
by tomhancocks
0,0 is the upper left, and width,height is indeed the lower right.

Posted: Thu Apr 30, 2009 10:44 am
by Systemerror
It uses the right handed cartesian co ordinate system (X, Y, Z)

X = width
Y = height
Z = 3D line between the two

Y(height)
| _ X(twidth)
/
Z(towards the viewer)


Like my graph? lol

Posted: Thu Apr 30, 2009 11:01 am
by hybrid
screen has no z axis, and the rest is not important then.

Posted: Thu Apr 30, 2009 1:32 pm
by Systemerror
Oops, sorry I just skimmed through his first post, well atleast he knows for future refference :P

Posted: Thu Apr 30, 2009 3:50 pm
by hybrid
Oh, in that case: Irrlicht uses a left-handed systm, just as DirectX.

Posted: Thu Apr 30, 2009 9:16 pm
by Acki
Systemerror wrote: X(height going downwards)
| _ Y(to the right)
/
Z(towards the viewer)


Like my graph? lol
maybe if it was correct... :lol:
X - you're wrong: it goes to the right !!!
Y - you're wrong: it goes up !!!
Z - you're wrong: it's the opposite direction !!! ;)

Posted: Thu Apr 30, 2009 10:11 pm
by Systemerror
That's what tiredness does to you, it's not what I meant.

Now edited to right handed system even though Irrlicht uses the left like D3D, I suddenly started thinking of OpenGL strangly enough - old habbits ....