Setting up Projections
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?
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
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.
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.
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..
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
Popular Topics
Advertisement