Build class matrix4