WaterSpaceWarp: SpacewarpObject

   

WaterSpaceWarp - superclass: SpacewarpObject; super-superclass:Node - classID: #(1192955369, 72894388) 

リアクタ ダイナミック システムは廃止され、3ds Max 2012 から削除されました

   

> MAXWrapper > ノード > SpacewarpObject > WaterSpaceWarp

   

説明:

WaterSpaceWarp を使用して液体のボディの動作をシミュレートできます。水のサイズや、密度、波の速度、粘性などの物理的なプロパティを指定できます。

   

コンストラクタ:

WaterSpaceWarp ... rctWaterWSMObject ... 

   

プロパティ:

.sizeX (Size_X) : float 
.sizeY (Size_Y) : float 

水の次元を取得/設定します。

   

.subdivisionsX (Subdivisions_X) : integer 
.subdivisionsY (Subdivisions_Y) : integer 

水のサブディビジョンを取得/設定します。

   

.useLandscape (Landscape) : boolean 

true に設定すると、横置きのリジッド ボディが考慮されます。

   

.landscape: node 

横置きのリジッド ボディを取得/設定します。

   

.waveSpeed (Wave_Speed) : float 

波頂が水のサーフェス全体に伝播する速度を取得/設定します。

   

.minRipple (Min_Ripple) : float 
.maxRipple(Max_Ripple) : float 

水中で生成される水のサイズの境界を取得/設定します。

   

.density: float 

液体の密度を取得/設定します。これによって、水中に沈められるオブジェクトや、密度の低いオブジェクトが浮き上がってくる高さを決定します。既定値の密度は、実際の水の密度である 1.0 です。

   

.viscosity: float 

流れに対する抵抗、つまり、オブジェクトが液体中を移動するときの難易度を取得/設定します。値が大きいと、水中のオブジェクトのモーションが大きく減衰することになります。

   

.showText (Show_Text) : boolean 

true (既定値)に設定すると、ビューポート内のスペース ワープのそばに[水](Water)というラベルが表示されます。

   

.useCurrentState (Use_Current_State) : boolean 
.disabled: boolean 

true に設定すると、シミュレーションではスペース ワープが考慮されません。

   

.useDepth(Use_Depth) : boolean 

true に設定すると、シミュレーションでは深度の値が考慮されません。

   

.depth(Density) : float 

水の深度を取得/設定します。浮力は、水の深度内にあるオブジェクトだけに適用されます。

   

インタフェース:

Interface:rctWaterInterface 

メソッド:

<float>getNumKeyframes() 

キーフレームの数を返します。

   

<time by value array>getKeyframeTimes() 

キーフレーム タイムの配列を返します。

   

<float by value array>getWaterHeightsAtTime <time>time 

指定した時間の高さの値の配列を返します。

   

<boolean>setWaterHeightsAtTime <time>time <&float array>heights 

heights は入/出力パラメータです

指定した時間の高さの値を、参照渡しの配列によって指定された値に設定します。

   

<void>clearStoredKeyframes() 

保存されているキーフレームをクリアします。

   

<integer>getPointIndex <integer>xIndex <integer>yIndex 

行 xIndex および列 yIndex のポイントのインデックスを返します。

例:

w = $Water01--get an existing WaterSpaceWarp
w.clearStoredKeyframes()--clear any existing keyframes
fort = 0to100by2do--animate from frame 0 to 100 with step 2
(
heights = #()--init. an array to store heights
forx = 0tow.subdivisionsXdo--loop through X subdivisions
(
fory = 0tow.subdivisionsYdo--loop through Y subdivisions
(
--get the index of the vertex at the specified X and Y subdivision:
index = w.getPointIndex x y
--calculate a height value based on sine of time and X position:
newheight = 10 * sin ((10.0*t+x*20.0))
append heights newheight--add height to the array
)--end y loop
)--end x loop 
w.setWaterHeightsAtTime t &heights--assign heights at current time
sliderTime = t--watch the process in viewport
)--end t loop
 
w.getNumKeyframes()--show the number of keyframes
print ( w.getWaterHeightsAtTime 0 )--print the heightsonframe 0

関連事項