Geometry.AddCluster
 
 
 

Geometry.AddCluster

Description

Creates and adds a cluster to the Geometry object. If you do not pass an index array, all the geometry elements will be included in the cluster, and this cluster will always be maintained as complete even when the topology of the geometry changes. To create an empty cluster, pass an empty index array. Otherwise, pass an index array to create the cluster you want.

Notice that some ClusterProperty types can only be added to clusters that are always-complete (see Cluster.IsAlwaysComplete). These types are vertex color, uv, symmetry map and user motion properties.

C# Syntax

Cluster Geometry.AddCluster( String in_Type, String in_name, Object in_Indices );

Scripting Syntax

oReturn = Geometry.AddCluster( Type, [Name], [Indices] );

Return Value

Cluster

Parameters

Parameter Type Description
Type ClusterTypes Cluster type
Name String Cluster name. When not specified, the name will be the cluster type.
Indices Variant Array of indices to add to the cluster. If not specified, an always-complete cluster is created (see Cluster.IsAlwaysComplete). To create an empty cluster, pass an empty array.

Examples

VBScript Example

set oGrid = Application.ActiveProject.ActiveScene.Root.AddGeometry("Grid","MeshSurface")
set oCluster = oGrid.ActivePrimitive.Geometry.AddCluster(  siPolygonCluster ) 
set oCluster2 = oGrid.ActivePrimitive.Geometry.AddCluster(  siEdgeCluster, "MyCluster" ) 
set oCluster3 = oGrid.ActivePrimitive.Geometry.AddCluster( siVertexCluster, "MyCluster3", Array(0,1,9,10) )

See Also

Cluster.IsAlwaysComplete