FindIndices (Cluster)

Description

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

Scripting Syntax

Cluster.FindIndices( Geometry indices )

C# Syntax

Object Cluster.FindIndices( Object vItems );

Parameters

Parameter

Type

Description

Geometry indices

Array

1D Array containing 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.

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



SOFTIMAGE|XSI v6.01     

Return to Softimage XSI Index