PDA

View Full Version : how to show parallel projecting? (please provide coding)



03-04-2004, 08:46 AM
hi, i currently was persuing a OpenGL course. i wonder how to proof a object is parallel projecting? i need ur help indeed as soon as possible. please provide me with coding part, thanks.

Relic
03-04-2004, 09:37 AM
You could analyze the modelview and projection matrices for projective parts.
Find a copy of the OpenGL programming guide (the "redbook") and look into appendix F homogenous transformations. Compare glOrtho and glFrustum matrices, esp. the bottom row.
(Remeber OpenGL matrices are float [16] arrays and column-major.)
You could also project points at different x,y,z postions and make sure all points along a eye-z-axis have the same projected x,y coordinates.