PDA

View Full Version : Plane in viewport space



-Moi-
08-18-2005, 12:52 PM
Hye ;)

Firstly, I beg of you pardon for my bad english :)

My problem is that I have got a plane equation in World space and I Want it in Viewport Space. I thought it was very easy...

Edit : .. but my only idea was stupid :rolleyes:

Brolingstanz
08-18-2005, 03:06 PM
to be perfectly honest, i don't know whether to laugh or cry.

Eric Lengyel
08-18-2005, 03:48 PM
You can transform a 4D plane directly from world space to viewport space by multiplying by the inverse transpose of the 4x4 matrix that maps points from world space to viewport space. This 4x4 matrix is the concatenation of the view transform V, the projection matrix P, and the viewport transform W (that maps normalized device coordinates to screen coordinates). You don't need to perform any perspective division by w.

-Moi-
08-18-2005, 04:11 PM
to be perfectly honest, i don't know whether to laugh or cryOupss... My idea was so stupid!!! :eek: I must to think a lot of more before writing something... Sorry I'm going to erase this Big mistake...


You can transform a 4D plane directly from world space to viewport space by multiplying by the inverse transpose of the 4x4 matrix that maps points from world space to viewport space. This 4x4 matrix is the concatenation of the view transform V, the projection matrix P, and the viewport transform W (that maps normalized device coordinates to screen coordinates). You don't need to perform any perspective division by w.Thanks a lot :)

Brolingstanz
08-18-2005, 04:21 PM
hehe... it wasn't stupid, a heck of alot better than i did my first time around. i'm glad to see you have a sense of humor.

remember, i'm the one with the boney head
:p