Processing (BETA) version 135+ のリファレンスです。 旧バージョン使用者はソフトウェア内のリファレンスを参照してください。
この文書は Processing のAPIリファレンスを日本語に訳したものです。 最新の内容は 英語版 で確認して下さい。


Name

camera()

Examples
example pic
size(100, 100, P3D);
noFill();
background(204);
camera(70.0, 35.0, 120.0, 50.0, 50.0, 0.0, 
       0.0, 1.0, 0.0);
translate(50, 50, 0);
rotateX(-PI/6);
rotateY(PI/3);
box(45);
Description カメラの位置を設定することで場面の中心に視点を移動します。 軸は上方向に伸びています。 視点とそれが指し示す位置(場面の中心)を移動することでイメージを異なる角度から見ることができます。 パラメタを持たないバージョンではカメラをデフォルト位置に設定します。

デフォルト位置はy軸が上向きでディスプレイウィンドウの中心を指します。 デフォルト値は camera(width/2.0, height/2.0, (height/2.0) / tan(PI*60.0 / 360.0), width/2.0, height/2.0, 0, 0, 1, 0) です。 この機能は OpenGL の gluLookAt() と似ていますが最初に現在のカメラ設定をクリアします。
Syntax
camera()
camera(eyeX, eyeY, eyeZ, centerX, centerY, centerZ, upX, upY, upZ)
Parameters
eyeX float: x coordinate for the eye
eyeY float: y coordinate for the eye
eyeZ float: z coordinate for the eye
centerX float: x coordinate for the center of the scene
centerY float: y coordinate for the center of the scene
centerZ float: z coordinate for the center of the scene
upX float: usually 0.0, 1.0, or -1.0
upY float: usually 0.0, 1.0, or -1.0
upZ float: usually 0.0, 1.0, or -1.0
Usage Web & Application
Related camera()
endCamera()
frustum()
Updated on September 23, 2006 05:40:10pm PDT

Creative Commons License

この文書の原文はクリエイティブ・コモンズ(Creative Commons)Attribution-Noncommercial-Share Alike(表示・非営利・継承) ライセンスで公開されています。 このライセンスは同一の許諾条件の下で原作者のクレジットを表示し、また作品を営利目的で利用しなければ、作品に対して複製、頒布、展示、実演、二次的著作物の作成が行えることを示します。

© 2007 Processing.org