Sample.Navigate

Introduced

v3.0

Description

Allows you to navigate through the Sample of the associated geometry.

Scripting Syntax

oReturn = Sample.Navigate( Navigation );

Return Value

Sample

Parameters

Parameter Type Description
Navigation siNavigateComponentType Select the direction of navigation.

Examples

VBScript Example

set oObj = ActiveSceneRoot.addgeometry( "Cube", "MeshSurface" )
set oSample = oObj.ActivePrimitive.Geometry.Samples(7)
LogMessage "The first sample of this geometry is of index " & oSample.Navigate(siFirsComponent).Index
LogMessage "The last sample of this geometry is of index " & oSample.Navigate(siLastComponent).Index
LogMessage "The next sample is of index " & oSample.Navigate(siNextComponent).Index
LogMessage "The previous sample is of index " & oSample.Navigate(siPreviousComponent).Index
' Expected results:
'INFO : The first sample of this geometry is of index 8
'INFO : The last sample of this geometry is of index 23
'INFO : The next sample is of index 8
'INFO : The previous sample is of index 6

See Also

SampleCollection.Navigate Geometry.Samples