指定された0Dコンポーネントの平均位置を取得します。
Geometry0D.AveragePosition( compIdxArray, compPos ); |
| パラメータ | タイプ | 詳細 | ||||
|---|---|---|---|---|---|---|
| compIdxArray | Integer値のArray | 0Dコンポーネントのインデックスの配列
|
||||
| compPos | SIVector3 | 戻されるときに、指定された0Dコンポーネントの平均位置が含まれます。 |
'Create a cube
CreatePrim "Cube", "MeshSurface"
set oSelList = GetValue("SelectionList")
set oItem = oSelList(0)
set oGeometry = oItem.obj
oNb0D = oGeometry.Nb0D
set o0DGeometry = oGeometry.Geometry0D
set oPos = XSIMath.CreateVector3()
' Construct an array containing the indices 0,1,2,3
dim oIndicesArray
oIndicesArray = Array( 0, 1, 2, 3 )
o0DGeometry.AveragePosition oIndicesArray, oPos
LogMessage "Average position of Component (0, 1, 2, 3) : " & oPos.x & " | " & oPos.y & " | " & oPos.z
|