AverageNormal (Geometry0D)

Description

Get the average normal of given 0D Component

Scripting Syntax

Geometry0D.AverageNormal( compIdxArray, compNor )

Parameters

Parameter

Type

Description

compIdxArray

Array of Integer values

An array of indices of 0D Component

Possible Values:

0 <= compIdxArray(i) < Number of 0D Component: Each index in the array must be valid

compNor [in/out]

SIVector3

Upon return, contains the average normal of the given 0D Component

Return Value

Boolean True if the average normal is valid; otherwise False

Examples

VBScript Example

'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()
' Construct an array containing the indices 0,1,2,3
dim oIndicesArray
oIndicesArray = Array( 0, 1, 2, 3 )
if o0DGeometry.AverageNormal( oIndicesArray, oNor ) then
LogMessage "Average normal of Component (0, 1, 2, 3) : " & oNor.x & " | " & oNor.y & " | " & oNor.z 
end if

See Also

Geometry0D.Normal

Geometry0D

SIVector3



Autodesk Softimage v7.5