DVmirror


Synopsis

create the mirror image of a mesh


group DVmirror {
Mesh+IPort2 &in ;
float+Iparam mir_x = -1.0;
float+Iparam mir_y = -1.0;
float+Iparam mir_z = -1.0;
DefaultXform+nonotify mirr_xform {
mat => {{mir_x, 0.0, 0.0, 0.0},
{0.0, mir_y, 0.0, 0.0},
{0.0, 0.0, mir_z, 0.0},
{0.0, 0.0, 0.0, 1.0}};
};
group out_xfm {
DefaultXform xform;
};
DVconcat_xform concat_xform {
xform_in1 => in.xform;
xform_in2 => mirr_xform;
&xform_out => out_xfm.xform;
};
Mesh+0Port2 &out => merge( out_xfm, in);
};

Description

DVmirror generates a mesh that is the mirror image of the input mesh. "Mirror image" means that the mesh is mirrored about the X, Y, and/or Z plane. You can control each independently. It accomplishes this by modifying the xform transformation matrix object associated with a field. Mirroring is useful for visualization of axis symmetric problems.

Input

&in

The input is a reference to any mesh.

mir_x
mir_y
mir_z

Floating parameters that define the transformation to apply to the X, Y, and Z axes of the mesh. The default for all is -1.0. If you change it to 0.0, that axis will not be mirrored.

Output

&out

The output is a reference a new object that is the merge of the new transformation matrix plus a reference to the original input field.

Files

v/dv.v

Utility DVM macros

DVMmirror_param

Example

Libraries.Main.Filters.mirror

See also