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.
Cluster Geometry.AddCluster( String in_Type, String in_name, Object in_Indices ); |
oReturn = Geometry.AddCluster( Type, [Name], [Indices] ); |
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. |
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) ) |