Commit Graph

288 Commits

Author SHA1 Message Date
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 32423ca043 Improved comment on the order of the returned elements in a kdtree 2013-01-31 10:44:44 +00:00
Paolo Cignoni 8e9430889c simple orthographic errors in comments 2012-11-07 17:56:07 +00:00
Paolo Cignoni 2c32f546ef Added a VertexConstDataWrapper to the kdtree helper classes for a simpler use of a kdtree to index the vertexes of a mesh 2012-10-25 16:55:52 +00:00
Paolo Cignoni f96cbbe7e4 Made the member with the distfunctor no more a reference but a copy. To avoid issues when passing temporary dist functors... 2012-10-18 09:01:51 +00:00
Paolo Cignoni d3d85dd0c0 corrected small bug in the gridclosest scanning function that caused rescan of the inner box when the search region in the uniform grid was growing. 2012-10-18 08:44:11 +00:00
Massimiliano Corsini 47adc093b2 add the possibility to specify the cell size 2012-09-19 09:05:40 +00:00
Massimiliano Corsini dec783bcf0 add SetByPointers to deal with containers of pointers instead of containers of elements 2012-09-03 13:50:42 +00:00
Massimiliano Corsini f16b821dc0 minor fix 2012-08-27 15:50:55 +00:00
Nico Pietroni fc97ed0e1c added support for primitive subdivision into cells 2012-08-27 12:47:12 +00:00
Nico Pietroni 461c8e1552 added support for primitive subdivision into cells 2012-08-27 12:46:50 +00:00
granzuglia 0448e15f5b - removed compile time errors 2012-07-23 12:16:17 +00:00
Massimiliano Corsini a5bec5b623 Fix Remove method (replace 3d box with 2d box) 2012-07-20 11:07:04 +00:00
Paolo Cignoni 58eced0506 Changed one of the init overload Set(), the one that allowed to specify the cell radius but ACTUALLY it did not use it...
now has a new name : SetWithRadius
2012-07-06 09:40:09 +00:00
Paolo Cignoni 38b8ab1f15 Corrected a bug in GridStaticPointer: The hint about the number of cell to be used was ignored and used only to compute the expansion offset. 2012-07-06 06:58:17 +00:00
Paolo Cignoni b77fa00b5e removed a few unused commented out funcs 2012-07-04 15:27:17 +00:00
Nico Pietroni 066f46c20b first release version 2012-06-22 14:27:33 +00:00
Paolo Cignoni bc57fc36b4 Moved here and cleaned the kdtree for points implemented by Gael 2012-02-22 16:57:44 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +00:00
ganovelli 017323e803 IptoP changed into IPfToPf 2011-04-13 16:15:13 +00:00
Paolo Cignoni 6a876e1fc9 removed warnings due to deprecated hash map usage 2011-02-17 16:40:56 +00:00
Paolo Cignoni 7eaece45af harmless gcc warnings 2011-02-17 11:41:21 +00:00
Paolo Cignoni 8446d9f566 added method to know if a spatial indexing structure is empty or not 2010-11-09 08:15:14 +00:00
Paolo Cignoni 070c47b0a5 added method to know if a spatial ubdexing structure is empty or not 2010-11-09 08:12:58 +00:00
Paolo Cignoni 349e9869cf Updated many vcg files to do not use anymore the vcg::Max(a,b) and vcg::Min(a,b). Use the std version instead. 2010-09-21 22:09:13 +00:00
Federico Ponchio 1017656a61 returned closest point was wrong. 2010-07-15 19:37:59 +00:00
Nico Pietroni ac4a79bc8f corrected call to new function Name IntersectionRayBox 2010-04-21 17:22:39 +00:00
Paolo Cignoni bdc74ae3b4 uniformed to the new intersection naming schemas 2010-04-20 00:59:38 +00:00
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
Paolo Cignoni fbbf8fe436 Removed gcc4.4 warnings 2009-12-08 15:57:19 +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
granzuglia b686bd1d31 changes in order to compile with gcc 3.x 2009-07-15 16:29:10 +00:00
Paolo Cignoni a5cb113561 added a method for getting the center of a grid cell 2009-07-14 08:55:20 +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 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 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 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 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 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
Paolo Cignoni 1407af2537 removed harmless warnings 2008-07-09 10:31:55 +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 66ee02eb49 __int64 is a MS only type. Added portability defines at the beginning. 2008-02-20 11:31:13 +00:00
Marco Callieri 3716a8c6df in BestDim(...) changed int -> _int64 to cope with programs with a very large cell number (like plyMC) 2008-02-19 12:43:01 +00:00
ganovelli 2dea5562fe typo corrected 2008-02-04 19:18:44 +00:00
Federico Ponchio 68032b71dd Added method Gather:
Using a cubic voxel of side <radius> (see Set with radius)
allows you to process all pairs of objects within radius distance.
Usefull to compute normals, weighted means etc.
Speedup is about 7x.
2007-07-16 16:59:26 +00:00
Paolo Cignoni 8bfd6c40e0 Splitted initialiazation functions of grid to add flexibility in the creation 2007-07-16 15:13:39 +00:00
Paolo Cignoni 220baf92c7 Corrected gcc compiling issues 2007-07-02 04:25:32 +00:00
Paolo Cignoni ca8780af81 casting (size_t) to (int) to avoid annoying warning 2007-06-06 10:33:36 +00:00
Paolo Cignoni 9fee0bfaaa Corrected wrong deallocation when octree was destroyed after being never used. 2007-05-10 10:48:49 +00:00
ganovelli ec652a6d99 added cast to avoid warning 2007-05-04 16:17:24 +00:00
Nico Pietroni c466753fe5 corrected test with max distance in ray Iterator 2007-03-26 08:12:30 +00:00
Nico Pietroni 00cc5e3f15 line 375, corrected 1 error concerning intersection with bounding of the grid 2007-03-08 17:05:50 +00:00
ganovelli 116707257a modif in ClosestIterator to include the last shell Si.siz [X|Y|X]. Tested with minialign and point based animation 2007-02-20 16:22:50 +00:00
Paolo Cignoni c4b0073433 Initial commit. Only the Set and GetInSphere methods of the SpatialIndex interface are implemented. 2007-02-18 22:43:10 +00:00
Paolo Cignoni fb51d1f3f9 end() replaced by pointer lastPlusOne 2006-12-06 17:47:50 +00:00
Nico Pietroni f2706529cf changed 1 wrong comment RayIterator---- Refresh .. was the opposite 2006-12-06 12:53:14 +00:00
Nico Pietroni 478e2ad4cd corrected 1 bug in operator ++ of closest iterator 2006-10-26 08:28:50 +00:00
Nico Pietroni a8b6014a73 corrected bug in closest iterator.. if doesn't find any alement at first cells examinated continue until find some element 2006-10-25 15:59:29 +00:00
Paolo Cignoni fe32dbea36 just few rearrangements... 2006-10-25 12:46:07 +00:00
Nico Pietroni 5799203aaf added max dist control and constructor 2006-10-25 09:47:53 +00:00
Paolo Cignoni 4b4dd13689 Minor bug fixed 2006-10-19 13:32:23 +00:00
Paolo Cignoni 9031924a14 Added some templatedoctree to compile under 2003 2006-10-18 15:11:26 +00:00
Federico Ponchio 6eb4a5b293 Working on mingw now. 2006-10-18 08:32:03 +00:00
Paolo Cignoni 5e4f12f28a minor changes to comply gcc compiler 2006-10-16 16:10:22 +00:00
Paolo Cignoni 51efef83bf Conformed with the base interface 2006-10-12 11:02:57 +00:00
Paolo Cignoni 60d1fa3ccd Re-added diff 1.12 by Pietroni (cancelled by previous rollback):
in GridDoRay function the RayIterator must be initialized with maximum distance
2006-10-02 09:34:03 +00:00
Paolo Cignoni 9f8cbf3f08 Reverted to version 1.10 to nullify dangerous marfr960's changes 2006-10-02 09:28:45 +00:00
ganovelli 8f509dd74d reverted to version 1.20 for critical bug 2006-10-02 09:25:49 +00:00
Paolo Cignoni 59d7770ebb Reverted to version 1.14 to nullify dangerous marfr960's changes 2006-10-02 07:47:57 +00:00
Paolo Cignoni 9cf176a0ff Added methods GetClosest, GetInSphere and GetInBox.
Changed signature of Set method to comply with the SpatialIndex interface
2006-09-28 22:49:15 +00:00
Paolo Cignoni 7a82eb0b6e fix some bugs 2006-09-28 09:55:28 +00:00
Paolo Cignoni 8ecd4dc8f2 bug fix, add return type to Init 2006-09-27 08:49:32 +00:00
Paolo Cignoni b6bca3a60b initial commit 2006-09-19 16:28:41 +00:00
Federico Ponchio ac98066038 numeric_limits::(max)() -> numeric_limits::max() 2006-09-18 14:21:59 +00:00