## Triangle.NeighborTriangles

### Description

Returns a TriangleCollection containing all neighbor Triangle objectsfor this triangle.

### C# Syntax

    // get accessor
    TriangleCollection rtn = Triangle.NeighborTriangles;

### Examples

#### VBScript Example

    '
    ' 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

### See Also

TriangleCollection TrianglePoint TrianglePointCollection Geometry