v2.0
指定されたオブジェクトにヘア ジオメトリを追加します。
oReturn = ApplyHairOp( in_Objs, PresetObj ); |
ヘア オブジェクトを X3DObject として戻します。
| パラメータ | タイプ | 説明 |
|---|---|---|
| in_Objs | 選択リスト | 変更するオブジェクトを指定します。 |
| PresetObj | 文字列 |
ヘア ジオメトリのプリセット: "Hair-Default"のみがサポートされています。 デフォルト値:"Hair-Default" (デフォルトのヘア プリセット) |
' Create a grid and generate hairs from it. CreatePrim "Grid", "MeshSurface" ApplyHairOp |
//Demonstrate how to create Hair and then access it in the Object Model
newscene("",false) ;
var oGrid = ActiveSceneRoot.AddGeometry( "Grid", "MeshSurface", "HairyGrid" ) ;
// Add hair to the grid
ApplyHairOp( oGrid ) ;
// The newly created hair object can be retrieved as a
// child of the Grid
var oHair = oGrid.Children.Item( "Hair" ) ;
// Actual interesting parameters of the hair are found on the Primitive
var oHairPrim = oHair.ActivePrimitive ;
// Turn on display of the actual hairs
oHairPrim.Parameters( "DisplayType" ).Value = 1
oHairPrim.Parameters( "FrizzRoot" ).Value = 5
oHairPrim.Parameters( "FrizzTip" ).Value = 80 |