Commit Graph

739 Commits

Author SHA1 Message Date
ganovelli 9e45730d93 DIstance to SignedDistance 2013-03-13 09:40:55 +00:00
Paolo Cignoni 888b89f834 Added reading and wrinting of polygon to simple ascii files 2013-03-13 00:14:21 +00:00
Federico Ponchio 383c16acd4 changed P() to something less ugly. 2013-03-04 20:35:03 +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
ganovelli 8c998ccd11 vcg::tri::Allocate<MESH>::Get*Attribute(m,name);
has CHANGED!

Before it was returning a valid handle to the attribute
IF it existed, otherwise the handle was invalid.
 
Now it always returns a valid handle to the attribute,
by creating the attribute name if it did not exist or returning
the handle to it if it was already there.

ALl the code using Get*Attribute  has been changed accordingly.
2013-01-30 17:18:55 +00:00
Paolo Cignoni 7a205ecad6 removed harmless warnings 2012-12-02 15:07:17 +00:00
Paolo Cignoni dc44ff8265 Added ComputeSimilarityMatchMatrix (and removed useless printout...) 2012-11-27 22:49:21 +00:00
Paolo Cignoni 2cbd4b7964 Added support for the color support in STL files (both the SolidView and the Magics 'standard'). 2012-11-27 07:05:38 +00:00
Paolo Cignoni 9a47f8db4c removed unused var... 2012-11-22 23:32:35 +00:00
Paolo Cignoni 039bc9bafa Added the new version of the point matching code. Now it is under space and no more under math 2012-11-22 23:29:43 +00:00
Paolo Cignoni 8f079de515 Added a bunch of 'c' to component members to clarify constant access 2012-11-15 19:14:29 +00:00
Paolo Cignoni 8b4d04be7a Added a bunch of 'c' to component members to clarify constant access 2012-11-15 19:11:28 +00:00
Paolo Cignoni 0d95c87141 Removed the old normal extrapolation 2012-11-08 17:20:31 +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 027da6f0a8 Just changed the default number of rotation attempt for packing OO polygons 2012-10-23 08:48:26 +00:00
Paolo Cignoni b26b406f8f Added a ToEigenVector method 2012-10-22 18:43:24 +00:00
Paolo Cignoni c87cd495de Rewrote of the Fitting to plane functions. Added Weighted version and sample 2012-10-22 18:27:30 +00:00
Paolo Cignoni 1918c53a09 Cleaning of names and reordering of Color functions 2012-10-19 11:52:57 +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
Paolo Cignoni 372ee1ed99 Corrected a small (!) bug in the IntersectionSegmentTriangle. (the line triangle intersection function returns a **signed** distance...) 2012-10-15 09:42:05 +00:00
Paolo Cignoni 19675a4e33 Deprecating the use of old dangerous linear algebra code. Please use Eigen!
Now attempting to include lin_algebra will block your compilation...
2012-10-11 10:48:55 +00:00
Paolo Cignoni fc75c0c62d Harmless gcc warnings 2012-10-09 07:05:45 +00:00
Paolo Cignoni c059114300 Orthography lenght -> length 2012-10-08 09:05:11 +00:00
Paolo Cignoni dfc9192715 Orthography lenght -> length 2012-10-08 09:03:25 +00:00
Nico Pietroni 1aecce2033 added IsCCW function 2012-10-03 16:39:29 +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
Paolo Cignoni 7e4e023266 Removed a dubious unused normalize method... 2012-07-03 09:29:48 +00:00
Paolo Cignoni b08fda7641 Corrected SegmentPointSquaredDistance to do not use anymore a hardcoded EPSilon value... 2012-07-02 16:45:49 +00:00
Nico Pietroni 066f46c20b first release version 2012-06-22 14:27:33 +00:00
Nico Pietroni 614a5fec16 first release version 2012-06-22 14:25:35 +00:00
Nico Pietroni 0e3d2abcfd corrected return value of closest point 2012-06-22 14:23:33 +00:00
Federico Ponchio cb639a12d7 renamed from max/min to hi/low 2012-06-14 09:40:26 +00:00
Nico Pietroni d4ad0bd6f6 added check if length of segment is zero then function SegmentPointDistance still works 2012-05-25 13:32:48 +00:00
Paolo Cignoni 7537b20933 Added a NormalizedDirection method 2012-05-05 14:54:45 +00:00
Paolo Cignoni 8eb94a7f9d Changed ColorRamp non static method into a static one (that constructs a Color4b object) and added a more uniform SetColorRamp method. 2012-04-18 21:17:04 +00:00
Paolo Cignoni b57a747441 rewriting of the SegmentPointSquaredDistance, now it is much much much shorter. 2012-03-14 15:57:37 +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 1def190868 harmless gcc warnings 2012-02-09 17:55:41 +00:00
Paolo Cignoni 790cf5d7ef Added a second function to compute the distance between a point and a box, according to the fact that you need the distance between the surface of a box or the distance from the filled box (e.g. the distance is 0 inside the box) 2012-02-09 17:30:54 +00:00
Paolo Cignoni 86f636b64b Added function to add a point with radius to a bbox. 2012-02-09 17:24:23 +00:00
Nico Pietroni 69508353bb resolved minor compilation issues 2012-02-09 14:02:34 +00:00
Paolo Cignoni a53887e893 added operator [] and function Direction() 2012-01-18 16:45:50 +00:00
Paolo Cignoni a61f6db8ac corrected return value bug 2012-01-18 16:43:40 +00:00
Paolo Cignoni 5bb5c1a1eb Correct a function name to match attribute order
IntersectionPlaneLine(line,plane) -> IntersectionPlaneLine(plane,line)
2012-01-18 16:41:34 +00:00
Paolo Cignoni f4cf3b9221 Changed the name of the Distance from point to plane
from DistancePointPlane
to     SignedDistancePointPlane
to underline the fact that it is SIGNED!!!
2012-01-18 11:44:42 +00:00
Paolo Cignoni ac3107cdb4 added comments to the color Scatter function (I never remember the meaning of the params) 2012-01-18 11:24:33 +00:00
Nico Pietroni 75aca76eb7 Added PointInsidePolygon function 2012-01-12 00:53:37 +00:00
Paolo Cignoni 4c4d505b6f added assert for discouraging inconsistent triangleplane intersection 2011-11-21 08:54:35 +00:00
Paolo Cignoni 20ec79715b Improved comments to the interpolation function that requires a preferential axis 2011-11-21 08:02:31 +00:00
granzuglia 59b789818e renamed ILLUMINANT_* with VCG_ILLUMINANT_* in order to avoid conflicts with the visual studio defines. 2011-11-18 10:42:19 +00:00
Paolo Cignoni c9fbf25362 Cleaned up
- gcc warnings 
- useless printf...
2011-11-15 18:03:58 +00:00
Paolo Cignoni 0a80e1e8ca Cleaning up Plane3...
- comments (the sign of the offset please!!!)
- name of the Distance function -> DistancePointPlane(...)
- a missing normalization in the Init (!)
2011-11-15 11:11:12 +00:00
Paolo Cignoni f631d88c90 changed the comment of the function Convert from polar coordinates to cartesian coordinates ** it uses RADIANS and not degree...** 2011-11-15 11:07:49 +00:00
Paolo Cignoni 3b7609a7e8 Added algorithms for packing into a square rectangles and polygons 2011-10-20 22:29:20 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +00:00
Paolo Cignoni 122cc50798 added missing Abs(Point2) 2011-05-12 09:52:34 +00:00
Paolo Cignoni db5320cc64 Modified IntersectionPlaneSegment so that it returns always the same intersection independently from the segment orientation
Return false if segment is parallel with the plane.
2011-05-11 09:56:23 +00:00
ganovelli 017323e803 IptoP changed into IPfToPf 2011-04-13 16:15:13 +00:00
ganovelli dbd3bd1a70 rewritten wrong planeboxintersection 2011-04-13 16:07:35 +00:00
ganovelli 6b3c096e44 removed cvs old comments 2011-04-13 16:06:19 +00:00
Paolo Cignoni f8eb8a41dd Cleaned up a bit triangle3. Removed some weird interpolation wrappers (that ended to be misused) and updated the rest of the lib to comply with this changes 2011-04-05 21:53:12 +00:00
Nico Pietroni ed6221e993 Added TriangleTriangleIntersect2D function 2011-04-01 16:13:34 +00:00
Paolo Cignoni cf619d282b Corrected various c++ errors. 2011-04-01 06:26:31 +00:00
Gianpaolo Palma 7816e73d74 Changed "int lenght" to "ScalarType lenght" in ClosestPoint function. 2011-03-22 18:17:52 +00:00
Gianpaolo Palma e3d8489f0f Bug fixed in the ClosestPoint2Box2 function 2011-03-21 17:03:34 +00:00
Gianpaolo Palma e90c417d2b Minor changes in ClosestPoint function 2011-03-21 17:02:02 +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
Marco Callieri 6395138b1f added function for laplacian smoothing of normals on unstructured point clouds 2011-02-09 14:42:30 +00:00
Paolo Cignoni 7e611ef038 Removed and assert in the quality computation (if one side is zero for numerical rounding it should return zero as quality) 2011-01-27 10:49:23 +00:00
Nico Pietroni b89a689a15 triangle3 InterpolationParameters calls now calls InterpolationParameters2 which correctly refers to the unique implementation of triangle2d evaluation of barycentric coordinates in triangle2.h 2010-12-13 00:01:13 +00:00
Nico Pietroni 542bfc8a91 corrected InterpolationParameters funtion in order to evaluate correctly barycentric coordinates even for points wich falls outside the triangle. 2010-12-12 23:59:55 +00:00
Nico Pietroni 387c62414a added constructor with Min and Max 2010-12-12 23:57:39 +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
Nico Pietroni c818969366 added method P to return bounding box points as in Box3 2010-11-05 16:18:51 +00:00
Paolo Cignoni 999e110d01 renamed EPSILON into loc_EPSILON to avoid collsions with some defines. 2010-10-15 21:46:16 +00:00
Paolo Cignoni 98d61f03a2 removed an extra typename detected by gcc... 2010-10-15 21:15:39 +00:00
Nico Pietroni 6d34aec94b TrianglePointDistance moved to distance.h 2010-10-15 15:17:57 +00:00
Nico Pietroni e690807441 Distance functions moved to distance3.h 2010-10-15 15:17:15 +00:00
Nico Pietroni 793cf46180 - SquaredDistance moved to distance3.h
- Lenght and SquaredLength changed to const functions
2010-10-15 15:16:32 +00:00
Nico Pietroni 6ad59d0756 corrected IntersectionSegmentTriangle calls, the value dist was not updated coherently 2010-10-15 15:15:27 +00:00
Nico Pietroni efadeb21f1 DistancePoint3Box3 calls moved and renamed in distance3.h 2010-10-15 15:14:06 +00:00
Nico Pietroni 6134c11fbd first release version of the collection of minimum distance functions between geometric entities in 3D 2010-10-15 15:13:22 +00:00
Paolo Cignoni 2e9d5c0936 removed some old surviving math:Max and changed to std::max 2010-10-15 09:13:58 +00:00
granzuglia de3371806e added #include<algorithm> 2010-10-08 12:08:24 +00:00
granzuglia b3d63c7c64 moved InterpolationParameters function after the Normal function definition 2010-10-06 12:58:09 +00:00
Nico Pietroni 8370978230 Added a new call of InterpolationParameters with infers the Normal by the Triangle itself 2010-10-01 13:47:16 +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
mtarini 4dcb3be0b3 minor: removed superfluous "typename" 2010-07-25 13:31:57 +00:00
mtarini 2cc56a6651 Cleaned up! Translated several comments, removed old history, Added GlobalToLocal and LocalToGlobal and MakeSquare, cleaned up types, etc. 2010-07-24 15:29:20 +00:00
Federico Ponchio 1017656a61 returned closest point was wrong. 2010-07-15 19:37:59 +00:00
Paolo Cignoni 882d039da6 removed mostly harmless gcc warnings (unused/uninitialized vars) 2010-07-14 08:00:16 +00:00
Paolo Cignoni 04694569cf corrected un-initialized variable in RGBtoHSV 2010-06-23 14:23:32 +00:00
Paolo Cignoni 044412a099 Added initialization of tex index in the constructor of texcoord 2010-06-16 10:27:38 +00:00
Paolo Cignoni 12d257c3ab Debugged:
method Point2::SquaredDistance() invoked Norm2 method, which does not exist. Invocation replaced with (*this-p).SquaredNorm()
2010-05-31 12:13:47 +00:00
Nico Pietroni cf60111b79 changed call to InterpolationParameters... 2010-05-31 10:12:31 +00:00
Paolo Cignoni 157ba4ccfb added class prototype for segment (needed for box intersection) 2010-05-24 08:25:26 +00:00
Nico Pietroni 44618a036a Added ClosestPoint2Box2 function 2010-05-20 13:58:08 +00:00
Paolo Cignoni c41e4d2e04 IMPORTANT CHANGE;
the rarely used frompolar and topolar returns angles in RADIANTS
changed the function names to clarify, avoid stupid bugs, and to adequate to the standard
2010-05-04 08:07:18 +00:00
Paolo Cignoni 77a846fe90 added a wrapper to the robust InterpolationParameters that uses a normal to choose the interpolation orientation 2010-04-30 09:42:10 +00:00
Federico Ponchio 8331ee9981 added IsIn for sphere 2010-04-22 19:05:24 +00:00
Paolo Cignoni cb73c0bb80 added a missing vcg::math:: namespace qualifier 2010-04-21 21:09:57 +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 3291bb2889 Made uniform the naming of the intersection functions, added some comment and improved a bit the robustness of the triangle triangle intersection test in a mesh 2010-04-20 00:41:45 +00:00
Paolo Cignoni db53730ae7 better comments for intersectionLineTriangle 2010-04-14 09:16:13 +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
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