Create convenience function for creating a transform from matrix.