Commit Graph

17 Commits

Author SHA1 Message Date
Paolo Cignoni 69a82d6174 fix the is "inaccessible" issue with g++-4.0.1 - more fixes ;) 2008-10-29 11:29:57 +00:00
Paolo Cignoni e587581275 add transposeInPlace and duplicate V(int) 2008-10-29 11:17:11 +00:00
Paolo Cignoni 0361427bc0 big cleaning in Point* and Matrix*, now they are very closed to be simple typedef of
Eigen's Matrix. Now the dilema is how to mimic those typedefs, using inheritence ?
or using the classic workaround: typename Point3<float>::Type; with Point3<T>::Type defined
to Eigen::Matrix<T,3,1>. Anyway currently I support both (and the inheritence scheme has
to be preserved for compatibility). The advantage of the second approach is that when
eigen has to evaluate an expression it uses an Eigen::Matrix<>, so it is probably better
to only use Eigen::Matrix but I'm not 100% sure that makes a big difference especially if
we add some automatic reinterpret_cast between Eigen::Matrix and vcg::Point*....
2008-10-28 20:06:17 +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
ganovelli b2960231ca corrected bug on PointBase class (thanks Oscar Barney) 2008-09-22 13:40:53 +00:00
granzuglia 728a9020c4 The class PointBase has been renamed as Point.
An empty class PointBase has been added for backward compatibility.
Mathematical operation (+,+=,*,etc) in class Point<N,S> has been implemented.
2008-09-10 14:04:09 +00:00
Paolo Cignoni 97ae6e35ed Corrected a syntax error in stabledot 2007-01-18 01:27:44 +00:00
ganovelli 8403681640 using of locally defined variable removed 2006-12-20 15:23:52 +00:00
Paolo Cignoni 1f4a4221e3 changes necessary for gcc 3.4.5 on linux 64bit. 2006-04-11 08:10:05 +00:00
ganovelli b7e6720706 compiled with gcc 2005-12-12 11:22:32 +00:00
ganovelli a991f9b9a4 corrected Point<3 2005-01-12 11:25:52 +00:00
ganovelli b21109bdfe first compiling version (MC,INtel,gcc) 2004-10-20 16:45:21 +00:00
ganovelli 7263ed4589 some siyntax error corrected 2004-04-29 10:47:06 +00:00
mtarini 98433b6bfc unified version: PointBase version, with no guards "(N==3)" 2004-04-05 12:36:43 +00:00
mtarini c73064b1fa unified version: PointBase version, with no guards "(N==3)" 2004-04-05 12:35:33 +00:00
mtarini 223902e61c "dimensionally unified" version: first commit 2004-03-16 03:07:38 +00:00