[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] 2D geometry

On Nov 12, 2008, at 3:58 PM, Javier Ángel Velázquez-Muriel wrote:

- Vector2D is already done but I am fine with changes
Lets make a unified ND vector. I have wanted 4D a bunch of times.

- I am building a templated version of matrix for 1,2,3D. I didn't
know about matrix3d until yesterday
If you want nice constructors (from lists of values) you can use the boost static assert functionality to make sure, at compile time, that the correct constructor is called for the correct dimensional vector/ matrix.

- Images are going to be 2D matrices and header.
BTW, have you looked at Boost.GIL? It is a general C++ image library in boost (which we are already linked against, in theory).

2008/11/12 Daniel Russel <>:
Or vector and matrix can be replaced by a single version templated on the dimension. We definitely don't want separate code bases for the 2 and 3D
versions as it will be a pain to keep the set of operations in sync.

On Nov 12, 2008, at 10:50 PM, Keren Lasker wrote:


For your 2D geometry classes (Vector2D, Matrix2D ...) - why not just
using the corresponding 3D classes and keeping Z fixed?
I think it is not too bad in performance and will save you a lot of
coding/debugging time.

IMP-dev mailing list