leftTranslated method

Matrix4 leftTranslated(
  1. Vector3 translation
)
inherited

Returns a translation matrix of translation multiplied by this. Note the order.

Implementation

Matrix4 leftTranslated(Vector3 translation) {
  final tx = translation.x, ty = translation.y, tz = translation.z;
  final w0 = this[3], w1 = this[7], w2 = this[11], w3 = this[15];

  return .new(
    // dart format off
    this[0]  + (tx * w0), this[1]  + (ty * w0), this[2]  + (tz * w0), w0,
    this[4]  + (tx * w1), this[5]  + (ty * w1), this[6]  + (tz * w1), w1,
    this[8]  + (tx * w2), this[9]  + (ty * w2), this[10] + (tz * w2), w2,
    this[12] + (tx * w3), this[13] + (ty * w3), this[14] + (tz * w3), w3,
    // dart format on
  );
}