• Advertisement
Sign in to follow this  

how to calculate 3d rectangle's coordinate by camera

This topic is 3459 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

when a 3d rectangle pretend to be a 2d plane,how can I get correspond coordinate while the camera is dynamic? for example:I create a retangle P1:-960,-540,0 P2:-960 ,540,0 P3: 960, 540,0 P4: 960,-540,0 glBegin(QUADS) glVertex3f(-960,-540,0); glVertex3f(-960,540,0); glVertex3f(960,540,0); glVertex3f(960,-540,0); glEnd() my viewport width is 1920 and height is 1080 and I wish it look like a 2d plane, so how can I get exactly coordinate let rectangle look like a 2d plane and filled of screen? now I am using a stupid method, adjust position of camera,and let it look like a 2D plane,but this is quite stupid :( may someone explain how I can calculate 3d coordinate? I knew how to rending it by 2D,but I wanna using a flying plane into screen,and it could exactly filled the screen. thanks for any advice :)

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement