Add smarter setter on vector and quaternion.

* add corresponding unit tests.