Macro nsi::double_matrix

source ·
macro_rules! double_matrix {
    ($name: tt, $value: expr) => { ... };
}
Expand description

Create a DoubleMatrix row-major, 4×4 transformation matrix argument. The matrix is given as 16 f64 values.

Examples

// Setup a transform node.
ctx.create("xform", nsi::TRANSFORM, None);
ctx.connect("xform", None, nsi::ROOT, "objects", None);

// Translate 5 units along z-axis.
ctx.set_attribute(
    "xform",
    &[nsi::double_matrix!(
        "transformationmatrix",
        &[1., 0., 0., 0., 0., 1., 0., 0., 0., 0., 1., 0., 0., 0., 5., 1.,]
    )],
);