maths and bugs
[vg.git] / src / vg / vg_m.h
index a61c6f0565575a442a98fa43fb675b3ef2edb834..9f934163e42bd7c5204566eeb11eb637f93e4206 100644 (file)
@@ -598,6 +598,13 @@ static inline void m4x3_to_3x3( m4x3f a, m3x3f b )
        v3_copy( a[2], b[2] );
 }
 
+static inline void m4x3_invert_affine( m4x3f a, m4x3f b )
+{
+   m3x3_transpose( a, b );
+   m3x3_mulv( b, a[3], b[3] );
+   v3_negate( b[3], b[3] );
+}
+
 static inline void m4x3_copy( m4x3f a, m4x3f b )
 {
        v3_copy( a[0], b[0] );