Cluster.FindIndices

Description

Searches the cluster for the specified geometry indices and returns the corresponding cluster indices.

Scripting Syntax

oArray = Cluster.FindIndices( Geometry indices );

Return Value

Returns an Array of the same size as the array specified in the Geometry indices parameter. If the specified index (each member of the Geometry indices array) exists in the cluster, the corresponding cluster index is returned; otherwise -1 is returned.

Parameters

Parameter Type Description
Geometry indices Array 1D Array containing geometry indices.

Examples

VBScript Example

set oGrid = ActiveSceneRoot.AddGeometry("Grid","MeshSurface")
set oCluster = oGrid.ActivePrimitive.Geometry.AddCluster(siVertexCluster, "PointClusterOnGrid" )
geometryindices = oGrid.ActivePrimitive.Geometry.Polygons(0).Points.IndexArray
indices =   oCluster.FindIndices(geometryindices)
for i = lbound(indices) to ubound(indices)
        LogMessage "Cluster index for geometry index " & geometryindices(i) & " is : " & indices(i)
next

See Also

Cluster.Elements Cluster.FindIndex