


 
 
 
 
 
 
 |
DelphiXE3 [3D-FMX] 2D平面(Plane) 2014/03/18 |
前回は [3D Scene]内の「代理オブジェクト」(ProxyObject)について見てみました。今回は[3D Shapes]内の「2D平面」(Plane)について見てみます。
[3D Shapes]内
FMX |  |
ヘルプより
3D フォームで用いることができる 2D 平面を表します。
TPlane クラスでは、3D FireMonkey フォームに配置できる 2D 平面を実装しています。この平面は、3D の回転と位置揃えをサポートしています。TPlane は、[ツール パレット]から追加することができるビジュアル オブジェクトです。 |

 |
SubdivisionsHeight
この平面の高さ内に(y 軸に沿って)、再分割区分がいくつあるかを示します。
SubdivisionsHeight プロパティは、この平面の高さ内に(y 軸上に)、同一の再分割区分がいくつあるかを示します。 再分割が大量になるにつれ、よりなめらかな表面となります。 SubdivisionsHeight プロパティのデフォルト値は、1 です。 |
SubdivisionsWidth
この平面の幅内に(x 軸に沿って)、再分割区分がいくつあるかを示します。
SubdivisionsWidth プロパティは、この平面の幅内に(x 軸上に)、同一の再分割区分がいくつあるかを示します。 再分割が大量になるにつれ、よりなめらかな表面となります。 SubdivisionsWidth プロパティのデフォルト値は、1 です。 |
|
というわけで、2D平面=2次元有限平面です。
まず、2D平面 Plane1 のサイズが小さいので Width、Heightを 10 にします。
Depth 値を変更して厚みを加えようと変更してみましたが、0.001 値のまま何も出来ませんでした。固定値のようです。
3D-CG 的には、2D平面はまず下面になるイメージがありますので、X軸90°回転(RotationAngle.X=90)を行います。
ライト Light1 を配置し、角度を変えます。平行光源(LightTypeプロパティ=「ltDirectional」)の場合、ライトの位置は無関係です。
[Materials]内の「LightMaterialSource」を配置し、2D平面 Plane1 の MaterialSource プロパティを「LightMaterialSource1」と指定します。
2D平面を親として立方体 Cube1 を配置し、Width、Height の値を「3」にします。Cube1 の 位置は 中心が(0,0,0)点となりますので、平面の上に立方体を載せる状態にしたいので、Cube1 の Position.Z を 1.5 とします。
立方体 Cube1 の MaterialSource プロパティも「LightMaterialSource1」と指定します。
2D平面 Plane1 の RotationAngle.Z 値変更=Z軸回転してみます。
光の当たり方というのが分かると思います。
配置した2D平面をベースとして、ではなく、2D平面も通常のオブジェクトと同様に扱って、親子関係にはしない、という使い方も勿論出来ます。まぁこういった事は、作る人の自由ですね。
|
|
バッチファイル
BASIC
C言語のお勉強
拡張子な話
DOSプログラム
Delphi
>Dehi入門編
>Delphi2010
>DelphiXE3
▲2014/03/17
2014/03/18
▼2014/03/19
シェアウェア
Script!World
データベース
|