Geometry2D.SubComponent0D2DNormal

説明

指定された2Dジオメトリにある指定された0D2D SubComponent の法線を取得します。

スクリプト 構文

oBoolean = Geometry2D.SubComponent0D2DNormal( compIdx, subCompIdx, compNor );

戻り値

Boolean。法線が有効の場合は True、無効の場合は false

パラメータ

パラメータ タイプ 詳細
compIdx Integer コンポーネントのインデックス

指定可能な値:

説明:

0 <= compIdx < 2D コンポーネントの数 compIdx は有効である必要があります。
subCompIdx Integer サブコンポーネントのインデックス

指定可能な値:

説明:

0 <= compIdx < 2D コンポーネント内の 0D2D サブ コンポーネントの数 subCompIdx は有効である必要があります。
compNor SIVector3 戻されるときに、(compIdx)番目の 2Dコンポーネントにある、(subCompIdx)番目の0D2D SubComponent の法線が含まれます。

VBScript の例

'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 oNor = XSIMath.CreateVector3()
' Loop on all the 2D Component
for i = 0 to oNb2D - 1
oNb0D2DSubComp = o2DComponent.Nb0D2D( i )
for j = 0 to oNb0D2DSubComp - 1
if o2DComponent.SubComponent0D2DNormal( i, j, oNor ) then
LogMessage "Component [" & i & "] SubComponent [" & j & "] normal : " & oNor.x & " | " & oNor.y & " | " & oNor.z 
end if 
next
next

関連項目

Geometry2D.SubComponent0D2D Geometry2D.Nb0D2D Geometry2D Geometry_V1.Nb2D SIVector3