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
Paolo Cignoni
4420e5102b
Strictly less than instead of less than equals in
...
RayTriangleIntersection
2009-03-25 08:27:58 +00:00
Paolo Cignoni
42c90d1439
corrected two small compiling errors...
2009-03-19 22:11:35 +00:00
Marco Di Benedetto
93dade9042
modified DistancePoint3Box3 for out-of-box distance.
2009-03-19 21:13:38 +00:00
Marco Di Benedetto
389cc089db
Added non-const pointer accessor.
2009-03-19 11:13:17 +00:00
Marco Di Benedetto
0e2bc54b52
Added non-const pointer accessor.
2009-03-19 11:12:23 +00:00
Marco Di Benedetto
915a7b40a1
call IntersectionRayTriangle in Intersection_Segment_Triangle instead of generic Intersection (missing overload).
2009-03-17 18:59:20 +00:00
Nico Pietroni
6b781dc660
changed evaluation of AreaGlobal in InterpolationParameters function
2009-02-27 16:15:28 +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
f4ec24c552
Restored Ray-Triangle Intersection (as an extension of IntersectionLineTriangle)
2009-01-23 14:33:13 +00:00
ganovelli
f6b42772eb
added IntersectionLineTriangle
2009-01-22 14:34:27 +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
3e85ffd0ff
New function for computing baric coords in a more robust way
2009-01-08 11:24:54 +00:00
ganovelli
157301b773
change to comply random generation
2008-12-19 10:40:31 +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
6627c21d43
added a missing dot() product for the conservative people still using deprecated stuff...
2008-10-30 07:39:33 +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
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
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
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
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
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
b2960231ca
corrected bug on PointBase class (thanks Oscar Barney)
2008-09-22 13:40:53 +00:00
granzuglia
728a9020c4
The class PointBase has been renamed as Point.
...
An empty class PointBase has been added for backward compatibility.
Mathematical operation (+,+=,*,etc) in class Point<N,S> has been implemented.
2008-09-10 14:04:09 +00:00
ganovelli
1185e2ab96
minor type changes to compile with gcc
2008-08-19 11:03:39 +00:00
ganovelli
3cb29c805b
changed template from vcg::Triangle to generic class to allow to pass a vcg::FaceSimpX (recall: the disambiguation was done in the function name exactly for this reason)
2008-08-19 10:21:01 +00:00
ganovelli
82d9dec26a
aadded this-> to + operator to compile with .net
2008-08-07 16:22:27 +00:00
ganovelli
d35117d9c2
added precompiler check if FABS macro is already defined
2008-08-04 10:54:34 +00:00
ganovelli
57c0fc8238
added inclusion of point3.h, removed useless namespace in InterpolationParameters
2008-08-04 10:53:08 +00:00
ganovelli
08cdd7b3aa
added a version of CreateTight which takes a std::vector
2008-08-04 10:50:53 +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
Federico Ponchio
75ee76b233
PlaneFitting returns the eigenvalues instead of true now.
2008-07-21 08:34:31 +00:00
Paolo Cignoni
4555f74ee3
added operator + between color with clamped specialization for unsigned chars
2008-07-09 15:18:08 +00:00
Paolo Cignoni
1407af2537
removed harmless warnings
2008-07-09 10:31:55 +00:00
Nico Pietroni
38c1cc7aaf
changed epsilon value on InterpolationParameters function
2008-07-03 10:22:37 +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
616b3fedc5
Added the class oriented bounding box inherited from box3.h
2008-06-23 17:28:30 +00:00
Nico Pietroni
26e1c14de8
correct version of InterpolationParameters
2008-06-20 15:03:27 +00:00
Paolo Cignoni
d95f6ee798
Added a constructor from point4 of the same type to allow the use of Point4 operator; e.g. col1 = col2 + col3
...
Added Clamp operator to get rid of out of 0..1 range values for floats
2008-06-17 23:08:53 +00:00
Paolo Cignoni
8972bf2ea2
added construct from and to float
2008-04-22 20:44:07 +00:00
Nico Pietroni
517108e947
corrected 1 warning in DistancePoint3Box3 function
2008-04-07 10:26:10 +00:00
Nico Pietroni
3edf76179c
added default constructor
2008-04-07 10:24:55 +00:00
Nico Pietroni
8feedff976
correct 1 error on DistancePoint3Box3 (if the point is inside the box return distance to the nearest face instead of zero)
2008-03-05 11:48:08 +00:00
Nico Pietroni
94cb8fca1d
added DistancePoint2Box2
2008-03-05 11:45:36 +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