Main Content

camlookat

オブジェクトまたはオブジェクトのグループに向けてカメラを配置

構文

camlookat(object_handles)
camlookat(axes_handle)
camlookat

説明

camlookat(object_handles) は、ベクトル object_handles 内で識別されるオブジェクトにカメラを向けます。このベクトルには、座標軸の Children のハンドルを含めることができます。

camlookat(axes_handle) は、axes_handle で識別される座標軸の子であるオブジェクトにカメラを向けます。

camlookat は、相対的な視点の方向とカメラ画角を保持しながら、カメラの位置とカメラのターゲットを移動して、現在の座標軸内にあるオブジェクトにカメラを向けます。観測されるオブジェクト (単数または複数) は、座標軸の位置を設定する四角形をほぼ満たします。表示を変更するため、camlookat は座標軸の CameraPosition プロパティおよび CameraTarget プロパティを設定します。

すべて折りたたむ

3 つの球を作成します。次に、データの縦横比、視点および投影タイプを設定します。

[x,y,z] = sphere;
s1 = surf(x,y,z);
hold on
s2 = surf(x+3,y,z+3);
s3 = surf(x,y,z+6);

daspect([1 1 1])
view(30,10)
camproj perspective

Figure contains an axes object. The axes object contains 3 objects of type surface.

s1 を中心にシーンを構成します。

camlookat(s1)

Figure contains an axes object. The axes object contains 3 objects of type surface.

s2 を中心にシーンを構成します。

camlookat(s2)

Figure contains an axes object. The axes object contains 3 objects of type surface.

s3 を中心にシーンを構成します。

camlookat(s3)

Figure contains an axes object. The axes object contains 3 objects of type surface.

バージョン履歴

R2006a より前に導入