Commit Graph

35 Commits

Author SHA1 Message Date
Paolo Cignoni 32333eba24 Huge copyright sanitization of the header files of vcg folder. 2016-06-13 05:29:25 +00:00
Paolo Cignoni 696f763c3d fix the is "inaccessible" issue with g++-4.0.1 2008-10-29 11:28:51 +00:00
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 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
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
ganovelli c0a5159672 changed member Zero() to SetZero() 2008-10-27 12:52:22 +00:00
Massimiliano Corsini 900a46600e fix polar coordinates 2006-11-15 15:34:39 +00:00
Federico Ponchio 716d0b39f2 Added GetBBox in Point3 (declaration) the body of the function is in box3.h 2006-11-13 13:03:45 +00:00
Paolo Cignoni 00a0aeb381 Added **explicit** constructor from three coords of a different scalartype 2006-10-13 12:59:24 +00:00
Marco Di Benedetto f2143e6efb added non const * V() 2006-09-28 13:37:35 +00:00
Paolo Cignoni e739c6628f Added Abs and LowClampToZero 2005-11-09 16:11:55 +00:00
Marco Di Benedetto 8d8eed9f02 Added specialized Convert() for the same scalar type. 2005-09-14 14:09:21 +00:00
Paolo Cignoni 6b4cb4a4b5 cambiato parentesi nel costruttore di GetUV per rendere compatibile tale costruttore con MVC e borland 2005-05-06 14:45:33 +00:00
Marco Callieri 43f4cfe2b3 line 466, added parentesis on default value creator getUV [borland] 2005-04-27 16:05:19 +00:00
ganovelli 6e38d819bb added GetUV 2004-11-09 15:49:07 +00:00
Paolo Cignoni 2d18591782 Better Doxygen documentation 2004-10-13 12:45:51 +00:00
Paolo Cignoni 08411ea403 Added polar to cartesian 2004-09-10 14:01:40 +00:00
Federico Ponchio 7638edc6e1 Added a math:: 2004-03-21 17:14:56 +00:00
Paolo Cignoni 12d0d04898 Moved quality and normal functions to the triangle class. 2004-03-07 22:45:32 +00:00
mtarini 1a8c8a6199 errorino: upper case in Zero() 2004-03-05 17:55:01 +00:00
Paolo Cignoni 86786bc121 Yet against cr lf mismatch 2004-03-03 14:22:48 +00:00
Paolo Cignoni adb4bd3f1b Translated comments, removed unusued stuff. corrected linefeed/cr 2004-02-23 23:42:26 +00:00
Paolo Cignoni ba0ae377c2 cr lf mismatch 2 2004-02-19 16:12:28 +00:00
Paolo Cignoni e5dbdbe05c cr lf mismatch 2004-02-19 16:06:24 +00:00
Federico Ponchio a952f745a0 Sqrt -> Math<...>::Sqrt 2004-02-19 15:27:40 +00:00
Paolo Cignoni cf744db2db corrected sqrt and added doxygen groups 2004-02-19 15:13:40 +00:00
Paolo Cignoni df4546eb32 Di prova... 2004-02-17 02:08:47 +00:00
Paolo Cignoni 456da92c39 Cambiato nome type template in accordo alla styleguide 2004-02-15 23:35:47 +00:00
Paolo Cignoni c6f15ed3ad Edited Comments and GPL license 2004-02-10 01:11:28 +00:00
Paolo Cignoni c6ba9e39cc Edited doxygen comments 2004-02-09 13:48:02 +00:00
Paolo Cignoni 3d0bea8089 First working release. 2004-02-06 02:25:54 +00:00
Paolo Cignoni 23653c6752 First commit... 2004-02-06 02:17:09 +00:00
Paolo Cignoni 1e79ceef6f First commit... 2004-02-05 16:08:27 +00:00