![]() |
![]() |
![]() |
![]() |
DVscale
Synopsis
scale a 3D mesh in X, Y, and/or Z
module DVscale {
Mesh+IPort2 &in ;
float+Iparam scale_x = 1.0;
float+Iparam scale_y = 1.0;
float+Iparam scale_z = 1.0;
group scale {
DefaultXform+nonotify xform {
mat => {{scale_x, 0.0, 0.0, 0.0},
{0.0, scale_y, 0.0, 0.0},
{0.0, 0.0, scale_z, 0.0},
{0.0, 0.0, 0.0, 1.0}};
xlate = {0.0, 0.0, 0.0};
center = {0.0, 0.0, 0.0};
};
};
DVcopy_xform_field DVcopy_xform_field {
in => <-.in;
};
DVconcat_xform_field DVconcat_xform_field {
in => <-.DVcopy_xform_field.out;
in_xform => scale;
};
Mesh+OPort2 &out => DVconcat_xform_field.out;
olink user_xform => DVcopy_xform_field.out.xform;
};Description
DVscale scales a mesh in X, Y, and/or Z, making it appear larger or smaller in the renderer window. It accomplishes this by modifying the field's associated transformation matrix, xform.
Input
Floats. These inputs independently control the degree of scaling in X, Y, and Z. The default 1.0 means "render at `actual' size."
Output
The output is a reference to a new object that is the merge of the new xform, plus a reference to the original field.
Example
File
Utility DVM macros DVMscale_param
See also
![]() |
![]() |
![]() |
![]() |