Commit Graph

862 Commits

Author SHA1 Message Date
Massimiliano Corsini c4ca67e959 fix typo 2009-01-12 16:11:37 +00:00
Paolo Cignoni 417c52b7b0 Better comments clarifying the purpose of Samplers and Algorithms for sampling 2009-01-12 16:01:49 +00:00
Massimiliano Corsini 1a05696eb5 first sketch of the Poisson disk (projection-based) sampling 2009-01-12 14:22:03 +00:00
Massimiliano Corsini abbf0d60ce starting to implement PoissonDisk sampling 2009-01-11 15:43:58 +00:00
Massimiliano Corsini 44aa343da6 minor changes in poisson disk 2009-01-09 17:05:10 +00:00
Massimiliano Corsini 3586a13438 replace rand() with MarsenneTwister generator 2009-01-09 14:35:46 +00:00
Paolo Cignoni 28c4843567 Heavily restructured. Now more robust and allow also the creation of discretized surfaces 2009-01-08 11:26:49 +00:00
Paolo Cignoni 20272bf7ac gcc compilation issues 2009-01-08 07:52:16 +00:00
ganovelli 8ae63ef1c3 - added optional parameter to return the closest vertex as a vertex attribute
- added a tolerance to check triangle inequality
2009-01-07 14:25:46 +00:00
ganovelli 2e7bde9f24 more clean up, unified single and multiple sources cases 2009-01-06 15:13:43 +00:00
ganovelli 818129d045 refactorized but Still to clean up;
It seems to work but "continuous" distance estimation cannot work with multiple sources.
In this case edge leght estimation is used.
2008-12-22 19:51:11 +00:00
Paolo Cignoni 56d93a02b6 Othography. Fartest -> Farthest 2008-12-21 07:44:29 +00:00
Paolo Cignoni 36c902097a put class in namespace tri, removed useless parameter from DistanceFromBorder() 2008-12-21 01:37:29 +00:00
ganovelli 39ffa7cd3d [SIMPLEXplus promotion]
This modification removes the old way to define simplexes (already deprecated and unsupported).
In the following SIMPLEX = [vertex|edge|face|tetrahedron]

All the stuff that was in vcg/simplex/SIMPLEXplus/ has now been promoted to vcg/simplex/

Details:
- the folder vcg/simplex/SIMPLEX/with has been removed
- the file vcg/simplex/SIMPLEX/base.h has been renamed into  vcg/simplex/SIMPLEX/base_old.h 
- the content of vcg/simplex/SIMPLEXplus/ has been moved into vcg/simplex/SIMPLEX/
- the folder vcg/simplex/SIMPLEXplus/ has been removed

Actions the update the  code using vcglib:
replace <vcg/simplex/SIMPLEXplus/*> with  <vcg/simplex/SIMPLEX/*> in every include
for MESHLAB users: already done along with this commit
2008-12-19 10:39:32 +00:00
ganovelli d3682195ca replaced a "3" with a f->VN() 2008-12-18 17:53:42 +00:00
ganovelli db04989f13 added support for meshes with holes 2008-12-18 17:52:48 +00:00
Paolo Cignoni 20b46e3122 added the default use of a safe random generator for shuffling vectors (mingw rand seems really bad...) 2008-12-18 00:30:52 +00:00
Paolo Cignoni c2c940338e added a missing PerFaceFromCurrentVertexNormal mode 2008-12-18 00:27:47 +00:00
Paolo Cignoni 8ef495be20 added test to skip degenerate triangles in curvature computation 2008-12-12 15:08:36 +00:00
Paolo Cignoni 4e2808a64e added assert for avoiding to put trash into a histogram 2008-12-12 15:06:27 +00:00
Paolo Cignoni 46cc8c7327 Removed harmless warnings 2008-12-11 13:56:37 +00:00
Paolo Cignoni 85dc63a154 moved here from meshlab. Long time due. 2008-12-11 13:52:25 +00:00
Paolo Cignoni 3485b76d8f Added explicit casts 2008-12-09 11:36:34 +00:00
Paolo Cignoni 8f591655f3 added comment on the two critical asserts 2008-12-09 07:52:27 +00:00
Paolo Cignoni 2143a5138a corrected bug in PerVertexFromCurrentFaceNormal (wrong use of Construct() ) 2008-12-09 07:51:33 +00:00
Paolo Cignoni a37e44cff1 Made create:box working. Current version was plain wrong. Thanks to Lorenzo Marchi 2008-12-08 14:56:28 +00:00
Paolo Cignoni 0047c70cae Translated comments, added various notes, removed some dead code, changed a bit the interface of the default edgelen predicate 2008-12-05 22:57:20 +00:00
Paolo Cignoni 0e13472efb corrected a wrong assert in grid creation function 2008-12-05 22:55:36 +00:00
Paolo Cignoni e744ca1c0e added the missing HasPerVertexMark 2008-12-05 22:45:05 +00:00
Paolo Cignoni f6388be600 added VertexSet, the dual of UpdateFlags::VertexClear(bitmask); 2008-12-05 22:44:03 +00:00
Paolo Cignoni cca3b3ad5f cleaned up a lot of typename gcc compilation issues 2008-12-02 10:04:16 +00:00
Paolo Cignoni 62c3f721aa Added missing include trimesh/allocate.h 2008-11-28 13:45:39 +00:00
ganovelli 1d263ec3ff added the possibility to include a container of edges as a third parameter.
This mod should be  fully backward compatible (tested .net 2005 and gcc 4.2.4)
2008-11-27 18:01:07 +00:00
ganovelli 9d8e452e65 added Alloc to support polygon meshes 2008-11-26 17:58:15 +00:00
ganovelli 01750729b6 missing checks on deleted simplex added 2008-11-26 17:57:09 +00:00
ganovelli faeef173e8 added AddEdge and RemoveEdge (still much ongoing) 2008-11-26 17:56:00 +00:00
ganovelli 4cae6b5107 added the update of the pointers related to the AddEdges 2008-11-26 17:46:31 +00:00
Massimiliano Corsini 992a808685 2008-11-20 17:00:30 +00:00
Paolo Cignoni 8e23847cab Distance functor is now a template parameter 2008-11-20 16:24:42 +00:00
Paolo Cignoni 619f3f69ef Addedd missing include 2008-11-20 13:26:59 +00:00
Paolo Cignoni 42709146e6 Addedd missing std namespace befor make_pair 2008-11-20 13:26:26 +00:00
Massimiliano Corsini 99e6ea5dd6 add fake poisson-disk sampling 2008-11-17 12:52:17 +00:00
Paolo Cignoni 5c6c7cafd5 changed the interface of the texel sampling function. Now width and height of the sampling texture can be different 2008-11-14 15:12:02 +00:00
Paolo Cignoni 360da1dd58 small changes (this-> disambiguations) and a type hack to grant compilation on mac gcc 2008-11-13 09:44:46 +00:00
ganovelli 2dfa6976ac [EDGE_SUPPORT] first working draft. It contains a class with two static function to compute indexed data structure from half edges and viceversa 2008-11-12 17:09:26 +00:00
ganovelli 274e20b3df changed m.HasFFTopology to HasFFTopology(m) 2008-11-12 16:06:59 +00:00
ganovelli 122f0412c8 made compliant to polygon_support 2008-11-12 16:03:24 +00:00
ganovelli c7e86ab57a remove unreferenced variable 2008-11-12 16:01:11 +00:00
ganovelli a5cbc8c7f8 added return to RemoveNonManifoldVertex 2008-11-12 16:00:27 +00:00
ganovelli e37cca54a3 [EDGE SUPPORT]
Added default template to TriMesh to include the edges.
Added peredge attributes.
These modification do not require any change to the code using TriMesh, but it allows
to specify a real type of edge in case you want to use it.
2008-11-12 15:51:01 +00:00
ganovelli 1aa88e635b added update of newEnd in AddFaces
Added [de]allocation of edges and per-edges attributes.
2008-11-12 15:46:16 +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
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
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 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 e587581275 add transposeInPlace and duplicate V(int) 2008-10-29 11:17:11 +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 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 69ebba04b9 Created.
PolygonSupport provides the functions to import a trimesh from a polygonal mesh and viceversa.
2008-10-27 16:54:32 +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
Paolo Cignoni 64fcbc961a compilation fix for 64bits systems 2008-10-24 12:41:50 +00:00
ganovelli 4783ac9a62 added an assertion 2008-10-24 10:26:28 +00:00
Paolo Cignoni c5ec73d0f7 Added IntersectionRayMesh overload function who return hit point, baricentric's coordinates and a pointer of intersected face. 2008-10-14 14:31:35 +00:00
Paolo Cignoni 9b0875d19e added a missing std:: 2008-10-14 14:28:33 +00:00
Paolo Cignoni 6f1e8d0641 Added UpdateColor::VertexFromFace and UpdateColor::FaceFromVertex 2008-10-14 13:41:37 +00:00
ganovelli dddce06a72 use of NextFE (of the jumping_pos) instead of NextE 2008-10-14 09:47:16 +00:00
Paolo Cignoni ae6f7fee0f Added FaceQualityGray() and changed (for sake of symmetry) FaceQuality() to FaceQualityRamp() 2008-10-14 06:37:36 +00:00
Paolo Cignoni de8504ba3e Added ComputePerFaceQualityMinMax() 2008-10-14 06:36:25 +00:00
ganovelli d7920e1cc4 Added principal curvatures direction computation with by means of normal cycles:
Restricted delaunay triangulations and normal cycle
Cohen-Steiner, David   and Morvan, Jean-Marie SCG '03
2008-10-13 14:55:05 +00:00
ganovelli 56857ecdb7 some cleanup of the Taubin tensor estimator (still not working properly) 2008-10-10 14:58:33 +00:00
Paolo Cignoni 78501226de Removed a few warnings and added a template keyword in the call of a templated function member. 2008-10-09 13:50:45 +00:00
Paolo Cignoni 413001c79b The fr parameter is now declared as const in local function ImportFace 2008-10-08 14:44:56 +00:00
ganovelli 0d4b3fbed0 [Polygon modification]
Added components to the face to handle generic polygons.
(compiled with .net and gcc)

This commit includes the following files:
vcg/complex/trimesh/base.h
Added deallocation of polygon data in the destructor

vcg/complex/trimesh/allocate.h
generalization from 3 to VN() vertices

vcg/complex/trimesh/update/topology.h
generalization from 3 to VN() vertices

vcg/complex/trimesh/update/flags.h
generalization from 3 to VN() vertices

vcg/simplex/face/pos.h
generalization from 3 to VN() vertices

vcg/simplex/faceplus/base.h
Added the method VN() to query the number of vertices
of the polygon (deafult 3) and methods Prev and Next

vcg/simplex/faceplus/component.h
added Alloc and Dealloc calls along the hierarchies
2008-10-08 09:10:53 +00:00
Paolo Cignoni b58cabc1b6 better comment at the begininning explaing a bit the Refine templated mechanism. 2008-10-07 07:02:01 +00:00
ganovelli a0cdf71abf found a bug in PrincipaDirections, clean up of the function and better comments (thanks E.Puppo) 2008-10-02 14:25:54 +00:00
Paolo Cignoni 4f2be6a4ba a forgotten trimesh -> tri (See previous commits of Fabio Ganovelli) 2008-09-30 12:38:34 +00:00
ganovelli e16d065e93 [Namespaces changes]
vert->vertex


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 11:41:58 +00:00
ganovelli 7f399c7515 [Namespaces changes]
vert->vertex
trimesh->tri


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 11:38:05 +00:00
ganovelli 3831d9716f [Namespaces changes]
vert->vrt


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:59:29 +00:00
ganovelli b96b375d64 [Namespaces changes]
vert->vrt


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:57:42 +00:00
ganovelli beb57b487c [Namespaces changes]
vert->vrt


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:57:09 +00:00
ganovelli abd367ac3f [Namespaces changes]
vert->vrt


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:56:35 +00:00
ganovelli e5d28ed8b5 [Namespaces changes]
trimesh->tri

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:55:18 +00:00
ganovelli ece2df9202 [Namespaces changes]
trimesh->tri


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:53:28 +00:00
ganovelli 682865bf25 [Namespaces changes]
trimesh->tri


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:52:37 +00:00
ganovelli ac3321980c [Namespaces changes]
vert->vertex
trimesh->tri

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:52:09 +00:00
ganovelli 13c853509e [Namespaces changes]
trimesh->tri


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:51:38 +00:00
ganovelli 7e579b7895 [Namespaces changes]
edge->edg


clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:50:43 +00:00
ganovelli 9143a0d389 [Namespaces changes]
edge->edg
trimesh->tri

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:49:09 +00:00
ganovelli cec96ba260 addded template parameter to comply the new definition of functor and
[Namespaces changes]
vert->vertex

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:48:41 +00:00
ganovelli 970c388277 [Namespaces changes]
edge->edg

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:47:09 +00:00
ganovelli e15127934c [Namespaces changes]
edge->edg

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (extended namespaces):
order 0 (vertex)      :vertex 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle (temporarily it remains "face")
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:46:18 +00:00
ganovelli 8fd3eecf80 added version on IntersectionBallMesh that take a grid. It's a draft, to be refactored. And
[Namespaces changes]
edge->edg

clean up of some namespaces to comply the following naming:

Complexes (3 letters namespaces):
order 0 (point cloud    ) :vrt
order 1 (edge meshes)     :edg
order 2 (triangle meshes) :tri
order 3 (triangle meshes) :tet

Simplexes (4 letters namespaces):
order 0 (vertex)      :vert 
order 1 (edge)        :edge 
order 2 (triangle)    :triangle
order 3 (tetrahedron) :tetrahedron
2008-09-30 10:18:24 +00:00
Paolo Cignoni 8143b27315 added missing include callback.h 2008-09-29 10:12:38 +00:00
Paolo Cignoni f3bddee157 gcc compiling issues (again using template keyword to disambiguate templated functions in templated classes) 2008-09-25 16:10:47 +00:00
ganovelli a097ef4df9 automatic rough alignment by using 4pcs (4-points congruent sets for Robust pairwise surface registration, Mitra et al. SIGGREAPH 08). First working draft 2008-09-24 16:17:33 +00:00
ganovelli 68d900ec7e changes to compile previous commit with gcc 2008-09-24 09:15:38 +00:00