PolygonNodeCollection.IndexArray.1.vbs Example
Applies To
PolygonNodeCollection.IndexArray property
Description
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.
Code
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
nextKeywords
PolygonNodeCollection IndexArray
Autodesk Softimage 2011