Added transformation support

Both Instance and Compound now support transformations using a matrix.