指定された 2D ジオメトリの位置を取得します。
Geometry2D.CenterPosition( compIdx, compPos ); |
| パラメータ | タイプ | 説明 | ||||
|---|---|---|---|---|---|---|
| compIdx | Integer |
コンポーネントのインデックス
|
||||
| compPos | SIVector3 | 戻されるときに、(compIdx)番目の 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()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
o2DComponent.CenterPosition i, oPos
LogMessage "Component [" & i & "] center position : " & oPos.x & " | " & oPos.y & " | " & oPos.z
next |