Commit Graph

1865 Commits

Author SHA1 Message Date
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 69ebba04b9 Created.
PolygonSupport provides the functions to import a trimesh from a polygonal mesh and viceversa.
2008-10-27 16:54:32 +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
Federico Ponchio 5394003338 Fixed small error in documentation 2008-10-24 18:49:40 +00:00
Paolo Cignoni 8a8eb6fb65 add the possiblity to sort eigenvalues/vectors according to their absolute values 2008-10-24 17:21:53 +00:00
Paolo Cignoni 57fe4376a2 fix a few warnings 2008-10-24 12:45:02 +00:00
Paolo Cignoni 64fcbc961a compilation fix for 64bits systems 2008-10-24 12:41:50 +00:00
Paolo Cignoni 24ea4251a9 Matrix33: make const the binary operators 2008-10-24 12:20:44 +00:00
ganovelli 4783ac9a62 added an assertion 2008-10-24 10:26:28 +00:00
ganovelli d5113f6204 added missing functions
IsCurvatureDirEnabled
EnableCurvatureDir

and debugged CurvatureDirTypeOcf, which
returned wrong values and [MAJOR] wasted
8 floats per vertex every time it was included in the type (enabled or not)
2008-10-24 09:54:23 +00:00
ganovelli 3a5b6ed2f3 added missing checks in ImportLocal 2008-10-24 09:50:55 +00:00
ganovelli cba885edbe missing (unreachable) return added 2008-10-24 09:49:47 +00:00
Paolo Cignoni 64ce68dac0 * make EmptyRadius::HasRadius returns false
* make gl/Shader and gl/Program* a bit easier to use:
 - automatic object creation
 - add Uniform() overloads for vcg::Point*f types
2008-10-15 08:02:14 +00:00
ganovelli 79ef95435a Compacted EmptyCurvature and EmptyCurvatureDir in EmptyCurvatureData and added EmptyRadius 2008-10-14 16:47:02 +00:00
ganovelli c454c38e60 added EmptyCurvatureData and EmptyRadius 2008-10-14 16:45:36 +00:00
ganovelli 8198cf4c8b added HasFaceQualityOcf() to EmptyColorMarkQuality 2008-10-14 16:42:29 +00:00
Paolo Cignoni fc98a34972 Add an optional per vertex radius property in occ, ocf, and IO mask.
Extend derivation_chain from 10 to 12
2008-10-14 14:58:09 +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
ganovelli 699ca34f0c added missing HasFaceQualityOcf() in InfoOcf 2008-10-14 09:23:36 +00:00
Paolo Cignoni f15dcf5536 compacted the EmptyMark componenet into the EmptyColorMarkQuality component, to shorten the derivation. 2008-10-14 06:41:46 +00:00
Paolo Cignoni 94178d7128 Added optional per face quality 2008-10-14 06:40:29 +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
granzuglia 5d25249427 removed a stupid reference (&) from function VN's return type 2008-10-08 15:11:38 +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
Paolo Cignoni f30376e18d Added const qualifier to method cC() in Color class 2008-10-08 14:43:15 +00:00
Paolo Cignoni 39e2cf2b3e Spherical Harmonics are templatized on the number of coefficients 2008-10-08 14:01:34 +00:00
ganovelli 75a7b0a846 [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 10:19:07 +00:00
ganovelli 0455dda283 corrected include path 2008-10-08 09:54:24 +00:00
ganovelli 23f7fc2bc3 added component for the spherical harmonics (by Daniele Bernabei) 2008-10-08 09:47:26 +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
ganovelli d0d580c4ae Changed GetIntrinsics into:
GetExtrinsicsToWorldMatrix and
GetWorldToExtrinsicsMatrix
2008-10-07 10:57:09 +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
Paolo Cignoni 9fc4f7d36f added a missing const to grid Create 2008-10-07 06:56:26 +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 bb741600ca <limits.h> to <limit> 2008-09-30 11:41:04 +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 7defccba1b getclosest update for \the new definition of distance functor 2008-09-30 11:01:09 +00:00