macro_rules! rotate {
(a=$a:expr, v=[$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
($a:expr, [$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
(a=[$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
([$x:expr, $y:expr, $z:expr], $($child:expr);+;) => { ... };
(a=$a:expr, $($child:expr);+;) => { ... };
($a:expr, $($child:expr);+;) => { ... };
}Expand description
Rotates children.
#params
a: Degrees of rotation around v when v is given else a vector of degrees for rotation around the x, y, and z axis or a scalar for 2D rotations.
v: Axis to rotate around.
children: A list of Scad objects separated and ending with a semicolon.
expansion: A Scad struct literal.
#patterns
rotate!([‘x: f64’, ‘y: f64’, ‘z: f64’], ‘children: Scad’;);
rotate!(a=[‘x: f64’, ‘y: f64’, ‘z: f64’], ‘children: Scad’;);
rotate!(a=‘z: f64’, ‘children: Scad’;);
rotate!(‘z: f64’, ‘children: Scad’;);
rotate!(’a: f64, [‘x: f64’, ‘y: f64’, ‘z: f64’], ‘children: Scad’;); rotate!(a=’a: f64, v=[‘x: f64’, ‘y: f64’, ‘z: f64’], ‘children: Scad’;);