Triangle.NeighborTriangles

Triangle.NeighborTriangles

説明

このトライアングルのすべての隣接Triangleオブジェクトを含むTriangleCollectionを戻します。

C#構文

// get accessor

TriangleCollection rtn = Triangle.NeighborTriangles;

VBScript の例

'

' This example illustrates how to enumerate the neighbors of

' each triangle in the polygonmesh

'

NewScene , false

set oRoot = Application.ActiveSceneRoot

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

set oGeometry = oCube.ActivePrimitive.Geometry

set oTriangles = oGeometry.Triangles

for each oTriangle in oTriangles

	Application.LogMessage oTriangle.name

	for i=0 to oTriangle.NeighborTriangles.Count - 1

		Application.LogMessage vbTab & oTriangle.NeighborTriangles(i).Name

	next

next

' Expected results:

'INFO : Triangle0

'INFO : 	Triangle5

'INFO : 	Triangle9

'INFO : 	Triangle1

'...

'INFO : Triangle11

'INFO : 	Triangle10

'INFO : 	Triangle8

'INFO : 	Triangle4

関連項目

TriangleCollection TrianglePoint TrianglePointCollection Geometry