Boost logo

Boost :

Subject: Re: [boost] Review Request: QVM (generic Quaternion, Vector and Matrix operations library)
From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2015-05-07 06:30:14


Emil Dotchevski wrote:
> For example one of the 3D vector types I use looks like this:
> struct float3 { float x, y, z; }, so typically I access its
> elements as v.x, v.y and v.z

THAT is what I believe is needed in a "basic" matrix and vector
library, plus operations on those types.

Emil, can you include a collection of such types with the library?

The scenario I'm thinking of is this:

New employee: Phil, how do we do matrices for affine transforms?

Me: Just #include this and use types called floatvec2 and floatmat2x2
and + and * just work.

New employee: Wow, that's almost as easy as Java!

Versus:

New employee: Phil, how do we do matrices for affine transforms?

Me: First, define your own structs. Then define partial specialisations
of these two type traits templates. Now #include this, and + and * will
just work.

New employee: Poo, you lost me at "partial specialisation". I think
it's quicker just to write my own matrix multiplication function.

Cheers, Phil.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk