XYZDirection merge. Performance BANG.

Now it's probably mostly the per-vertex averaging that takes the
longest. Work on that next.