tilt method

Matrix4 tilt({
  1. required double rotate,
  2. required double vertical,
  3. required double horizontal,
})

Applies tilt and rotation transforms to this Matrix4.

  • rotate: rotation in radians around the Z axis.
  • vertical: tilt in radians around the X axis (up/down).
  • horizontal: tilt in radians around the Y axis (left/right).

Returns a Matrix4 with perspective and the tilt applied.

Implementation

Matrix4 tilt({
  required double rotate,
  required double vertical,
  required double horizontal,
}) {
  return perspective()
    ..rotateZ(rotate)
    ..rotateX(vertical)
    ..rotateY(horizontal);
}