Commit Graph

3272 Commits

Author SHA1 Message Date
Marco Callieri 0ba814697c Poisson sampling was ignoring the DELETED flag, so when a part of a mesh was deleted but still in memory, would sample it. added a couple of if(!(*vi).IsD()) tests in [InitSpatialHashTable], [ComputePoissonSampleRadii] and [PoissonDiskPruning].
Seems to work, but please test it. 
Beware: there could be more places where this is needed; I only checked poisson.
2014-01-21 14:59:45 +00:00
Marco Callieri 17ed6bdac4 in the function used to compute normals for pointclouds, added a check during consensus propagation to avoid flipping normals backface w.r.t. the specified wiewposition.
It does seem redundant, but it may happen, by mere chance, that the starting point used for consensus propagation, forces other points to flip even if the resulting flip places them backface w.r.t. the specified wiewposition
--to be tested--
2014-01-10 13:00:09 +00:00
Paolo Cignoni e4311e9d5a Added comment to voronoi parameter 2013-12-20 11:46:50 +00:00
Paolo Cignoni 2df9b39d16 Further clean up of the voronoi relaxation framework. changed the old VoronoiClustering to ConvertToDelaunayTriangulation (for coherence with the other function) and rewrote its code. 2013-12-20 11:44:18 +00:00
Paolo Cignoni 91946b7847 Added basic link condition for FF adjacency and VVOrderedStarFF 2013-12-20 11:42:27 +00:00
Paolo Cignoni ab5869f6c3 Added the possibility of constraining the movement of some seeds onto a specific domain. Now during relaxation you can for example fix some seeds and constrain some other seeds over linear features defined as subset of vertices. 2013-12-20 02:33:36 +00:00
Paolo Cignoni d1a5d53a89 added VertexBorder sampling algorithm that simply collect all the vertexes on the boundary. 2013-12-20 02:27:09 +00:00
Paolo Cignoni 2acd02f102 Added RequireCompactness to the basic exception throwing requirements that you can write at the beginning of an algorithm 2013-12-20 02:24:22 +00:00
Paolo Cignoni 4897d75026 Added MissingCompactnessException to the basic vcg exceptions 2013-12-20 02:23:24 +00:00
Nico Pietroni 45c93e47f0 corrected 1 warning 2013-12-16 12:07:54 +00:00
Nico Pietroni c1403e2fef - added FaceSaturate function
- corrected vertex from face quality copy
2013-12-16 12:07:26 +00:00
Paolo Cignoni 43b738796d Significantly improved documentation. Refactored a bit some of the Add* for better readability 2013-12-12 20:35:27 +00:00
Federico Ponchio 030d966b4a added #include <string.h> for memcpy 2013-12-11 14:20:17 +00:00
Paolo Cignoni 6c883d3cf3 Added a few assert to prevent the spread to trash data during voronoi relaxation 2013-12-05 22:35:25 +00:00
Gianpaolo Palma 89039d6658 Inverted face orientation for the Box 2013-12-05 17:43:36 +00:00
Paolo Cignoni 85ac0b3c4b removed a spurious debug exportply 2013-12-04 17:37:41 +00:00
Paolo Cignoni 6bd3faae14 removed a wrongly surviving duplicate copy of the space/point_matching.h. It was moved one years ago but for some strange svn reasons it was still around...
Killed.
2013-12-01 22:54:33 +00:00
Paolo Cignoni fd09d6fee2 Added standard heading comment to the newly added file. 2013-11-28 23:39:45 +00:00
Paolo Cignoni 6762cdbacb First version of the cylinder clipping procedure.
Now it cut the mesh (the cap part is still lacking...

See the app/trimesh_cylclip example
2013-11-28 23:30:35 +00:00
Paolo Cignoni 993a9a2c5b Tricky Change to the refine interface. Now the edge and midpoint predicate are passed as reference so if you need you can make predicate with state. This is useful when the edge and midpoint predicate share a lot of common information and you want exploit the computation done in the edge predicate (e.g. sometimes when you decide if an edge has to be split you already know where the vertex should be placed). 2013-11-28 23:29:06 +00:00
Gianpaolo Palma eeaabe684c Compiling errors fixed in the function ClosestPoint2Box2 2013-11-28 16:34:20 +00:00
granzuglia fa8a11fd32 - added missing include 2013-11-28 12:55:58 +00:00
Paolo Cignoni 74749469e1 Added distance based relaxation option instead of the standard geodesic relaxation 2013-11-27 17:24:04 +00:00
Paolo Cignoni 1c20f47552 added OrientedCylinder to primitive creating functions 2013-11-26 11:49:47 +00:00
Paolo Cignoni bc218b8201 Include header cleaning and reordering. 2013-11-25 12:47:20 +00:00
Paolo Cignoni 51424a7896 committed a small change to the Geodesic::Visit
Now it can start from a set of seeds that are not at zero distance.
2013-11-25 12:46:30 +00:00
Paolo Cignoni cbc36cf147 Include header cleaning and reordering. 2013-11-25 10:40:33 +00:00
Paolo Cignoni ae18013dd2 Updated to a change of interface of VoronoiProcessing<VoroMesh>::VoronoiColoring 2013-11-25 10:39:48 +00:00
Paolo Cignoni 54b288611a Include header cleaning and reordering. 2013-11-25 10:38:17 +00:00
Paolo Cignoni 85ae6fe034 Updated to the change of interface of VFOrderedStarFF 2013-11-25 10:37:42 +00:00
Paolo Cignoni 7c0f42c4d7 Include header cleaning and reordering. 2013-11-25 10:35:39 +00:00
Paolo Cignoni cc72b3e3e1 Include header cleaning and reordering. 2013-11-25 10:32:41 +00:00
Paolo Cignoni f2bbdb787a Include header cleaning and reordering. 2013-11-25 10:31:30 +00:00
Paolo Cignoni fba7d7873e removed spurious printf 2013-11-25 10:31:01 +00:00
Paolo Cignoni 3d150e9aea changed an assert condition in FlipF that could lead to a failure in the case of quad mesh navigation over polygonal faces. 2013-11-25 10:15:54 +00:00
Paolo Cignoni a29df708da Removed warning. Changed a surely verified if condition into an assert.
(chosing the min between 3 elems we had a if-else chain where the last if was useless unless you have NAN )
2013-11-25 10:14:27 +00:00
Paolo Cignoni 1c1e3f778a Include header cleaning and reordering. 2013-11-25 10:12:01 +00:00
Paolo Cignoni 84c80a1972 Include header cleaning and reordering. 2013-11-25 10:01:24 +00:00
Paolo Cignoni 6ec2689383 Corrected weird error in pos assignement operator. 2013-11-11 13:32:33 +00:00
Paolo Cignoni 25e6561f60 Changed the access to a segment endpoint according to the recent change P(x) -> Lerp(x) in the segment3 interface 2013-11-07 22:35:32 +00:00
Paolo Cignoni 3bdf666e86 Changed the interface of the interpolating function of a segment (2D and 3D) from the ambiguous P(float) to Lerp(float). Note that with the previous interface it could happen that seg.P(1) != seg.P0() just becouse seg.P(1) was the result of a lerp. 2013-11-06 16:06:57 +00:00
Nico Pietroni a445902e56 corrected 2 warnings on castings 2013-10-23 16:57:28 +00:00
granzuglia d4cbf8b65d - fixed heap bug 2013-10-18 15:32:04 +00:00
granzuglia d59e519e8f - added missing "#include" 2013-10-16 08:36:05 +00:00
Paolo Cignoni a1471cea44 Cleaned up a bit naming and comments and some interfaces of some bitquad functions 2013-10-10 16:02:27 +00:00
Paolo Cignoni b8769bd3e6 updated the voronoi atlas parametrization to the new geodesic api 2013-10-10 10:36:39 +00:00
Paolo Cignoni 93eb66356b removed a survived debug printf... 2013-10-09 09:18:56 +00:00
Paolo Cignoni afec01ce96 corrected order of include files (face/topology.h must go after complex.h) 2013-10-09 09:18:08 +00:00
Paolo Cignoni 4cf6f3d6e8 Added edge collapse of short edges and triangulation of voronoi regions 2013-10-09 08:49:13 +00:00
Paolo Cignoni dc842fd034 Corrected a Bug in the VFOrderedStarFF (it could return twice the same face in when asked on boundary faces)
Added FFCollapseEdge 
Added managment of faux edges in swapedges
2013-10-09 08:48:10 +00:00
Paolo Cignoni 2a552f8976 Corrected a wrong call to GetAreaAndFrontier that I forgot to update after the api change... 2013-10-07 08:07:16 +00:00
Paolo Cignoni 97a8cb9238 Removed the missing face bug and the wrong orientation bug. 2013-10-03 21:09:28 +00:00
Paolo Cignoni bf17b1b9f8 Heavylly change. Rewrote the voronoi to mesh converter. Added option for locking vertices 2013-10-03 14:32:53 +00:00
Paolo Cignoni 607e048265 added a few assert in the newly added AddFace shortcut 2013-10-03 14:32:01 +00:00
Paolo Cignoni 41bced16bd Added VertexBorderCorner sampling function (that returns all the vertices over the boundary and that are corners... 2013-10-03 10:00:53 +00:00
Paolo Cignoni 97f8b30adf changed a type of the Build wrapper to override a weird compiler error (form int[3] to point3i) 2013-10-03 09:59:11 +00:00
Paolo Cignoni ad17f61dc0 added a simple wrapper to add a single vertex to a mesh given its coords 2013-10-03 09:57:45 +00:00
Nico Pietroni 97d14f173f added clear V flag at the beginning of ImportFromTriMesh function 2013-10-03 08:21:08 +00:00
Luigi Malomo dd7e419215 corrected visibility classification for leaf BVs in frustum culling. 2013-09-26 17:26:47 +00:00
Luigi Malomo cf4844f4a4 fixed a bug in frustum culling.
objects that are not in the halfspace determined by the plane direction will be culled.
2013-09-26 11:16:26 +00:00
Paolo Cignoni df97ef0c36 Added zero initialization to quality component. (and corrected a small bug in the ocf quality component) 2013-09-24 13:55:23 +00:00
Nico Pietroni e3a8a50bc5 added #include <assert.h> 2013-09-21 00:54:53 +00:00
Nico Pietroni 7c08094a50 corrected AnisotropicDistance 2013-09-21 00:54:21 +00:00
Nico Pietroni affa165543 added explicit cast to ScalarType , line 286 2013-09-21 00:53:36 +00:00
Nico Pietroni afef24633f added #include <vcg/container/simple_temporary_data.h> 2013-09-21 00:52:24 +00:00
Paolo Cignoni 58471132ba Cleaned up a bit for better handling of point clouds 2013-09-11 11:11:10 +00:00
Paolo Cignoni 80467d1f41 minor changes (component check in the sampler class) 2013-09-11 11:09:29 +00:00
Paolo Cignoni 0263e6df9d Small changes in comments 2013-09-10 14:21:48 +00:00
Paolo Cignoni d974bf2770 Further tuning of poisson disk sampling pruning. Now we check also if the Spatial Hash Index is not over filled, 2013-09-10 13:41:16 +00:00
Paolo Cignoni 344de42c2e removed the return type from the ++ operator of the vfi iterator 2013-09-10 10:54:40 +00:00
Paolo Cignoni 46dc55fb3c Refactored code to use the AddFace of the Allocator that add and fill a face with three vertex pointers. 2013-09-10 10:51:15 +00:00
Paolo Cignoni 4fdfb1d62b Parameter Tuning for the PoissonDisk sampling using the getBestPrecomputedMontecarloSample heuristic. Now there is a better default and another param exposed. 2013-09-10 10:50:10 +00:00
Paolo Cignoni b849524274 Added Requirements. Refactored some funcs and uniformed naming of functions... 2013-09-10 10:49:01 +00:00
Luigi Malomo e65be2aa17 added Empty() and Clear() members to AABBBinaryTreeIndex. 2013-08-30 11:44:54 +00:00
Paolo Cignoni b49b2ce1e8 Added PerVertexBasicRadialCrossField for the creation of sample cross field 2013-07-26 12:21:40 +00:00
Paolo Cignoni 05d262ba9b Added conversion to polygonal mesh and to edge mesh of the generated voronoi diagram.
Improved behavior for biased distance diagrams
2013-07-26 12:20:40 +00:00
Paolo Cignoni a2b05e1f66 Added isotropic distance and anisotropic distance functor for biasing the geodesic computation. 2013-07-26 12:13:45 +00:00
Paolo Cignoni c5549f607a Cleaned up the edge allocator and added two small wrapper for adding and initializing a single face or edge with the vertex pointers 2013-07-26 09:34:41 +00:00
Paolo Cignoni f85ce4e334 Removed all references to the useless old vcg::math::Swap 2013-07-26 07:35:02 +00:00
Paolo Cignoni 04268b170f Removed all references to the useless old vcg::math::Swap 2013-07-26 07:01:21 +00:00
Paolo Cignoni f9db54196b Significant Change.
Removed old quality from geodesic function. Use the Geodesic class that has a singleCall wrapper doing the same in a eventually better way. 
Added a number of RequireXXX at the beginning. To be completed...
2013-07-24 12:00:47 +00:00
Nico Pietroni f22b8bef25 uncommented some code to find which vertex fix on poisson solving 2013-07-23 11:22:06 +00:00
Nico Pietroni fe7565ad2a commented the part that set as border the non manifold vertex 2013-07-23 11:20:44 +00:00
Paolo Cignoni c5fcfd94c1 Added a MeshSampler Class to the framework as a simple example of the sampling procedure
Added another wrapper for montecarlo sampling of points 
Improved the basic wrapper of poisson disk sampling to include variable disk radius sampling
2013-07-23 07:32:12 +00:00
Paolo Cignoni 99440c4e62 #ifndef NO_QT -> #ifdef QT_VERSION 2013-07-16 15:44:52 +00:00
Paolo Cignoni 42da29417b cleaned up a bit the interface and formatting of the code of the voronoiclustering alg 2013-07-05 14:46:48 +00:00
Paolo Cignoni 7b8f21ba7a Excluded from the computation of the mass intergrals the faces with an area that is <= std num limits <scalar>::min() 2013-07-03 21:44:39 +00:00
Paolo Cignoni 1655f806df removed M_PI_2 constant. (not more supported by vs2010 on) 2013-07-03 21:12:08 +00:00
Paolo Cignoni 29b3c4e1ec Added VertexCrease, EdgeMontecarlo sampling methdo
Improved PoissondDisk sampling algorithm with the bestSampleChoiceFlag parameter
2013-06-24 10:51:53 +00:00
Paolo Cignoni 98e49178ba Added IsCoherentlyOrientedMesh and cleaned up a bit the self intersection 2013-06-24 10:50:14 +00:00
Paolo Cignoni 9acdf598a1 removed harmless gcc warning 2013-06-24 09:36:46 +00:00
Paolo Cignoni 388435d15a Added a default value to the optional cb parameter in the pointcloud normal generation function 2013-06-24 08:36:08 +00:00
Paolo Cignoni 90bb95a971 Refactorized to a uniform naming and parameters the various templated functions for generating random points
GenerateBarycentricUniform
GeneratePointInBox3Uniform
GeneratePointOnUnitSphereUniform
GeneratePointInUnitBallUniform
2013-06-24 08:34:53 +00:00
Paolo Cignoni be3e74ca6a Refactored CountInSphere / RemoveInSphere for the PoissonDisk sampling optimizations (now you can just count the element inside a given sphere without removing them. 2013-06-24 07:57:18 +00:00
Paolo Cignoni 9ad68bc573 Added DihedralAngleRad that computes the signed dihedral angle between the normals of two adjacent faces 2013-06-24 07:55:54 +00:00
Paolo Cignoni 49d759af2a Added EdgeBarycentricToFaceBarycentric to convert an edge position into a face barycentric position 2013-06-24 07:31:11 +00:00
Paolo Cignoni 5049407069 Added FaceFauxSignedCrease that Marks feature edges according to two signed dihedral angles. 2013-06-24 06:56:15 +00:00
Paolo Cignoni efe6379b4b Added updating of the bbox for generic mesh build
Added build for point clouds
Added Clear at the beginning of the Build(m)
2013-06-24 06:49:51 +00:00
mtarini 90cdbb6214 (just fixed a warning-producing redundant assert) 2013-06-05 11:08:55 +00:00
Nico Pietroni 5f59f1fa5a corrected some non templated type on SplitNonManifoldVertex function 2013-05-08 09:05:58 +00:00
Nico Pietroni a52a4d0ad3 added ClearCreases function..
corrected setting B for non manifold in VertexBorderFromNone
2013-04-24 14:22:43 +00:00
Nico Pietroni 04bca27a7e erased first assert of RemoveDuplicateEdge function 2013-04-20 15:13:49 +00:00
Paolo Cignoni 4ab12a165f uniformed syntax of the name of the parameters of the rect packer 2013-04-15 20:57:15 +00:00
Paolo Cignoni a1c03d2e61 uniformed syntax of the name of the parameters of the rect packer 2013-04-15 20:56:40 +00:00
Paolo Cignoni cbba83d17c added Annulus and OrientedAnnulus to mesh creation helpers 2013-04-15 20:14:27 +00:00
Paolo Cignoni 371ff46282 added a missing RequireVFAdjacency and corrected a bug into the RequireXX for a couple of other adjacency... 2013-04-12 09:16:49 +00:00
Paolo Cignoni eeddfe6a90 Updated to include better control of the voronoi parametrization. Changed packer (warning it requires qt...) 2013-04-03 10:07:29 +00:00
Paolo Cignoni 135f5f9ecb added Outline2VecBBox method 2013-04-03 10:02:19 +00:00
Nico Pietroni 01c0681291 added #include <vcg/complex/exception.h> 2013-03-30 15:31:57 +00:00
Nico Pietroni 8454fb5fc9 removed some commented part and changed FixDefaultVertices 2013-03-30 15:30:18 +00:00
Paolo Cignoni 84b8170401 Changed the default of the param and added the automatic reverse of flipped outlines 2013-03-26 23:02:23 +00:00
Paolo Cignoni c73b9a7727 Added first version of the rasterized outline packer written by Andrea Bernabei 2013-03-26 11:30:59 +00:00
Paolo Cignoni 9bd9f9fdc7 Further cleaning up and factorization of the stuff for the raster outline packer 2013-03-26 11:25:47 +00:00
Paolo Cignoni ea5c88be1a corrected harmless bug (misleading j/i scopes in nested for's) 2013-03-25 13:10:40 +00:00
Paolo Cignoni 4fa516b8d7 Added first version of the outlinesupport.h to manage various interaction between meshes, borders and outlines 2013-03-25 13:09:15 +00:00
Paolo Cignoni 668bf05a1d Refactored a bit CountConnectedComponents (added requiremens) 2013-03-25 10:33:22 +00:00
granzuglia 5bcce6a3d5 //static_cast<VertexPointer>(NULL) has been introduced just to avoid an error in the MSVS2010's compiler confusing pointer with int. You could use nullptr to avoid it, but it's not supported by all compilers.
//The error should have been removed from MSVS2012				
std::pair<float,VertexPointer> zz(0.0f,static_cast<VertexPointer>(NULL));
2013-03-24 16:33:50 +00:00
Paolo Cignoni 1fef63b1da improved a bit the basic step of the voronoi clustering 2013-03-22 17:07:55 +00:00
Paolo Cignoni e94cfb5a43 Refactored a bit the extended marching cube core. Cleaned up a bit the trivial walker to be used by both of them. Updated the sample for marching cube. 2013-03-22 17:06:41 +00:00
Paolo Cignoni 3a9a72c098 removed a useless template specialization to a few std::make_pair 2013-03-22 16:53:42 +00:00
Paolo Cignoni 246345bf19 removed a weird "#define static_assert assert" that was surviving since 2004... 2013-03-22 16:43:59 +00:00
Paolo Cignoni f3337dcb7c updated polygon component to the cP/P behavior for access to elements 2013-03-20 08:56:20 +00:00
Paolo Cignoni 12543d68a2 Removed also from this file the deprecated dependencies from linalg. NOW EVERY PIECE OF THE VCG relies on eigen for linalgebra. 2013-03-20 08:32:53 +00:00
Paolo Cignoni 72d67f4a11 Added parenthesis to clearly disambiguate if/then/else 2013-03-20 08:28:30 +00:00
Paolo Cignoni ba58ef9c1e corrected stupid error did in the conversion process (inverse was not returning anything...) 2013-03-19 22:04:35 +00:00
Paolo Cignoni 837329d98c Renaming to settle the old attempt of integrally using eigen matrix for matrix44 and matrix33 2013-03-19 21:53:52 +00:00
Paolo Cignoni e1dda51e85 Renaming to settle the old attempt of integrally using eigen matrix for matrix44 and matrix33 2013-03-19 21:52:39 +00:00
Paolo Cignoni 94a9b9a0f9 Renaming to settle the old attempt of integrally using eigen matrix for matrix44 and matrix33 2013-03-19 21:51:13 +00:00
Paolo Cignoni 2b47dcbb3d renamed the unused old lin_algebra and Matrix. just to be sure that NOBODY use them. 2013-03-19 17:05:56 +00:00
Paolo Cignoni 33c341b464 harmless change: added a missing vcg:: 2013-03-19 17:04:07 +00:00
Paolo Cignoni 2e65cae10e HEAVY CHANGE. Further cleaning of the matrix classes of VCG.
Get rid of all the unused stuff. 
internally use Eigen for computing Inverse. 
Removed the stupid incomprehensible method Invert() that changed the matrix itself. 
Nobody was using it in a reasonable way.
2013-03-19 16:59:45 +00:00
Paolo Cignoni f156a5a82c Updated version of the oldpolyrect packer. Reasonably extended to multiple domain. To be tested/replaced 2013-03-13 19:09:50 +00:00
Paolo Cignoni 5aaa6f4720 harmless small refactoring 2013-03-13 14:59:34 +00:00
Paolo Cignoni f62e07ee66 Corrected the behavoiour of the allocate::Compact when managing uninitialized and null element in adjacency 2013-03-13 14:33:09 +00:00
Paolo Cignoni 4665f36e40 Improved component documentation. Added IsVFInitialized, VFClear function for VF component. Clarified the difference between null and uninitialized for a VF component. 2013-03-13 14:02:03 +00:00
Paolo Cignoni 6950be4594 Improved comment/documentation. Changed throws in require 2013-03-13 14:00:29 +00:00
ganovelli 9e45730d93 DIstance to SignedDistance 2013-03-13 09:40:55 +00:00
Paolo Cignoni 8446dbc168 corrected a wrong interface to poisson pruning (left after recent changes) 2013-03-13 00:16:51 +00:00
Paolo Cignoni 8f45cb352e Added a simpler CompactEveryVector to allocate to compact face edge and vertices... 2013-03-13 00:15:13 +00:00
Paolo Cignoni 888b89f834 Added reading and wrinting of polygon to simple ascii files 2013-03-13 00:14:21 +00:00
ganovelli 4253c2f3b6 corrected bug on appending perFace and perEdge attributes
(thanks to Minghua Nie for pointing it out).
2013-03-11 11:53:26 +00:00
Federico Ponchio 383c16acd4 changed P() to something less ugly. 2013-03-04 20:35:03 +00:00
Paolo Cignoni d61c5c24a1 Slight change of the PoissonDiskPruning interface. Removed a useless parameter (the original surface mesh) 2013-03-01 08:34:33 +00:00
Paolo Cignoni 0f34456c92 further cleaning up and commenting 2013-02-28 15:51:38 +00:00
Paolo Cignoni 391e376be7 Cleaned up a bit. Only a bit. 2013-02-28 07:02:20 +00:00
Paolo Cignoni d3d50e6858 Added two functions to generate point inside a box and over the surface of a sphere. 2013-02-23 06:15:23 +00:00
Paolo Cignoni 26392a560b Corrected a small bug in the Poisson disk sampling: as an unwanted side effect invoking the sampling will change the size of the bbox of the mesh. Mostly harmless but weird. 2013-02-23 05:50:27 +00:00
Nico Pietroni e5ed268b6a added function cVFi 2013-02-19 13:56:37 +00:00
Nico Pietroni 60bca978f7 added function VVExtendedStarVF 2013-02-19 13:55:15 +00:00
Nico Pietroni 4799f4c4bc minor changes 2013-02-19 13:54:14 +00:00