Commit Graph

15 Commits

Author SHA1 Message Date
Paolo Cignoni 3d43483497 one more fix gcc 4.0.1 issue in wrap/gl/math 2008-10-29 13:04:11 +00:00
Paolo Cignoni 0d9795d163 fix gcc 4.0.1 issue in wrap/gl 2008-10-29 12:56:32 +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 c14e1511db added a missing typename 2007-08-17 07:00:00 +00:00
ganovelli 135951fd27 added gltetra, added normal gltriangle 2007-07-31 12:21:50 +00:00
ganovelli e77e2dcf26 glTriangle added 2007-05-08 18:55:38 +00:00
Paolo Cignoni 13a26e1b89 Added cast for mac compiling 2007-01-18 01:26:23 +00:00
Paolo Cignoni 53f49b4784 Added glscale(scalar) and corrected bug in glscale(point2) 2005-10-13 08:32:26 +00:00
ganovelli 0c7caf4a75 added draw plane 2005-06-30 10:17:04 +00:00
Paolo Cignoni 6fa3316cb6 added glboxwire 2005-05-05 12:28:13 +00:00
Paolo Cignoni 1d04957291 Added box3 drawing functions 2004-07-07 23:30:28 +00:00
Paolo Cignoni dd22e28ce9 Removed inclusion of gl extension stuff and added glcolor stuff 2004-05-26 15:13:01 +00:00
Federico Ponchio bc13d242fe <GL/GL.h> --> <GL/gl.h> 2004-05-13 23:44:47 +00:00
Paolo Cignoni 711c2a00d9 First working version! 2004-04-05 11:56:14 +00:00