ApplyHairOp

導入

v2.0

詳細

指定されたオブジェクトにヘア ジオメトリを追加します。

スクリプト構文

oReturn = ApplyHairOp( in_Objs, PresetObj );

戻り値

ヘア オブジェクトを X3DObject として戻します。

パラメータ

パラメータ タイプ 説明
in_Objs 選択リスト 変更するオブジェクトを指定します。
PresetObj 文字列 ヘア ジオメトリのプリセット: "Hair-Default"のみがサポートされています。

デフォルト値:"Hair-Default" (デフォルトのヘア プリセット)

1. VBScript の例

' Create a grid and generate hairs from it.

CreatePrim "Grid", "MeshSurface"

ApplyHairOp

2. JScript の例

//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

関連項目

ApplyOperator ApplyOp ApplyGenOp ApplyTopoOp