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