Transformation.centered constructor

Transformation.centered({
  1. Vec3 scale = (1, 1, 1),
  2. Vec3 right_rotation = (0, 0, 0),
  3. Vec3 left_rotation = (0, 0, 0),
})

Implementation

factory Transformation.centered({
  Vec3 scale = (1, 1, 1),
  Vec3 right_rotation = (0, 0, 0),
  Vec3 left_rotation = (0, 0, 0),
}) =>
    Transformation(
      scale: scale,
      right_rotation: right_rotation,
      left_rotation: left_rotation,
      translation: (-scale.$1 / 2, -scale.$2 / 2, -scale.$3 / 2),
    );