Geometry0D.Normal

説明

指定された0Dコンポーネントの法線を取得します。

スクリプト構文

oBoolean = Geometry0D.Normal( compIdx, compNor );

戻り値

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

パラメータ

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

指定可能な値:

説明:

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

VBScript の例

'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 oNor = XSIMath.CreateVector3()

' Loop on all the 0D Component

for i = 0 to oNb0D - 1

if o0DGeometry.Normal( i, oNor ) then

LogMessage "Component [" & i & "] normal : " & oNor.x & " | " & oNor.y & " | " & oNor.z 

end if 

next

関連項目

Geometry0D.AverageNormal Geometry0D Geometry_V1.Nb0D SIVector3