Boost logo

Boost :

From: Triger Trader (tiger_trader_at_[hidden])
Date: 2007-03-07 15:07:57


Hi, Ben.

>>Some thoughts:
>>* Default to value_type=double so "vector3" Just Works.

already has, more different typedefs by default:
Vector3f, Vector3d...

>>* It would be good to focus on Concepts so that an n-dimensional vector
>>could be used with other templated linear algebra stuff, including uBlas.

You can use any geometry container in STL algorithms.Not sure about all uBLAS stuff but, I think, it possible...

>> * A vector should have a data() method or a data(v) friend >> function to give
>> access to its internal representation, e.g., for passing it >> directly to
>> OpenGL. Then I could call glVertex3f(data(v)).
>> * It should be safe to cast a C-style array to a vector, so >> I could have
>> void old_function(double* vec3) {
>> vector3& v = some_kind_of_cast<vector3&>(vec3);
>> new_function(v);
>> }

>> * Make sure it would be easy to add fourth-order tensors(linear
>> transformations for 3x3 matrices). In computational mechanics those get used
a lot.

quaternion+matrix4 can do all 3D related stuff. Also it compatible with all modern API.

- Kasak Sergey

Already has.


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