PolygonNodeCollection.NormalArray operator

説明

このコレクション内の各 PolygonNode の x,y,z 法線値を含む2D Arrayを戻します。

C#構文

// get accessor

Object rtn = PolygonNodeCollection.NormalArray;

VBScript の例

' This example illustrates how to print out the

' polygon node normals

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

	for i=LBound( aNormalArray, 2 ) to UBound( aNormalArray, 2 )

		logmessage  "   Node[" & i & "].Normal = " &  _

			aNormalArray(0,i) & "," & aNormalArray(1,i) & "," & aNormalArray(2,i)

	next	

next