Papervision3D の Objects(4) ~ Sphere ~
2007/04/09 22:50 - Papervision3D
PV3D のプリミティブオブジェクト。今回は Sphere を試してみます。
Sphere
Sphere( material : MaterialObject3D = null, radius : Number = 100, // 半径 segmentsW : int = 8, // 水平セグメント数 segmentsH : int = 6, // 垂直セグメント数 initObject : Object = null )
Sphere の segmentsW、segmentsH のそれぞれの最小値はなぜか Cylinder と同じ値になってます。
Sphere もサンプルだけで流します。引数が Cone 同様かなり単純なので。
原型
( ColorMaterial , 100 , 8 , 6 )
|
( BitmapMaterial , 100 , 8 , 6 )
|
segmentsW、segmentsH 変動
( ColorMaterial , 100 , 3 , 2 )
|
( ColorMaterial , 100 , 3 , 3 )
|
( ColorMaterial , 100 , 4 , 4 )
|
( ColorMaterial , 100 , 5 , 5 )
|
( ColorMaterial , 100 , 24 , 12 )
|
( BitmapMaterial , 100 , 24 , 12 )
|
- ソース( SphereTest.zip 4.08 KB 注:イメージファイルは同梱していません)
Cylinder にしても Sphere にしても segmentsW = 24 程度で、充分、円なり球なりに見えますね。
スポンサーサイト