Commit Graph

3152 Commits

Author SHA1 Message Date
ganovelli aecc82a589 added trimesh_attribute 2008-11-12 15:01:08 +00:00
Paolo Cignoni d124cae6fb added a missing include 2008-11-07 15:37:46 +00:00
Paolo Cignoni 2e7c97e90e Corrected the update cycle in the AddFace. Thanks to Michele Vannoni for pointing out this bug! 2008-11-07 15:36:19 +00:00
Federico Ponchio 01c0bc106f Added function to get near and far plane for a box (exact). 2008-11-07 15:15:06 +00:00
Paolo Cignoni df84db769c Rewrote the function for the selection and counting of non manifold vertices. Now it does not require VF topology, just FF. 2008-11-07 10:12:39 +00:00
Federico Ponchio a9e5756eda Distortion parameter zeroed on creation! 2008-11-06 15:36:44 +00:00
Paolo Cignoni 0927eaf2fb sounds like I forgot to commit the addition of Transpose compatibility + fix related to recent Eigen change 2008-11-04 12:33:47 +00:00
Paolo Cignoni cb22994ef5 Restored TMARKER as a copied, not referenced, class 2008-11-03 16:21:52 +00:00
mtarini b3620bb320 implemented ToEulerAngles + minor changes and fixes. 2008-11-01 15:54:13 +00:00
Paolo Cignoni 336de84d19 Added an unbiased montecarlo and a revised (still to be improved) stratified sampling 2008-11-01 07:22:29 +00:00
Paolo Cignoni 4e46ff3be6 Added HasPerVertexRadius(mesh) 2008-10-31 12:27:37 +00:00
ganovelli 6d59f7000a updated to comply mods at the lib
(deprecated simplex definitions, new namespace "vertex", new vertexquality 
function names)
2008-10-31 12:05:24 +00:00
Paolo Cignoni dfc6417426 Changed IPToP calls into IPiToPf, Markers passed by reference 2008-10-31 10:40:06 +00:00
Paolo Cignoni 0f2d864e05 remove a trailing print() 2008-10-30 11:31:28 +00:00
Paolo Cignoni dfc97ba1f2 fix Matrix44 infinite product, make glGetv not allocate temporary 2008-10-30 10:47:08 +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 60eb470c6c of course fixing msvc breaked gcc... not anymore... spoke too fast gcc 4.0.1 had troubles 2008-10-29 15:52:07 +00:00
Paolo Cignoni e90fd9ca16 of course fixing msvc breaked gcc... not anymore 2008-10-29 15:36:08 +00:00
Paolo Cignoni 0414cbc2f3 Fixed includes, new interface to specify polar functions 2008-10-29 15:26:45 +00:00
Paolo Cignoni c8506daaff fixed a couple of MSVC issues, meshlab compile, the plugins soon... 2008-10-29 14:01:44 +00:00
Paolo Cignoni 7b075b3905 mvsc does not like #warning 2008-10-29 13:17:32 +00:00
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 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
Federico Ponchio 632f4842f1 Polar mode now working. 2008-10-28 16:43:56 +00:00
Paolo Cignoni c0c76bc5b8 added Polarmode prototype (doesn't work yet) 2008-10-28 15:55:40 +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
ganovelli 949637c795 added private copy constructor and assignment operator to prevent people from doing those things
added empty constructors to attribute handles
2008-10-28 11:00:30 +00:00
Paolo Cignoni 977ddb9623 some cleaning 2008-10-28 10:16:43 +00:00
ganovelli 2dc124d060 created. Example of use of user defined attributes 2008-10-28 09:18:52 +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 69ebba04b9 Created.
PolygonSupport provides the functions to import a trimesh from a polygonal mesh and viceversa.
2008-10-27 16:54:32 +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
Massimiliano Corsini e98422ee49 fix tokenizeNextLine 2008-10-27 15:19:28 +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 3c65d927ac add svn:externals to Eigen's repo... the svn doc is not very clear, hope this time is the good one 2008-10-27 10:06:30 +00:00
Paolo Cignoni 01625bcbdf add svn:externals to Eigen's repo... hm wrong target 2008-10-27 10:02:22 +00:00
Paolo Cignoni a33d58812b add svn:externals to Eigen's repo 2008-10-27 09:59:14 +00:00
Federico Ponchio 5394003338 Fixed small error in documentation 2008-10-24 18:49:40 +00:00
Paolo Cignoni 8a8eb6fb65 add the possiblity to sort eigenvalues/vectors according to their absolute values 2008-10-24 17:21:53 +00:00
Federico Ponchio fe59b6ad4d Extrinsics.tra is now private, using Tra() 2008-10-24 16:37:24 +00:00