PolygonNodeCollection.IndexArray operator

説明

このコレクション内の各PolygonNodeのインデックスを含むArrayを戻します。

VBScript の例

' This example illustrates how to print out the
' polygon node indices for each polygon this can be
' useful when trying to map vertexcolors to polygonnodes
' since the sample point cluster containing the 
' vertex color cluster property maps cluster
' elements to polygon node indices.
set oObject = Application.ActiveProject.ActiveScene.Root.AddGeometry("Cube","MeshSurface")
set oPolygonMesh = oObject.ActivePrimitive.Geometry
for each oPolygonFace in oPolygonMesh.Polygons  
        logmessage "Polygon[" & oPolygonFace.Index & "]"
        aNormalArray = oPolygonFace.Nodes.NormalArray
        i=0             
        for each oPolygonNode in oPolygonFace.Nodes
                logmessage  "   Node[" & i & "].Index = " &  oPolygonNode.Index
                i=i+1
        next    
next