Ask Your Question

emu's profile - activity

2016-05-31 03:39:41 -0600 asked a question Why are Matx, Vec, Point and Size different types?

In every program I code, sooner or later I bump up into one of these conversions:

  • Matx_<Type, N, 1> <-> Vec_<Type, N>
  • Point_<Type> <-> Vec_<Type, 2>
  • Point3_<Type> <-> Vec_<Type, 3>

...or operations like

  • Size_<Type> + Point_<Type>
  • Size_<Type> * Type
  • Point_<Type> * Type

Why are these four types not just aliases to Matx? What is the design aim behind this?