'\" e '\"! eqn | mmdoc '\"macro stdmacro .ds Vn Version 1.2 .ds Dt 6 March 1997 .ds Re Release 1.2.0 .ds Dp May 02 11:53 .ds Dm 37 lookat.gl .ds Xs 1014 4 lookat.gl .\" .\" Copyright (c) 2001 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Mon Sep 10 12:44:40 JST 2001 .\" by FUJIWARA Teruyoshi .\" .TH GLULOOKAT 3G .SH 名前 .B "gluLookAt .\"0 \- define a viewing transformation \- ビューイング変換を定義する .SH 書式 void \f3gluLookAt\fP( GLdouble \fIeyeX\fP, .nf .ta \w'\f3void \fPgluLookAt( 'u GLdouble \fIeyeY\fP, GLdouble \fIeyeZ\fP, GLdouble \fIcenterX\fP, GLdouble \fIcenterY\fP, GLdouble \fIcenterZ\fP, GLdouble \fIupX\fP, GLdouble \fIupY\fP, GLdouble \fIupZ\fP ) .fi .EQ delim $$ .EN .SH 引き数 .TP \w'\f2eyeX\fP\ \f2eyeY\fP\ \f2eyeZ\fP\ \ 'u \f2eyeX\fP, \f2eyeY\fP, \f2eyeZ\fP .\"0 Specifies the position of the eye point. 視点の位置を指定する。 .TP \f2centerX\fP, \f2centerY\fP, \f2centerZ\fP .\"0 Specifies the position of the reference point. 参照点の位置を指定する。 .TP \f2upX\fP, \f2upY\fP, \f2upZ\fP .\"0 Specifies the direction of the \f2up\fP vector. \f2up\fP ベクトルの方向を指定する。 .SH 説明 .\"0 \%\f3gluLookAt\fP creates a viewing matrix derived from an eye point, a reference .\"0 point indicating the center of the scene, and an \f2UP\fP vector. \%\f3gluLookAt\fP は視点、シーンの中心を示す参照点、 \f2UP\fP ベクトルからビューイング行列を作る。 .P .\"0 The matrix .\"0 maps the reference point to the negative \f2z\fP axis and the .\"0 eye point to the origin. この行列は参照点を \f2z\fP 軸上(座標が負の範囲)にマップし、 視点を原点にマップする。 .\"0 When a typical projection matrix is used, .\"0 the center of the scene therefore maps to the center of the viewport. したがって、普通の射影行列が使われているときは、シーンの 中心はビューポートの中心にマップされる。 .\"0 Similarly, the direction described by the \f2UP\fP .\"0 vector projected onto the viewing plane is mapped to the positive \f2y\fP .\"0 axis so that it points upward in the viewport. 同様に、ビューイング平面上に投影される \f2UP\fP ベクトルが示す方向は、 \f2y\fP 軸上(座標が正の範囲)にマップされる。 この際の方向は、ビューポート内で上を向くようにされる。 .\"0 The \f2UP\fP vector must not be parallel to the line of sight from the .\"0 eye point to the reference point. \f2UP\fP ベクトルは、視点と参照点を結ぶ視線と平行になってはならない。 .P .\"0 Let 行列 .sp .EQ F ~=~ left ( down 20 { ~ matrix { ccol {"centerX" above "centerY" above "centerZ"} ccol { ~-~ above ~-~ above ~-~} ccol {"eyeX" above "eyeY" above "eyeZ"} } } ~~ right ) .P とし、 .EN .sp .\"0 Let \f2UP\fP be the vector $("upX", "upY", "upZ")$. \f2UP\fP をベクトル $("upX", "upY", "upZ")$ とする。 .P .\"0 Then normalize as follows: この場合、正規化は次のようになされる: .EQ f ~=~ F over {|| F ||} .EN .P .EQ UP sup prime ~=~ UP over {|| UP ||} .EN .sp .P .\"0 Finally, let $s ~=~ f ~times~ UP sup prime$, and $u ~=~ s ~times~ f$. 最後に、$s ~=~ f ~times~ UP sup prime$, $u ~=~ s ~times~ f$ とする。 .P .sp .\"0 M is then constructed as follows: すると M は次のように組み立てられる: .EQ M ~=~ left ( matrix { ccol { ~s[0] above ~u[0] above -f[0] above 0 } ccol { ~s[1] above ~u[1] above -f[1] above 0 } ccol { ~s[2] above ~u[2] above -f[2] above 0 } ccol { 0 above 0 above 0 above 1 } } ~~right ) .EN .P .\"0 and \%\f3gluLookAt\fP is equivalent to また、\%\f3gluLookAt\fP は .Ex glMultMatrixf(M); glTranslated (-eyex, -eyey, -eyez); .P と等価である。 .Ee .SH 関連項目 \f3glFrustum\fP, \%\f3gluPerspective\fP