Commit Graph

571 Commits

Author SHA1 Message Date
Paolo Cignoni 0165f918f1 removed harmless gcc warnings 2010-03-26 09:43:45 +00:00
Paolo Cignoni fba6bd5917 removed harmless warnings/English Comments 2010-03-18 10:04:55 +00:00
Paolo Cignoni 95e1b391c8 min in std limits is a function 2010-02-11 20:07:27 +00:00
ganovelli 9fee205755 removed exceeding "default" in switch condition 2010-01-16 15:33:07 +00:00
Paolo Cignoni fbbf8fe436 Removed gcc4.4 warnings 2009-12-08 15:57:19 +00:00
Paolo Cignoni 6e3f10928e better comment to interpolationParameter2 2009-12-04 08:32:00 +00:00
Paolo Cignoni f7b9856d0d removed harmless warning 2009-12-04 08:22:33 +00:00
Paolo Cignoni 32619f1625 harmless gcc compiling issues 2009-12-03 23:17:46 +00:00
Paolo Cignoni 5a96ab4f8d a few optimization and correction to the hashed grid removal stuff 2009-12-02 15:08:49 +00:00
Paolo Cignoni 27c319a79c added a removeInSphere specialization and a removePunctual specialization. 2009-11-30 10:36:49 +00:00
Paolo Cignoni 7e02dbb4f8 added methods for removing things from a hashed grids 2009-11-25 15:49:54 +00:00
Marco Di Benedetto ebcbc5f98d fixed implicit cast warning. 2009-11-13 00:52:37 +00:00
Marco Di Benedetto b17d165d0c Added SquaredDistance and made the point-plane version redirect to the plane-point one. 2009-10-06 16:22:35 +00:00
Marco Di Benedetto e54e0a7124 Modified PlaneFittingPoints to return eighevalues and eigenvectors and added backward compatibility wrapper. 2009-10-05 22:43:14 +00:00
Paolo Cignoni 9fc361301d Added missing Plane3::Import 2009-08-26 00:10:32 +00:00
Paolo Cignoni 077294b03e added the common TexCoord2f and TexCoord2d typenames that where strangely missing... 2009-08-25 22:32:20 +00:00
granzuglia b686bd1d31 changes in order to compile with gcc 3.x 2009-07-15 16:29:10 +00:00
granzuglia 79b3238e27 changes in order to compile with gcc 3.x 2009-07-15 16:26:14 +00:00
Paolo Cignoni a5cb113561 added a method for getting the center of a grid cell 2009-07-14 08:55:20 +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
Nico Pietroni 1fa445c9fb changed epsilon value in InterpolationParameters 2009-06-30 16:15:51 +00:00
Nico Pietroni 24cf3c430a Added ScalarType Length() const function 2009-06-30 16:13:19 +00:00
Nico Pietroni 7c6296c80d * Corrected SegmentSegmentIntersection function
* In LineLineIntersection substituted EPSILON with Eps
2009-06-30 16:11:10 +00:00
Nico Pietroni 10c5f72af2 Corrected 1 bug in DistancePoint2Box2 function 2009-06-30 16:07:13 +00:00
Paolo Cignoni b2bc0d07ba small gcc compilation errors (typenames, missing std...) 2009-06-25 07:29:29 +00:00
Marco Di Benedetto 4e6b4a5b8f added Offset() method. 2009-06-05 09:32:47 +00:00
Federico Ponchio e888ef1560 removed some useless consts 2009-06-03 12:23:20 +00:00
mtarini 0856e6a2eb added CosWedge which returns the cos of a wedge 2009-05-26 17:50:18 +00:00
Paolo Cignoni 0f4817d486 Correct a bug. 2009-05-23 20:14:53 +00:00
Paolo Cignoni f5126d7ffe renamed a EPSILON variabile to avoid name clash 2009-05-18 15:06:11 +00:00
ganovelli 0524e1ac62 corrected the implementation of IntersectionSegmentPlane (compiled .net only) 2009-04-29 09:37:42 +00:00
Paolo Cignoni 4420e5102b Strictly less than instead of less than equals in
RayTriangleIntersection
2009-03-25 08:27:58 +00:00
Paolo Cignoni 42c90d1439 corrected two small compiling errors... 2009-03-19 22:11:35 +00:00
Marco Di Benedetto 93dade9042 modified DistancePoint3Box3 for out-of-box distance. 2009-03-19 21:13:38 +00:00
Marco Di Benedetto 389cc089db Added non-const pointer accessor. 2009-03-19 11:13:17 +00:00
Marco Di Benedetto 0e2bc54b52 Added non-const pointer accessor. 2009-03-19 11:12:23 +00:00
Marco Di Benedetto 915a7b40a1 call IntersectionRayTriangle in Intersection_Segment_Triangle instead of generic Intersection (missing overload). 2009-03-17 18:59:20 +00:00
Nico Pietroni 6b781dc660 changed evaluation of AreaGlobal in InterpolationParameters function 2009-02-27 16:15:28 +00:00
ganovelli 573c151241 bug on search cycle corrected (it was looping forever with vertices and twice slower with other elements) 2009-01-29 11:27:32 +00:00
Paolo Cignoni f4ec24c552 Restored Ray-Triangle Intersection (as an extension of IntersectionLineTriangle) 2009-01-23 14:33:13 +00:00
ganovelli f6b42772eb added IntersectionLineTriangle 2009-01-22 14:34:27 +00:00
Paolo Cignoni 713a6b6155 Passed const bbox parameter by reference in the getBBox 2009-01-19 23:12:11 +00:00
Paolo Cignoni 266ddc1a42 added a const operator to the spatial hashing iterator 2009-01-19 23:10:43 +00:00
ganovelli af76e5fde8 added keyword "public" for deriving SpatialHashTable from SpatialIndex 2009-01-16 17:01:17 +00:00
Massimiliano Corsini b810569a61 use point<ScalarType> instead of Point3d in Grid(.) 2009-01-15 15:31:22 +00:00
Massimiliano Corsini a7c15f807d add index-to-box conversion 2009-01-15 15:30:07 +00:00
Paolo Cignoni d236258507 added silly stuff needed for the MS implementation of hash_multimap 2009-01-14 14:55:50 +00:00
Paolo Cignoni dec8245691 Corrected a missing underscore in a preprocessor define check 2009-01-14 13:33:33 +00:00
Paolo Cignoni 9849e12bd1 removed nasty useless undefs 2009-01-13 15:52:27 +00:00
Paolo Cignoni fdf4e402f3 forgot a couple of std:: 2009-01-13 06:33:53 +00:00
Paolo Cignoni 017d27dc36 Better commnts and other minor beautifications 2009-01-13 06:27:01 +00:00
Paolo Cignoni a546c88a7c Heavy restructured the whole spatial hashing. Much shorter code. The dynamic part is now missing... 2009-01-12 22:46:00 +00:00
Paolo Cignoni 51e1718626 added the possibility to decide the size of the grid with an optional parameter of the Set 2009-01-08 11:29:24 +00:00
Paolo Cignoni 3e85ffd0ff New function for computing baric coords in a more robust way 2009-01-08 11:24:54 +00:00
ganovelli 157301b773 change to comply random generation 2008-12-19 10:40:31 +00:00
Paolo Cignoni cb22994ef5 Restored TMARKER as a copied, not referenced, class 2008-11-03 16:21:52 +00:00
Paolo Cignoni dfc6417426 Changed IPToP calls into IPiToPf, Markers passed by reference 2008-10-31 10:40:06 +00:00
Paolo Cignoni 49c72bc54e Disambiguated some grid utility names (IPtoTP into IPfToPf and IPiToPf) in order to avoid ambiguities (due to automatic cast?) 2008-10-30 09:01:03 +00:00
Paolo Cignoni 6627c21d43 added a missing dot() product for the conservative people still using deprecated stuff... 2008-10-30 07:39:33 +00:00
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 696f763c3d fix the is "inaccessible" issue with g++-4.0.1 2008-10-29 11:28:51 +00:00
Paolo Cignoni e587581275 add transposeInPlace and duplicate V(int) 2008-10-29 11:17:11 +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 6e0b8fe1aa added import vector 2008-10-28 15:00:16 +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 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 4002b9a706 created as a first working draft.
Tessellates a simple polygon with the earcut algorithm
assuming the polygon is  almost planar
2008-10-27 16:50:45 +00:00
Paolo Cignoni 4db69febbe big replacement .Zero => .SetZero, and start of Eigen's compatibilities (currently disabled by default) 2008-10-27 14:48:14 +00:00
ganovelli c0a5159672 changed member Zero() to SetZero() 2008-10-27 12:52:22 +00:00
Paolo Cignoni 57fe4376a2 fix a few warnings 2008-10-24 12:45:02 +00:00
Paolo Cignoni 9fc4f7d36f added a missing const to grid Create 2008-10-07 06:56:26 +00:00
ganovelli 7defccba1b getclosest update for \the new definition of distance functor 2008-09-30 11:01:09 +00:00
ganovelli 41bc27e33e Changed the type of query type. Made it dependend on distance functor 2008-09-24 09:28:53 +00:00
ganovelli 68d900ec7e changes to compile previous commit with gcc 2008-09-24 09:15:38 +00:00
ganovelli 6a649ee257 changes to comply the templatization of distance functor on the query type 2008-09-24 08:45:31 +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
ganovelli 1185e2ab96 minor type changes to compile with gcc 2008-08-19 11:03:39 +00:00
ganovelli 3cb29c805b changed template from vcg::Triangle to generic class to allow to pass a vcg::FaceSimpX (recall: the disambiguation was done in the function name exactly for this reason) 2008-08-19 10:21:01 +00:00
ganovelli 82d9dec26a aadded this-> to + operator to compile with .net 2008-08-07 16:22:27 +00:00
ganovelli d35117d9c2 added precompiler check if FABS macro is already defined 2008-08-04 10:54:34 +00:00
ganovelli 57c0fc8238 added inclusion of point3.h, removed useless namespace in InterpolationParameters 2008-08-04 10:53:08 +00:00
ganovelli 08cdd7b3aa added a version of CreateTight which takes a std::vector 2008-08-04 10:50:53 +00:00
ganovelli 3712ddfd50 - Change to avoid dangerous iterators decrement in RayITerator: reverse iterator used (same as in ClosestIterator)
-removed some old commented code
2008-07-29 16:05:29 +00:00
Paolo Cignoni 2dc0c1e1dc Fixed compilation bug under Visual Studio 2005 2008-07-29 13:01:10 +00:00
Federico Ponchio 75ee76b233 PlaneFitting returns the eigenvalues instead of true now. 2008-07-21 08:34:31 +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 1407af2537 removed harmless warnings 2008-07-09 10:31:55 +00:00
Nico Pietroni 38c1cc7aaf changed epsilon value on InterpolationParameters function 2008-07-03 10:22:37 +00:00
Paolo Cignoni 711c985689 update to the new single template BasicGrid 2008-07-01 12:37:27 +00:00
Paolo Cignoni fa2c3fa060 updated the spatial indexing class to the new basicgrid class that has only one template parameter 2008-07-01 09:33:47 +00:00
Paolo Cignoni 4e227776f3 Removed one useless template parameter from the BasicGrid class and added a couple of useful accessory functions 2008-07-01 09:32:48 +00:00
Paolo Cignoni 616b3fedc5 Added the class oriented bounding box inherited from box3.h 2008-06-23 17:28:30 +00:00
Nico Pietroni 26e1c14de8 correct version of InterpolationParameters 2008-06-20 15:03:27 +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