TrianglePoint.Color

TrianglePoint.Color

説明

このトライアングルポイントの Color オブジェクトを戻します。戻される R、G、B、A 値は正規化されず、0 ~255 までの値を取ります。

C#構文

// get accessor

Color rtn = TrianglePoint.Color;

VBScript の例

' This example illustrates how to enumerate the triangles

' of a polygon mesh and print out the RGBA values at each

' triangle vertex

set oRoot = Application.ActiveProject.ActiveScene.root

set oCube = oRoot.AddGeometry( "Cube", "MeshSurface" )

CreateVertexColorSupport ,, oCube

set oGeometry = oCube.activeprimitive.geometry

set oTriangles = oGeometry.Triangles

for each oTriangle in oTriangles

	logmessage oTriangle.Name 

	for each oVertex in oTriangle.Points

		set oColor = oVertex.Color

		logmessage vbTab & "RGBA(" & _

			oColor.red & "," & _

			oColor.green & "," & _

			oColor.blue & "," & _

			oColor.alpha & ")"

	next

next

関連項目

TrianglePoint.ColorArray Triangle TriangleCollection TrianglePointCollection Geometry