Searches the cluster for the specified geometry indices and returns the corresponding cluster indices.
Object Cluster.FindIndices( Object vItems ); |
oArray = Cluster.FindIndices( Geometry indices ); |
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.
Parameter | Type | Description |
---|---|---|
Geometry indices | Array | 1D Array containing geometry indices. |
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 |