物体の幾何変換(移動、回転など)

1. Transform


Transform は、物体の幾何変換を記述するために用います。
Transform と書いて、その後に { } をつけて、
{ } の中に幾何変換(移動、回転など)を書きます。

Transform の中に書くことのできるデータとして、例えば、

  • translation - 平行移動
  • rotation - 回転
  • scale - 拡大縮小
などがあります。

幾何変換の対象となる物体は、Transform の後の { } の中に
children と書いて、その後に [ ] をつけて、その中に書きます。


こんな感じで Transform を記述します。


 #VRML V2.0 utf8

 Transform {
   translation 
   rotation
   scale
   children [
    Shape {
      geometry Cylinder { }
    }
   ]
 }


まずは平行移動から ...


目次に戻る