このトライアングルポイントの Color オブジェクトを戻します。戻される R、G、B、A 値は正規化されず、0 ~255 までの値を取ります。
// get accessor Color rtn = TrianglePoint.Color; |
' 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 |