fixed matrix transforms and added concave polygon support