The NV macros have the same purpose
as ND macros, but they operate on vectors
(that is, arrays of length ND_ND) instead
of separate components.
The utility NV_V performs an operation
on two vectors.
NV_V(a, =, x); a[0] = x[0]; a[1] = x[1]; etc.
Note that if you use + = instead of = in the above equation, then you get
a[0]+=x[0]; etc.
See
DEFINE_GRID_MOTION
for an
example UDF that utilizes NV_V.
The utility NV_VV performs operations
on vector elements. The operation that is performed on the elements
depends upon what symbol (-,/,*) is used
as an argument in place of the + signs in
the following macro call.
NV_VV(a, =, x, +, y) 2D: a[0] = x[0] + y[0], a[1] = x[1] + y[1];
See
DEFINE_GRID_MOTION
for an
example UDF that utilizes NV_VV.
The utility NV_V_VS adds a vector to
another vector which is multiplied by a scalar.
NV_V_VS(a, =, x, +, y, *, 0.5); 2D: a[0] = x[0] + (y[0]*0.5), a[1] = x[1] +(y[1]*0.5);
Note that the + sign can be replaced
by -, /, or *, and the * sign can be replaced
by /.