Commit Graph

11 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 5dd620e4e4 Added enum Dimension; 2007-05-07 07:47:59 +00:00
Marco Di Benedetto 0c31822d3c Implemented Scale() method (was only declared). 2006-10-07 16:51:43 +00:00
Marco Di Benedetto fc85374c3c Fixed product by scalar and SquaredNorm() 2006-01-19 13:53:19 +00:00
Marco Di Benedetto 2a0cf74739 Corrected return type in Angle() and protected member access in unary operator - 2005-10-15 19:11:49 +00:00
Paolo Cignoni eda550ba49 minor changes to comply gcc compiler 2005-03-18 16:35:53 +00:00
Paolo Cignoni 6a75af2188 small syntax error Math -> math in Angle 2004-05-10 13:22:25 +00:00
Paolo Cignoni c5502d119f Add V() access function 2004-04-05 11:57:32 +00:00
mtarini b84e4c7460 Added comments (Dox) !
Added Import(). Costruct(), ScalarType...  Corrected cross prod (sign). Added Angle. Now using Math:: stuff for trigon. etc.
2004-03-10 17:42:40 +00:00
Paolo Cignoni cd85d6ca7d renamed protected member v -> _v 2004-03-03 15:07:40 +00:00
Paolo Cignoni b2481bc732 First commit... 2004-02-13 00:44:53 +00:00