Commit Graph

12 Commits

Author SHA1 Message Date
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 4db69febbe big replacement .Zero => .SetZero, and start of Eigen's compatibilities (currently disabled by default) 2008-10-27 14:48:14 +00:00
Paolo Cignoni 1407af2537 removed harmless warnings 2008-07-09 10:31:55 +00:00
Federico Ponchio 54aa4df7c7 Made compatible with ScalarType = double 2007-06-20 09:26:42 +00:00
Paolo Cignoni 642158fc32 many gcc compiling issues 2006-11-07 17:22:53 +00:00
Paolo Cignoni e2733d55df Necessary changes for compilation with gcc 3.4.6. Especially the hash function is a problem 2006-11-07 15:13:57 +00:00
Federico Ponchio 6eb4a5b293 Working on mingw now. 2006-10-18 08:32:03 +00:00
Paolo Cignoni 5e4f12f28a minor changes to comply gcc compiler 2006-10-16 16:10:22 +00:00
Paolo Cignoni 7e30be53fa added callback... 2006-10-13 10:38:09 +00:00
Paolo Cignoni 8d056ebdd4 fixed some bugs 2006-10-12 14:15:13 +00:00
Paolo Cignoni 5b4f40661d Minor changes to work with the base-compliant octree 2006-10-12 11:02:37 +00:00
Paolo Cignoni ac4efc84ef initial commit 2006-09-21 18:10:05 +00:00