Removed an extra memcpy and made getMatrix() pure virtual.