Setting up Projections

Started by
2 comments, last by braugh 20 years, 1 month ago
What steps would I have to take to set up my own projection function? It would need two projection choices, parallel and perspective. I would need to pass: (int type, float prpx, float prpy, float prpz, float left, float right, float bottom, float top, float front, float back) Type being parallel or pespective, prp is the COP(center of projection) and the rest is the view volume. How would I go about doing this?
Advertisement
By the looks of things, seems there isn''t anyone here that can help you. However! I do suggest that you learn how a projection matrix is built and it shouldn''t give you any problems. A book i''d recommend for this would be "3D Math Primer for Game Development".

Good luck.
MeshMan
Looking at the way the gluPerspective function builds a projection matrix might help. Your post is a little vague. What do you this projection function to do exactly? Also, when you say "parallel projection", do you mean "orthographic projection", as in a 2D projection? You could always use glFrustum to create your projection matrix if gluPerspective is too high-level (ie. you want to specify the left, right, top, bottom, near and far clip planes yourself), but if you don''t post more details, we can''t help...

Windows 95 - 32 bit extensions and a graphical shell for a 16 bit patch
to an 8 bit operating system originally coded for a 4 bit microprocessor,
written by a 2 bit company that can''t stand 1 bit of competition.
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]
It''s actually an assignment where I have to implement a function: "void setProjection(int type, float prpx, float prpy, float prpz, float left, float right, float bottom, float top, float front, float back) - this specifies projections. type is PARALLEL or PERSPECTIVE, prp specifies the COP, and the remaining specify the view volume as in OpenGL."

Thats exactly what I am supposed to do. The only book I have is, "Computer Graphics: Principles and Practice". Gonna have to do some searching in there..

This topic is closed to new replies.

Advertisement