Segment.Navigate

導入

v3.0

詳細

ジオメトリのセグメント間を移動できます。

スクリプト 構文

oReturn = Segment.Navigate( Navigation );

戻り値

Segment

パラメータ

パラメータ タイプ 詳細
Navigation siNavigateComponentType 移動方向を選択します。

JScript の例

var obj = ActiveSceneRoot.AddGeometry( "Cube", "MeshSurface" );
var segment = obj.ActivePrimitive.Geometry.Segments(7);
LogMessage( "The first segment of this geometry is of index " + segment.Navigate(siFirstComponent).Index );
LogMessage( "The last segment of this geometry is of index " + segment.Navigate(siLastComponent).Index );
LogMessage( "The next segment is of index " + segment.Navigate(siNextComponent).Index );
LogMessage( "The previous segment is of index " + segment.Navigate(siPreviousComponent).Index );
// Expected result:
//INFO : The first segment of this geometry is of index 0
//INFO : The last segment of this geometry is of index 11
//INFO : The next segment is of index 8
//INFO : The previous segment is of index 6

関連項目

SegmentCollection.Navigate Geometry.Segments