Accessing Particle Clusters under a Particle Cloud
1. Start by getting a pointer to the particle cloud.
CreateParticleCloud( "", "Grid" ); var pcloud = ActiveSceneRoot.FindChild( "", siCloudPrimType );
2. Enumerate over the children of the ParticleCloudPrimitive looking for the cluster container (of type cls):
var cprim = pcloud.ActivePrimitive;
var clsters;
var e = new Enumerator( cprim.NestedObjects );
for ( ; !e.atEnd(); e.moveNext() ) {
if ( e.item().Type == "cls" ) {
clsters = e.item();
break;
}
}3. Now enumerate over the children of the cluster container looking for individual clusters. Because particle clouds contain only points, the type to look for is pnt:
var cls;
e = new Enumerator( clsters.NestedObjects );
for ( ; !e.atEnd(); e.moveNext() ) {
if ( e.item().Type == "pnt" ) {
cls = e.item();
break;
}
}