Archived

This topic is now archived and is closed to further replies.

Setting up Projections

This topic is 5000 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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..

Share this post


Link to post
Share on other sites