One useful case for me:

static Mat4 transform()(const auto ref Vec3 pos, const auto ref Vec3 scale, const auto ref Quat rot)
{
    Mat4 m = Mat4(rot.matrix, 1);

    m.m00 *= scale.x;
    m.m01 *= scale.x;
    m.m02 *= scale.x;

    m.m10 *= scale.y;
    m.m11 *= scale.y;
    m.m12 *= scale.y;

    m.m20 *= scale.z;
    m.m21 *= scale.z;
    m.m22 *= scale.z;

    m.m30 = pos.x;
    m.m31 = pos.y;
    m.m32 = pos.z;

    return m;
}

Currently, my choices are template bloat, or pointless copying.

  Bit

Yes, the same goes for Dgame.

Reply via email to