Vertex.NeighborVertices operator

導入

v3.0

詳細

指定された Distance 内にあるすべての近接頂点の Vertex オブジェクトのコレクションを戻します。Distance が 1 の場合、Vertex は反時計回りの順番で戻されます。

C#構文

VertexCollection Vertex.NeighborVertices( Int32 in_lDistance );

スクリプト構文

oReturn = Vertex.NeighborVertices( [Distance] );

戻り値

VertexCollection

パラメータ

パラメータ タイプ 説明
Distance Integer Distance は整数値で、近接度を表わします(たとえば、ある頂点に対して degree=2 とは、その頂点に隣接する頂点に加えて、隣接する頂点に隣接する頂点を意味します)。

デフォルト値: 1

VBScript の例

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

set oGeometry = oCube.ActivePrimitive.Geometry

for each Vertex in oGeometry.Vertices

set oNeighbors = Vertex.NeighborVertices

str = "Vertices neighbors of Vertex(" & Vertex.index & ") are :"

for each n in oNeighbors

str = str & " " & n.index

next

logmessage str

next

関連項目

VertexCollection.NeighborVertices Vertex.NeighborEdges Vertex.NeighborPolygons Vertex.GrowNeighborVertices