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