Commit Graph

16 Commits

Author SHA1 Message Date
Paolo Cignoni 07f2e976ea * change all remaining Transpose to transpose,
* update the gl/math wrappers to make them more Eigen friendly
  (and remove the useless, and not used, and somehow dangerous
   *Direct and *E functions)
* add automatic reinterpret_casting from Eigen::Matrix to vcg
  specialized types
2008-10-29 00:05:44 +00:00
Paolo Cignoni c1551eddfd make Point derive Eigen's Matrix and some cleanning 2008-10-28 11:47:37 +00:00
Paolo Cignoni 7befff7bec make point2 derived Eigen's Matrix, and a set of minimal fixes to make meshlab compile
with both old and new version. The fixes include:
- dot product: vec0 * vec1 => vec0.dot(vec1) (I added .dot() to the old Point classes too)
- Transpose: Transpose is an Eigen type, so we cannot keep it if Eigen is used. Therefore
  I added a .tranpose() to old matrix classes, and modified most of the Transpose() to transpose()
  both in vcg and meshlab. In fact, transpose() are free with Eigen, it simply returns a transpose
  expression without copies. On the other be carefull:  m = m.transpose() won't work as expected,
  here me must evaluate to a temporary: m = m.transpose().eval(); However, this operation in very
  rarely needed: you transpose at the same sime you set m, or you use m.transpose() directly.
- the last issue is Normalize which both modifies *this and return a ref to it. This behavior
  don't make sense anymore when using expression template, e.g., in (a+b).Normalize(), the type
  of a+b if not a Point (or whatever Vector types), it an expression of the addition of 2 points,
  so we cannot modify the value of *this, since there is no value. Therefore I've already changed
  all those .Normalize() of expressions to the Eigen's version .normalized().
- Finally I've changed the Zero to SetZero in the old Point classes too.
2008-10-28 00:59:46 +00:00
Paolo Cignoni ab200fc950 Port to eigen2: state of the mess:
* curently nothing change if you don't define VCG_USE_EIGEN
* make Matrix*, Point3 and Point4 derive Eigen::Matrix (still ugly)
* now catching all the dot products to replace them by .dot()
  note that most of meshlab already compile
2008-10-27 19:35:17 +00:00
Paolo Cignoni 4db69febbe big replacement .Zero => .SetZero, and start of Eigen's compatibilities (currently disabled by default) 2008-10-27 14:48:14 +00:00
granzuglia b9ce07204e Minor changes according to new Point<N,S> definition. 2008-09-10 14:06:13 +00:00
Paolo Cignoni d8b56cedb1 Added SetIdentity method 2006-09-21 18:09:34 +00:00
Paolo Cignoni 8d63662955 Added const to declarations of the overloaded (operators *).
Otherwise the  * operator would always attempt to convert any type of data passed as an argument to Point3<TYPE>
2006-09-11 16:11:39 +00:00
Paolo Cignoni 6cc1fb0753 Copy constructor : faster memcpy instead of slow 'for' cycle
empty constructor
2006-08-23 15:24:45 +00:00
Paolo Cignoni 10c513dad8 Added some utility methods (swapping of columns and rows, matrix-vector multiplication) 2006-04-29 10:26:04 +00:00
Paolo Cignoni 3ddd189349 changes necessary for gcc 3.4.5 on linux 64bit. Please take note of case-sensitivity of filenames 2006-04-11 08:09:35 +00:00
ganovelli 7229c77576 added diagonal matrix, outer produce and namespace 2005-12-12 11:25:00 +00:00
Paolo Cignoni f8fb041641 minor bugs fixed 2005-03-18 16:31:02 +00:00
Paolo Cignoni 5d6d76694c Added matrix-vector multiplication 2005-02-16 11:11:12 +00:00
Paolo Cignoni 1422c15f6f - Added SetDiagonal method
- Bug fixed in RowsNumber and ColumnsNumber
2004-10-18 12:16:57 +00:00
Paolo Cignoni 546d4d88e1 Initial commit 2004-10-15 13:44:09 +00:00