transform an array of meshes away from their common center
module DVexplode_xform {
Mesh+Iparam &in[] {
nnodes+req;
};
float+Iparam x_factor;
float+Iparam y_factor;
float+Iparam z_factor;
group+write+nonotify out[array_size(in)] {
DefaultXform xform;
};
group+nonotify out_field_mrg[array_size(in)] {
int+nres arr_ind => index_of(out_field_mrg);
Mesh+nres &out_fld => merge(out[arr_ind],in[arr_ind]);
};
mlink+nonotify+OPort2 out_flds => out_field_mrg.out_fld;
method+notify_val+notify_inst upd_xform_mat<status=1> =
"DVexplode_xform";
};
DVexplode_xform transforms each mesh in an array of meshes away from their common center (measured as the average of the min and max in each dimension). The transformation matrices and transformed fields are both available as outputs.
Mesh[]. The array of input fields.
float. Scales the amount that the the fields are translated away from the center.
float. Scales the amount that the the fields are translated away from the center.
float. Scales the amount that the the fields are translated away from the center.
group[]. Contains the new transforms to be applied to each field.
Mesh[]. Contains the output fields.