Commit Graph

11 Commits

Author SHA1 Message Date
Paolo Cignoni 12c61c4622 Added ByLine() method, which initializes the quadric as the squared distance from a given line.
This works with a vcg::Ray() too, but the caller should be aware that the distance "before" the ray origin is computed as if the ray were a line.
2009-03-31 09:17:39 +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 ae9d8a8535 Solved an issue related to different casting double-float between gcc 3 and gcc 4 2007-03-22 11:07:16 +00:00
Federico Ponchio 613dcafe3b just added an #include <matrix33> 2006-11-13 12:53:40 +00:00
Paolo Cignoni 605c4d2f04 Added a minimum method that uses SVD. Unfortunately it is much much slower. 2006-10-09 20:23:00 +00:00
Paolo Cignoni 71a73a7ad6 added an alternative QuadricMinimization (we should use LRU decomposition!!) 2004-12-10 01:31:59 +00:00
Paolo Cignoni 1380ee7712 added an inline and removed loggng 2004-12-10 01:03:15 +00:00
Federico Ponchio 8de360b0ac typedef ScalarType ScalarType; was a problem on g++ 2004-10-25 16:23:51 +00:00
ganovelli 5f84e02239 template changed 2004-10-25 16:15:59 +00:00
ganovelli 8bb2f10d57 created 2004-09-14 19:48:27 +00:00