Commit Graph

27 Commits

Author SHA1 Message Date
Paolo Cignoni ac3107cdb4 added comments to the color Scatter function (I never remember the meaning of the params) 2012-01-18 11:24:33 +00:00
ganovelli 9fee205755 removed exceeding "default" in switch condition 2010-01-16 15:33:07 +00:00
Paolo Cignoni f7b9856d0d removed harmless warning 2009-12-04 08:22:33 +00:00
Paolo Cignoni 7a45bbe7eb Added Color4d type definition 2009-07-10 13:22:24 +00:00
Marco Di Benedetto 3b15d3a8df added cast to unsigned char. 2009-06-30 19:01:22 +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 393ec38d54 quick fix in color4 2008-10-27 19:38:52 +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 82d9dec26a aadded this-> to + operator to compile with .net 2008-08-07 16:22:27 +00:00
Paolo Cignoni 4555f74ee3 added operator + between color with clamped specialization for unsigned chars 2008-07-09 15:18:08 +00:00
Paolo Cignoni d95f6ee798 Added a constructor from point4 of the same type to allow the use of Point4 operator; e.g. col1 = col2 + col3
Added Clamp operator to get rid of out of 0..1 range values for floats
2008-06-17 23:08:53 +00:00
Paolo Cignoni 8972bf2ea2 added construct from and to float 2008-04-22 20:44:07 +00:00
Federico Ponchio 76721c28d1 Just a clarification comment 2007-09-21 11:34:10 +00:00
Paolo Cignoni 5f2db06c23 gcc 4 needs the extra template keyword 2006-06-08 08:52:02 +00:00
Federico Ponchio fe7fe4380d Fixed "lerp" function. 2005-06-24 12:21:48 +00:00
Federico Ponchio 2328e5b1e4 *** empty log message *** 2005-04-14 11:35:09 +00:00
Paolo Cignoni c047097ff3 corrected ColorRamp code (template specialization) 2004-09-09 12:51:28 +00:00
Paolo Cignoni 53c55f2f4f added a 'template<>' to the specialized constructors from a enum 2004-09-09 08:39:33 +00:00
Paolo Cignoni 294af60c39 Corretto errore sintattico nelle specializzazioni parziali (float e char) di due costruttori di Color4 2004-09-03 13:58:48 +00:00
ganovelli db900ae484 added inclusion of point3.h 2004-07-15 11:01:43 +00:00
Paolo Cignoni 71dbb53a60 Now color ramp can do reverse color ramp 2004-06-24 07:55:50 +00:00
Paolo Cignoni 1ca59ac830 Corrected bug in setgrayshade 2004-05-26 15:10:29 +00:00
Paolo Cignoni ff99671468 added ifdef for gcc [Bug c++/14479] 2004-05-07 12:46:55 +00:00
Paolo Cignoni 16f2e7ebd7 Corrected template specialization syntax for gcc compiling 2004-05-07 10:06:55 +00:00
Paolo Cignoni c735627fae Written some documentation and added to the space module 2004-03-10 21:38:40 +00:00
Paolo Cignoni 9ec5d86675 Removed a wrong (?) copy constructor 2004-03-10 00:35:01 +00:00
Paolo Cignoni c6f15ed3ad Edited Comments and GPL license 2004-02-10 01:11:28 +00:00