NicogameLog
OpenGLメモ_投影
最終更新:
nico_nonono
-
view
OpenGLメモ
画面への描画方法(投影方法)
透視投影
glOrtho( GLdouble l, GLdouble r, GLdouble b, GLdouble t, GLdouble n, GLdouble f )
引数
l ⇒ ウィンドウ左
r ⇒ ウィンドウ右
b ⇒ ウィンドウ下
t ⇒ ウィンドウ上
n ⇒ ウィンドウ手前
f ⇒ ウィンドウ奥
l ⇒ ウィンドウ左
r ⇒ ウィンドウ右
b ⇒ ウィンドウ下
t ⇒ ウィンドウ上
n ⇒ ウィンドウ手前
f ⇒ ウィンドウ奥
平行投影
gluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar )
引数
foby ⇒ 画角
aspect ⇒ アスペクト比
zNear ⇒ 奥行き(手前)
zFar ⇒ 奥行き(奥)
foby ⇒ 画角
aspect ⇒ アスペクト比
zNear ⇒ 奥行き(手前)
zFar ⇒ 奥行き(奥)
視点を任意に設定
gluLookAt( GLdouble ex, GLdouble ey, GLdouble ez,
GLdouble cx, GLdouble cy, GLdouble cz,
GLdouble ux, GLdouble uy, GLdouble uz )
引数
ex, ey, ez ⇒ 視点の位置
cx, cy, cz ⇒ 見る位置(見る方向、原点とか)
ux, uy, uz ⇒ 表示される画像の上の方向
ex, ey, ez ⇒ 視点の位置
cx, cy, cz ⇒ 見る位置(見る方向、原点とか)
ux, uy, uz ⇒ 表示される画像の上の方向