وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای - تأسیس شده در سال 1396
وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای

وبلاگ رسمی علیرضا شهامت در بلاگ اسکای - تأسیس شده در سال 1396

Camera/View space

Camera

In the previous tutorial we discussed the view matrix and how we can use the view matrix to move around the scene (we moved backwards a little). OpenGL by itself is not familiar with the concept of a camera, but we can try to simulate one by moving all objects in the scene in the reverse direction, giving the illusion that we are moving.

In this tutorial we'll discuss how we can set up a camera in OpenGL. We will discuss an FPS-style camera that allows you to freely move around in a 3D scene. In this tutorial we'll also discuss keyboard and mouse input and finish with a custom camera class.

Camera/View space

When we're talking about camera/view space we're talking about all the vertex coordinates as seen from the camera's perspective as the origin of the scene: the view matrix transforms all the world coordinates into view coordinates that are relative to the camera's position and direction. To define a camera we need its position in world space, the direction it's looking at, a vector pointing to the right and a vector pointing upwards from the camera. A careful reader might notice that we're actually going to create a coordinate system with 3 perpendicular unit axes with the camera's position as the origin.

نظرات 0 + ارسال نظر
برای نمایش آواتار خود در این وبلاگ در سایت Gravatar.com ثبت نام کنید. (راهنما)
ایمیل شما بعد از ثبت نمایش داده نخواهد شد