フロー: GeometryClass

Flow - superclass: GeometryClass; super-superclass:node - 9:0 - classID: #(164197351, 608853532)

パス フロー オブジェクトを MAXScript に公開します。Populate ツールセットの一部です。

3ds Max 2014 以降で使用可能です。

コンストラクタ:

Flow... PathFlow...

プロパティ:

<Flow>.showLanes     BooleanClass    default: true   --  boolean

フローでの車線の表示を取得/設定します。

<Flow>.width     Float    default: 275.591   --  float

システム単位でのフローの幅を取得/設定します。

<Flow>.laneWidth     Float    default: 51.1811   --  float

システム単位での車線の幅を取得/設定します。

[人] (People)コントロール グループ

<Flow>.density     Float    default: 0.25   --  float

[密度] (Density)スライダの値を取得/設定します。

スライダの値は 0.0 ~ 1.0 の範囲です。

1.0 より大きい値は MAXScript を使用して指定することができます。

既定値は 0.25 です。

<Flow>.gender     Float    default: 0.5   --  float

[性別] (Gender)スライダの値を取得/設定します。

既定値は 0.5 で、男性が 50%、女性が 50% であることを意味します。

有効な値は 0.0 (すべて男性)から 1.0 (すべて女性)の範囲です。

<Flow>.direction     Name    default: #HugLeft   --  enum
<Flow>.directionIndex     Integer    default: 2   --  integer

[方向] (Direction)スライダの値を、列挙名または整数値として取得/設定します。

.direction プロパティは PathFlow インタフェースによって公開されます - このページで詳細を参照してください。

有効な値は次のとおりです。

.directionIndex .direction 列挙名 UI スライダ値
1 #forward 方向: 順方向
2 (既定値) #hugLeft 方向: 左に沿進
3 #weaveLeft 方向: 左に縫うように進む
4 #weaveRight 方向: 右に縫うように進む
5 #hugRight 方向: 右に沿進
6 #backward 方向: 後方向
<Flow>.positionSample     Integer    default: 1   --  integer

[位置サンプル](Positions Samples)の値を取得/設定します。既定値は 1 です。

<Flow>.genderSample     Integer    default: 1   --  integer

[性別サンプル](Gender Samples)の値を取得/設定します。既定値は 1 です。

フロー インタフェース:

Interface: PathFlow

プロパティ:

.direction : enum : Read|Write
    direction enums: {#Forward|#HugLeft|#WeaveLeft|#WeaveRight|#HugRight|#Backward}

[方向] (Direction)スライダの値を、列挙名として取得/設定します。

メソッド:

<integer><Flow>.NumPoints()

フロー内のポイント数を返します。

<point3 by value><Flow>.GetPoint <integer>index

インデックスで指定されたフロー ポイントの位置を返します。

インデックスの基数は 1 です。

<void><Flow>.AddPoint <point3>point

指定の位置を持つ新しい点をフローの終端に追加します。

<boolean><Flow>.InsertPoint <integer>index <point3>point

インデックスで指定された位置の新しい点を、最初の引数により指定されたフロー内の、2 番目の引数で指定された位置に挿入します。

インデックスの基数は 1 です。

成功した場合は true を、失敗した場合は false を返します。

<boolean><Flow>.SetPoint <integer>index <point3>point

最初の引数によって指定された、インデックスで指定された点の位置を 2 番目の引数によって指定された座標に設定します。

インデックスの基数は 1 です。

成功した場合は true を、失敗した場合は false を返します。

<boolean><Flow>.DeletePoint <integer>index

インデックスで指定された点をフローから削除します。

インデックスの基数は 1 です。

成功した場合は true を、失敗した場合は false を返します。

<boolean><Flow>.CreateRamp <integer>index

インデックスで指定されたポイントでランプを作成します。

インデックスの基数は 1 です。

成功した場合は true を、失敗した場合は false を返します。

<boolean><Flow>.DeleteRamp <integer>index

インデックスで指定されたポイントでランプを削除します。

インデックスの基数は 1 です。

成功した場合は true を、失敗した場合は false を返します。

<float><Flow>.GetCreasePercent <integer>index

インデックスで指定されたランプ ポイントで折り目を作成します。

インデックスの基数は 1 です。

[パーセント] (percent)値は実際には、範囲が 0.0 ~ 1.0 の浮動小数点として表現されます。

0.0 の値は、ランプがないことを意味します。

<boolean><Flow>.SetCreasePercent <integer>index <float>percent

インデックスで指定されたポイントで、折り目の値に指定された浮動小数点値を設定します。

インデックスの基数は 1 です。

[パーセント] (percent)値は実際には、範囲が 0.0 ~ 1.0 の浮動小数点として表現されます。

インデックスで指定されたポイントがランプの一部である場合に、成功した場合は true を返します。

たとえば、ランプ ポイントに 0.0 の折り目を、 または非ランプ ポイントに 0.0 より大きい値の折り目を設定しようとした場合などに、失敗した場合は false を返します。

例:

    theFlow = Flow() --Create a Flow object
    --> $Flow:Flow001 @ [0.000000,0.000000,0.000000]
    theFlow.AddPoint [0,0,0] --Add some points
    --> true
    theFlow.AddPoint [1000,0,0]
    --> true
    theFlow.AddPoint [2000,1000,0]
    --> true
    theFlow.AddPoint [2000,2000,0]
    --> true
    theFlow.NumPoints() --Check the number of points
    --> 4
    theFlow.GetPoint 1 --Get the first points
    --> [0, 0, 0]
    theFlow.InsertPoint 3 [1500,1000,0] --Insert a new point between the second and third points
    --> true
    theFlow.DeletePoint 3 --Delete the new third point
    --> true
    theFlow.InsertPoint 3 [1700,800,0] --Insert a different new point between the second and third points
    --> true
    classof theFlow  -- Evaluate object state, calls ComputeSides
    --> true
    theFlow.CreateRamp 3 --Create a Ramp at the third point - this will introduce new points 4 and 5
    --> true
    theFlow.SetPoint 3 ((theFlow.getPoint 3) + [0,0,100]) --Lift the third point by 100 units along +Z
    --> true

    --Print the Crease values:
    for i = 1 to theFlow.NumPoints() do format "%: %\n" i (theFlow.GetCreasePercent i)
    --> 1: 0.0
    --> 2: 0.0
    --> 3: 0.0
    --> 4: 0.33
    --> 5: 0.66
    --> 6: 0.0
    --> 7: 0.0
    --> OK

    theFlow.SetCreasePercent 1 0.25 --Cannot set a non-ramp point to a non-zero crease value
    --> false
    theFlow.SetCreasePercent 4 0.0  --cannot set a ramp point to a zero value
    --> false

    theFlow.SetCreasePercent 4 0.25 --can set ramp points to non-zero values
    --> true
    theFlow.SetCreasePercent 5 0.75
    --> true

    theFlow.DeleteRamp 3 --Cannot delete the Ramp at the 3rd point
    --> false
    theFlow.DeleteRamp 4 --But it is ok to delete it at the 4th
    --> true