moved affine3, fixed -Wshadow warnings