
"David Abrahams" <dave@boost-consulting.com> wrote
"Andy Little" <andy@servocomm.freeserve.co.uk> writes:
"Andy Little" <andy@servocomm.freeserve.co.uk> wrote
tx_matrix<units> t = make_matrix( translation = xy_pair<units>(units(1),units(1)), rotation = angle::rad(1), scaling = .5 );
Of course The order of the paramaters in the above example is important, hence rendering the named parameters library unsuitable for this particular purpose.
Apologies for that example
Well, it brings up an interesting point; maybe some sort of visitation interface that could explore all parameters in order would be appropriate.
I have a feeling its a red herring unfortunately... not really in the same ballpark as the named parameters library... eg This should be legal : // matrix for rotation about (1,1).... tx_matrix<units> t = make_matrix( translation = make_xy_pair(units( -1),units(-1)), // to origin rotation = angle::rad(1), translation = make_xy_pair(units(1),units(1)) // ...Oops! ); The simple,obvious solution would work here I guess: tx_matrix<units> t ( translation( units( -1),units(-1)), rotation(angle::rad(1)), translation( units(1), units(1)) ); regards Andy Little