Commit Graph

1645 Commits

Author SHA1 Message Date
Paolo Cignoni 2577210a54 **** SIGNIFICANT CHANGES *****
- Cleaned up include order: Now you only need to include <vcg/complex/complex.h> (no more vertex/base.h etc) 
- Added official VN() EN() FN() const members for knowing number of vertexes etc...
- Added exceptions (at last!)
    Now instead of:
       assert(HasPerVertexNormal(m)) 
    you should write:
      if(!HasPerFaceNormal(m)) throw vcg::MissingComponentException();
2012-10-04 11:10:25 +00:00
Nico Pietroni 7ffcc407c9 corrected some warning and added support for read/write rosy format 2012-10-03 16:38:23 +00:00
Paolo Cignoni 14cffd1f6e Removed template default parameter. Now if you use the distortion class you have to specify if you want per vertex or per wedge tex coords. 2012-10-02 13:42:33 +00:00
Nico Pietroni a95c0efa2e added GradientToCross and ExporttoRosy format see Interactive Visualization of Rotational Symmetry Fields on Surfaces
Jonathan Palacios and Eugene Zhang
2012-09-18 15:31:40 +00:00
Nico Pietroni e2e948dbd6 added cast to float lines 308 309 2012-09-18 15:18:33 +00:00
Nico Pietroni 0cde611654 added function SetQasDistorsion and minor changes 2012-09-18 15:14:12 +00:00
Nico Pietroni 3658530bde corrected some warning 2012-09-05 23:25:55 +00:00
Nico Pietroni d9a95aaffc added Function FaceClearS 2012-09-03 15:56:24 +00:00
Nico Pietroni 10e827b071 added include <wrap/callback.h> 2012-09-03 15:55:41 +00:00
Nico Pietroni b297040835 added MakeDirectionFaceCoherent
solved gcc compiling issues
2012-09-03 15:54:25 +00:00
Paolo Cignoni cfba5001fd Disambiguate function name PerVertexWeighted -> PerVertexNelsonMaxWeighted 2012-07-31 09:15:20 +00:00
Paolo Cignoni f3ef64cc0c Heavily changed the whole hole filling class, now much shorter, more readable and hopefully more robust.
Still to better balance shape vs diedral angle quality measure.
2012-07-31 09:13:48 +00:00
granzuglia 0edde01197 - removed compiler time error from TestIntersection to TestFaceFaceIntersection 2012-07-27 17:48:17 +00:00
Paolo Cignoni 500a478e14 Improved the SplitNonManifoldVertex function. Now it is able to also move the split vertexes apart 2012-07-27 12:57:34 +00:00
mtarini 3adc453f53 Now zonohedra construction robust to basically *any* input, no matter how degenerate. 2012-07-24 01:48:21 +00:00
mtarini 15665c15ef added a few testing methods (IsTriOnly, IsQuadOnly, IsTriQuadOnly) 2012-07-20 13:50:08 +00:00
Paolo Cignoni f1d6d5d32a Changed the GetInfo of the hole stuff. Now it require the userbit specified 2012-07-19 08:09:28 +00:00
mtarini a70fd3daa5 Better comments 2012-07-18 22:18:14 +00:00
mtarini 8e4a8e9b6e first version 2012-07-18 22:02:36 +00:00
mtarini 240b88a582 added method MergeFlatFaces (does what it says). Plus clean-ups. 2012-07-18 21:46:12 +00:00
Paolo Cignoni 45b0deb7eb Important Change: ** LastBitFlag ** now is named ** FirstUnusedBitFlag **
Corrected the name of the function allocating a user bit among the flags of the simplexes. 
Changed in ALL the simplexes (vertex, edge, face, etc) and updating functions. 
Note that the LastBitFlag should never be used by common users...
2012-07-18 09:37:32 +00:00
mtarini 36d9030955 added SplitNonFlatQuads method 2012-07-17 19:21:46 +00:00
ganovelli d9132e6cbc corrected assertion 2012-07-09 15:14:36 +00:00
Paolo Cignoni 7ffb878913 SIGNIFICANT CHANGE
About the point to mesh distance functionalities
Now the two different 'path' for this distance computation (with or without the precomputation of planes and edges for triangular faces) are well distinct and with different names:
PointDistanceEP and PointDistanceBase

See the sample/trimesh_closest sample for more details
2012-07-06 15:24:04 +00:00
Paolo Cignoni 87d01da58f Yet some other changes to the stat collecting functions for computing the average edge lenght on a mesh. 2012-07-06 09:06:43 +00:00
Paolo Cignoni 3d956d8b48 Changed ComputeFaceEdgeHistogram into ComputeFaceEdgeDistribution. It was plainly wrong... :( 2012-07-06 08:08:24 +00:00
Paolo Cignoni 81a4cd4765 Corrected two wrong (unused) return types in stat collecting functions for trimesh 2012-07-06 05:38:05 +00:00
granzuglia 398f906bb6 added missing cmath include 2012-07-05 14:46:16 +00:00
Paolo Cignoni cd1ae00082 Added tri::UpdateFlags<MESH_TYPE>::FaceBorderFromFF(m); to the basic refine call.
In order to move these per face flags in less places as possible...
2012-07-04 15:25:21 +00:00
Paolo Cignoni b2e2bfe2df added Cotangent weighting to the basic laplacian smoothing. 2012-07-04 15:23:59 +00:00
Paolo Cignoni bfc10096f0 small improvemnt in stat collection for voronoi atlas 2012-07-03 10:21:41 +00:00
Paolo Cignoni f036874693 better comments 2012-07-03 09:14:17 +00:00
Paolo Cignoni e362d54a25 Timing functions and stat collecting for voronoi atlas 2012-07-03 09:13:07 +00:00
Paolo Cignoni 776fbe45a0 First Version of the Voronoi Atlas parametrizator. 2012-07-02 16:41:28 +00:00
Paolo Cignoni 539de75614 Cleaned up a bit the printint stuff. Now it should collect stats in a more clean way 2012-07-02 16:31:52 +00:00
Paolo Cignoni 487b6c7bd5 Corrected a bug in search for the best edge to be fixed in the FindFarthestVert when setting up the system for the poisson solver... 2012-07-02 09:38:42 +00:00
Paolo Cignoni 7cc19a31c6 Added two stupid wrapper to ComputePerFaceQualityMinMax and ComputePerVertexQualityMinMax 2012-07-02 08:30:17 +00:00
Paolo Cignoni 52fed4c451 Added a PerWedgeMakeUnitaryUV to normalize for packing 2012-07-02 08:29:11 +00:00
Paolo Cignoni ad9a7a237d updated to match the Distorsion->Distortion name change 2012-07-02 08:19:06 +00:00
Paolo Cignoni d900752b52 Renamed to correct the spelling error (distorsion -> distortion) 2012-07-02 08:15:24 +00:00
Paolo Cignoni d6ff9f01de Heavily modified. Corrected Spelling of distorsion->distortion
Completed a few measures and added difference between angle distortion in cos or rad space
2012-07-02 08:13:50 +00:00
Paolo Cignoni 28f3e120f0 Corrected naming for the unreference vertices function now the func that just count the unref vert is called CountUnreferencedVertex 2012-06-28 17:21:20 +00:00
Paolo Cignoni 9ed6314d10 removed harmless gcc warnings 2012-06-28 09:09:08 +00:00
Paolo Cignoni af15a07c0f corrected small bug in RemoveDuplicateFace involving the unsafe subtracting 1 from an unsigned int that could be zero... 2012-06-14 13:48:25 +00:00
Paolo Cignoni 36905c5d93 Added extrude.h file for the creation of extruded meshes from profiles 2012-06-06 06:25:56 +00:00
Paolo Cignoni 75ebfa9d5a Rewrote and commented the function that given a face pointer it follows the chain of non-faux edges. Now it supports the case of meshes with face with ALL edges faux (isolated faces in a polygon). 2012-05-28 11:30:37 +00:00
Nico Pietroni 894ebb26f6 added RemoveHugeConnectedComponentsDiameter function 2012-05-25 13:33:36 +00:00
Nico Pietroni 5445d99402 several major modifications 2012-05-25 13:21:11 +00:00
Paolo Cignoni cb3fc0dbe2 corrected harmless gcc warnings 2012-05-06 16:01:14 +00:00
Paolo Cignoni 0c16045423 corrected harmless gcc warnings 2012-05-06 15:36:02 +00:00
Paolo Cignoni 64d7f31279 corrected bug in the face laplacian normal smoothing 2012-05-06 15:31:07 +00:00
Paolo Cignoni 05195b6201 in the functions for creating meshes: corrected bug in the OrientedRect and changed the interface of the grid to allow the creation of a flag grid 2012-05-06 14:22:29 +00:00
Paolo Cignoni 0cad100f9d corrected harmless gcc warnings 2012-05-06 14:20:34 +00:00
Paolo Cignoni 4c44513d4f corrected bug in the UpdateTopology::EdgeEdge function: it touched a vector element beyond .end() 2012-04-22 09:01:04 +00:00
Paolo Cignoni 39df21640a Updated to reflect the change from ColorRamp -> SetColorRamp 2012-04-18 21:19:11 +00:00
Paolo Cignoni 5f22a3f7b5 added a very simple function wrapper to get a poisson disk distribution over a mesh with just function call 2012-04-18 21:12:12 +00:00
Paolo Cignoni 508c733bd4 added a missing updateQuality::FaceFromVertex 2012-04-18 21:09:56 +00:00
Paolo Cignoni ba507529c8 Modified intersectionPlaneQuality so that it also compute the per vertex normal according to the mesh... 2012-04-18 21:09:08 +00:00
Paolo Cignoni ffdc2f2b28 Geodesic: Added possibility of saving also the implict tree of the shortest path. For each vertex you can give an attribute where the function will save the 'parent' e.g. the previous vertex in the shortest path to the closest source. 2012-04-12 23:54:23 +00:00
Paolo Cignoni 5aed57a364 Heavy restructuring of the append function. Now it is hopefully must more efficient.
Added a parameter for requesting the copy of the non trivial topology. (e.g. all the adjacency relations beyond FV and EV).
2012-04-04 10:11:46 +00:00
Paolo Cignoni 059a2f220b added EdgeCount method for counting selected edges 2012-04-04 09:59:10 +00:00
Paolo Cignoni 06d481f5de standardized function names e used area function of vcg lib 2012-04-04 09:57:46 +00:00
Paolo Cignoni 783aef369b added hn initialization in the trimesh constructor 2012-04-04 09:53:54 +00:00
msabbadin 7c3687b8db corrected an assert in PrincipalDirections static method:
from assert(m.HasVFAdjency());
to assert(tri::HasPerFaceVFAdjacency(m) && tri::HasPerVertexVFAdjacency(m));
2012-04-02 14:42:56 +00:00
Paolo Cignoni 8a631d48c1 Corrected a significant bug in the reflection types for ocf components.
Changed the basic reflection mechanism: Instead of having a function templates over all the four containers now we template over Trimesh and we rely on a second function templated on face/vert that wants a vector<face> ; this second function only is eventually overloaded by another function that needs a vector_ocf of faces. 

That is Before we had:
- in complex.h

template < class  CType0, class CType1, class CType2 , class CType3>
bool HasPerFaceVFAdjacency   (const TriMesh < CType0, CType1, CType2, CType3> & /*m*/) {return TriMesh < CType0 , CType1, CType2, CType3>::FaceContainer::value_type::HasVFAdjacency();}

- in the component_ocf.h

template < class VertContainerType, class FaceType, class Container1, class Container2  >
		bool HasPerFaceVFAdjacency (const TriMesh < VertContainerType , face::vector_ocf< FaceType >, Container1, Container2 > & m)
	{
	  if(FaceType::HasVFAdjacencyOcf()) return m.face.IsVFAdjacencyEnabled();
	  else return FaceType::FaceType::HasVFAdjacency();
	}


While now we have:
- in complex.h

template < class FaceType  > bool   FaceVectorHasPerFaceVFAdjacency     (const std::vector<FaceType  > &) {  return FaceType::HasVFAdjacency(); }
template < class TriMeshType> bool   HasPerFaceVFAdjacency     (const TriMeshType &m) { return tri::FaceVectorHasPerFaceVFAdjacency  (m.vert); }

- and in component_ocf.h

template < class FaceType >
  bool FaceVectorHasPerFaceVFAdjacency(const face::vector_ocf<FaceType> &fv)
  {
    if(FaceType::HasVFAdjacencyOcf()) return fv.IsVFAdjacencyEnabled();
    else return FaceType::HasVFAdjacency();
  }
2012-03-31 01:16:58 +00:00
Paolo Cignoni b43fffd46f added a few security assert on deletion of simplexes that you are actually deleting objects that belongs to the given mesh 2012-03-30 23:43:04 +00:00
Nico Pietroni d5e7d551ba clean up the code and used new per face component 2012-03-29 16:33:33 +00:00
Nico Pietroni d4275a3597 added several functions 2012-03-16 13:48:18 +00:00
Nico Pietroni d941439fbb corrected several bugs and done several changes 2012-03-16 13:47:42 +00:00
Paolo Cignoni c4e116a42a Corrected a bug in the RemoveUnreferencedVertex. It considered only faces and removed vertices referenced by edges 2012-03-14 16:01:30 +00:00
Nico Pietroni ad417602bd added default constructor 2012-03-09 11:01:25 +00:00
Nico Pietroni 5e7f95f94a major changes 2012-03-08 18:09:31 +00:00
Nico Pietroni f97f54a89b erased vertex manifold as prerequisite 2012-03-08 18:09:09 +00:00
Nico Pietroni 1aed2f16da first release version.. need to be tested in several functions 2012-03-08 18:08:35 +00:00
Paolo Cignoni add25e7bf0 added a missing std:: 2012-02-27 07:06:26 +00:00
Paolo Cignoni 6983d4f6e9 Added a few comments... 2012-02-25 14:40:23 +00:00
Luigi Malomo 01453b8b0e Fixed a call to InterpolationParameters. A Point3 reference must be provided for barycentric coordinates output, instead of 3 separate scalars. 2012-02-14 12:13:38 +00:00
Luigi Malomo f358db54fd Added a quick check for callback presence (avoid crash if cb function is not provided) 2012-02-14 12:02:43 +00:00
Paolo Cignoni d331cf7f60 Added OrientedDisk creation method. and a missing "clear()" 2012-02-09 17:50:38 +00:00
Paolo Cignoni c90b11ca80 Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m)
This changed implied the fact that you need different functor constructor (you have to keep the mesh inside it to know at runtime if some attribute are present or not)
2012-01-25 10:23:22 +00:00
Nico Pietroni fc7983d3fd added HasPolyInfo function, line 538 2012-01-24 13:34:46 +00:00
Nico Pietroni 5ad96544bb added several functions... 2012-01-23 13:09:38 +00:00
Paolo Cignoni b10ed11bc0 Added two functions to build disk, rectangles and squares (oriented in space).
Changed the reflection functions as usual
2012-01-23 07:07:19 +00:00
Paolo Cignoni 48e607f884 Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-23 06:38:32 +00:00
Paolo Cignoni 4bdf843589 Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-20 08:03:25 +00:00
Paolo Cignoni 6094438b4b Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-20 07:58:43 +00:00
Paolo Cignoni 58042fda3e Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-20 07:52:22 +00:00
Paolo Cignoni e9d476e93c Changed all the MeshType::HasSomething() into the now standard tri::HasSomething(MeshType &m) 2012-01-20 07:49:26 +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 86617dd872 Changed the name of Clean::IsOrientedMesh() -> Clean::OrientCoherentlyMesh()
It is a mesh changing method!
2012-01-18 11:42:08 +00:00
Paolo Cignoni 57e4689e1b corrected bug in the ImportVertexAdj Topology must be copied only if meaningful. 2012-01-18 11:27:07 +00:00
Paolo Cignoni 048b884a3e Added tri:UpdatePosition::Scale(mesh) 2012-01-18 11:22:40 +00:00
ganovelli c097e6edd5 added GetClosestVertexScale 2011-12-21 16:13:07 +00:00
ganovelli c2e3d66d19 added template parameter in function call 2011-12-21 16:10:30 +00:00
Paolo Cignoni 95e69075e4 Yet another removal of the usage of the faceprojection flags 2011-12-19 00:51:49 +00:00
Paolo Cignoni 0fe6fdaedc Yet another removal of the usage of the faceprojection flags 2011-12-19 00:51:03 +00:00
Paolo Cignoni 11fa2ba58a Added ComputeEdgeHistogram to Stat functions 2011-12-18 22:33:27 +00:00
Paolo Cignoni 9af315bb18 Two significant changes
1) the name of the supposedly non changed mesh is done explicit in the template name 
2) If the the selection of the vertexes is not consistent with the face selection the append could build faces referencing non existent vertices so it is mandatory that the selection of the vertices reflects the loose selection from edges and faces (e.g. if a face is selected all its vertices must be selected
2011-12-15 07:52:51 +00:00
Paolo Cignoni 3b61972116 Implemented the correct management of per edge attribute. It was half done... 2011-12-15 07:23:51 +00:00
Paolo Cignoni 412ef1aa65 Added UpdateSelection::VertexFromEdgeLoose
added parameter for preserving the old selection to the UpdateSelection::VertexFromFaceLoose
2011-12-14 08:54:54 +00:00
Paolo Cignoni ae58754015 Significant change of names to the UpdateSelection Class.
now follows the standard VertexClear instead of ClearVertex.
Updated all the other files of vcg using it...

(added also selection stuff for edges..)
2011-12-13 10:07:00 +00:00
Paolo Cignoni 5ec7fc1e4a added missing const to the Index function 2011-12-12 23:29:16 +00:00
Paolo Cignoni c038b3584e Corrected blatant bugs in the updateTopology--VertexEdge 2011-12-12 23:28:25 +00:00
ganovelli ab373e50cd missing include added 2011-11-21 16:12:48 +00:00
Paolo Cignoni 3d6857a0b0 re-added the empty constructor to marker face... 2011-11-21 14:04:23 +00:00
Paolo Cignoni 5bcb52529b harmless gcc warning 2011-11-21 09:38:00 +00:00
Paolo Cignoni b09619c1ea harmless gcc warning 2011-11-21 09:37:18 +00:00
Paolo Cignoni 5af75e6dac Removed bug in the ImportEdgeAdj, ImportFaceAdj, ImportHEdgeAdj. All of the same kind...
for(unsigned int vi = 0; vi < 2; ++vi)
 {
   size_t i = Index(mr,er.cEEp(vi));
   el.EEp(i) = (i>ml.edge.size())? 0 : &ml.edge[remap.edge[i]];
   el.EEi(i) = er.cEEi(i);
 }

 el.EEp(i)  should be  el.EEp(vi) !!!!
2011-11-21 09:36:21 +00:00
Paolo Cignoni 0e76a8e0ce Removed the useless faceprojection flag update function. No more needed! 2011-11-21 09:10:52 +00:00
Paolo Cignoni 285d78d293 removed the default empty constructor to avoid the use of the object without a mesh.... 2011-11-21 09:07:36 +00:00
Paolo Cignoni 342f182ee0 Added RemoveDuplicateEdge and CountNonManifoldEdgeEdge 2011-11-15 11:20:12 +00:00
Paolo Cignoni f9a7860f5e Added a much more robust IntersectionPlaneMeshQuality function to compute the intersection between a mesh and a plane that exploit quality for storing the distance from the plane and to make consistent decision about the cutting of the plane... 2011-11-15 11:19:08 +00:00
Paolo Cignoni e0055f8b5c added a missing const... 2011-11-15 11:15:24 +00:00
Paolo Cignoni 2ab3b3ab5b Changed the semantic and the return value of the generic DeleteAttribute (e.g. the one that does not take a type)
** It must not crash if you try to delete a non existing attribute, 
because you do not have a way of asking for a handle of an attribute for which you do not know the type.
2011-11-15 11:05:35 +00:00
Paolo Cignoni 89635131a7 added in the comment a biblio ref to a very similar approach 2011-11-07 16:09:35 +00:00
Paolo Cignoni 34921eb3ba corrected small nasty bug in the rarely used compact edge vector... 2011-11-07 15:41:59 +00:00
Nico Pietroni 5fee62fbb1 changed several calls of CrossVector function 2011-11-01 18:41:54 +00:00
Nico Pietroni 4af26f2df2 line 565 changed "if (numholes!=1) return false;" to "if (numholes==0) return false;" it may be even have multiple holes 2011-11-01 18:40:55 +00:00
ganovelli cedf5fb284 bug fixing:
- mixup of nomes Edge and Face on the components.
- possibly use of empty vector in import_obj.h
Thanks to nagaokagetora for showing them
2011-10-25 10:03:10 +00:00
Paolo Cignoni e886684842 moved voronoi_clustering here from meshlab... 2011-10-20 22:26:46 +00:00
Nico Pietroni 2d8c6222cd added DifferenceCrossField, commented some non used function 2011-10-19 09:02:27 +00:00
Paolo Cignoni 16c39dfe24 removed other harmless gcc warnings... 2011-10-17 23:57:27 +00:00
Paolo Cignoni 7c6956fd4d Corrected some gcc compilation errors, Changed the IsFeasible function (now it tests that there is exactly one hole... 2011-10-17 23:35:30 +00:00
Paolo Cignoni 486795fcfb Better Comments on the Genus. 2011-10-17 23:33:48 +00:00
Nico Pietroni f4a0b8bce4 added Coord3DtoUV function 2011-10-05 16:33:22 +00:00
Nico Pietroni a7c702c81d first release version 2011-10-05 16:17:40 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +00:00
ganovelli 09e0ccc62c added variational shape approximation partition of the mesh both
for triangle meshes and for vertex meshes
2011-06-14 17:10:57 +00:00
Marco Di Benedetto ddb4e72887 moved PointerToAttribute outside mesh definition to avoid type mismatches in append with two different mesh types. 2011-06-14 14:52:38 +00:00
granzuglia 129d4edbaf added several missing include file 2011-06-08 08:46:02 +00:00
granzuglia f58b646616 added several missing include file 2011-06-07 14:37:27 +00:00
granzuglia 05ba578f8e added missing std prefix 2011-06-07 13:48:49 +00:00
Paolo Cignoni 6de8b3f890 Added tri_edge_collapse_quadric_tex.h. The specialization of edge collapse for tex and geometry. It should be cleanded a little... 2011-06-05 23:39:31 +00:00
Paolo Cignoni 23d9ad9684 added BasicVertexPair templated class to store as less as possible of an edge... 2011-06-05 23:37:43 +00:00
Paolo Cignoni 3fc9b9ef1f Added MeshCopy(dst,src), with the same syntax of memcopy 2011-06-03 14:37:50 +00:00
Paolo Cignoni 3d4ae1b506 Added UpdatePosition::Translate 2011-06-03 08:32:27 +00:00
Paolo Cignoni 477767ab77 Added QualityMidPointFunctor and QualityEdgePredicate; Two classes (functor and the predicate) that you need for using the refine framework to cut a mesh along a linear interpolation of the quality. This can be used for example to slice a mesh with a plane. 2011-06-02 21:31:30 +00:00
Paolo Cignoni 27d9cfd6cb Added VertexFromPlane that put into quality the distance from a plane 2011-06-02 21:28:50 +00:00
ganovelli 11adfa2aff Changes for supporting copying of PerVertex,PerEdge and PerFace attributes in the vcg::tri::Append (append.h)
- useless template paramtere in SimpleTempData_Base removed (simple_temporary_data.h)
- Attribute is now derived by SimpleTempData_Base
- SimpleTempData_Base defines a void * At(unsigned int i) function that returns a pointer to the i-th element of the vector withouth knowing the type
- removed the useless member _typeid from the PointerToAttribute. It was used to store the rtti, useless itself.

NOTE: the copy of attributes is done with a memcpy! This means that if you defined a operator = in your attribute this WILL NOT be used in the append.
2011-06-01 13:39:31 +00:00
Paolo Cignoni 7324e75142 mismatch between the edge.EVp(i) versus edge.V(i) usage. 2011-05-31 08:46:38 +00:00
Paolo Cignoni 5c358c02a4 Cleaned up small bug in the vertex clustering alg (crashed on empty sets and on non compacted meshes 2011-05-31 08:37:13 +00:00
Paolo Cignoni 5b6f8055f2 Corrected bug in the computation of VE topology 2011-05-31 08:35:50 +00:00
Paolo Cignoni 4f761caf15 Added missing HasEdgeXXXX for checking the components avalability in meshes 2011-05-31 08:32:01 +00:00
Paolo Cignoni 55068f366b Added CompactEdgeVector functions for removing unused edges 2011-05-31 08:28:40 +00:00
Paolo Cignoni 894ffdbdfe Added trivial WedgeTexFromVertexTex 2011-05-20 23:20:33 +00:00
Paolo Cignoni a9e5d6d957 added WedgeTexFromPlane function to create simple planar parametrizations 2011-05-20 15:15:44 +00:00
Paolo Cignoni d7af2e62b3 Significant changes to the simplification/optimization framework:
* TriEdgeCollapse is no more multiply derived but it get its "work on two vertex" behavior from a template parameter called VertexPair.
* EdgeCollapse is no more a class devoted to the simplification but it has been renamed as EdgeCollapser and it is a static class templates over a generic <VertexPair> that offer methods to perform Edge Collapses.
* cleaned up the parameter passing method for local optimization classes (and added a baseParameterClass from which every local optimization method must subclass its own parameters)
2011-05-20 15:12:09 +00:00
ganovelli c35b1c84ff DoubleArea vs Area discrepancy fixed 2011-05-18 11:38:42 +00:00
ganovelli 46790e61cd added FaceArea 2011-05-18 11:37:18 +00:00
Paolo Cignoni 1a92eddf4c removed three no more useful files of the old edgemesh. Ported useful sutff in the right places (topology.h and clean.h) 2011-05-11 10:00:15 +00:00
Paolo Cignoni 0c606a5cf5 added EdgeEdge topology computation function 2011-05-11 09:57:08 +00:00
Paolo Cignoni 3bb7e7bdd9 Corrected again the constructor of the base trimesh. Now it simply call the clear (just to enforce same behaviour) 2011-05-11 09:54:05 +00:00
Paolo Cignoni f7abd17dfe added RemoveDegenerateEdge and modifyed RemoveDuplicatedVertex to support edgemesh 2011-05-11 07:36:19 +00:00
Paolo Cignoni 6d27dabf19 Added Initialization of en to ZERO !!!! 2011-05-11 06:18:01 +00:00
Paolo Cignoni 577416408f Added functions for clearing flags on edges 2011-05-11 06:13:38 +00:00
Paolo Cignoni 589cb681e5 Added parenthesis to remove gcc warnings 2011-05-11 06:11:21 +00:00
Paolo Cignoni 580ec94ab3 Index functions (that given a simplex return its position in the vector) are const 2011-05-11 06:09:14 +00:00
Paolo Cignoni e878e7ae88 Cleaned up a bit the geodesic interfaces. Removed useless parameters to avoid ambiguity. Could require updating the existing code using it 2011-04-22 11:09:30 +00:00
ganovelli e87fe74584 retry 2011-04-22 10:18:43 +00:00
ganovelli b5359da0a1 added missing std:: 2011-04-21 16:49:59 +00:00
ganovelli 3789370e24 updated to vcg version (HasEETopology to HasEEAdjacency) 2011-04-21 16:24:46 +00:00
Nico Pietroni c4cc235b52 - added call of FarthestVertex with returning vertices within a specified interval
- added initial #define to avoid multiple inclusion
2011-04-19 09:40:04 +00:00
ganovelli a5fc2fae6a bug corrected: . to -> in VertexAreaUniform 2011-04-08 14:28:00 +00:00
Paolo Cignoni affd9ee469 Corrected bug. Assert called when a no internal vertex was present. 2011-04-08 09:26:57 +00:00
Paolo Cignoni 5233b20f12 Added a function Flip a mesh so that its normals are orented outside.
Just for safety it uses a voting scheme.
It assumes that
* mesh has already has coherent normals.
* mesh is watertight and single component.
2011-04-07 22:28:28 +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
Paolo Cignoni 57cfc71a34 heavily restructured. Still need a lot of work. Name changed. Some stuff using it could not work anymore... 2011-04-05 08:57:23 +00:00
ganovelli 25b5f39dad Ongoing Rearrangement of filepath
delete old trimesh content
2011-04-01 17:18:15 +00:00
ganovelli 6c0c32ecfe Ongoing Rearrangement of filepath
delete old trimesh content
2011-04-01 17:17:42 +00:00
ganovelli 3c7efa7bff Ongoing Rearrangement of filepath
delete old trimesh content
2011-04-01 17:17:15 +00:00
ganovelli f4a5512500 Ongoing Rearrangement of filepath
delete old trimesh content
2011-04-01 17:16:29 +00:00
ganovelli 2506364fc4 Ongoing Rearrangement of filpath 2011-04-01 17:15:34 +00:00
ganovelli 1fc83af05c Ongoing Rearrangement of filepath
replaced the path to comply the filepaths modification.
The replacements are as follows:

/complex/trimesh/base.h --> /complex/complex.h
/complex/trimesh/allocate.h --> /complex/allocate.h
/complex/trimesh/append.h --> /complex/append.h
/complex/trimesh/ --> /complex/algorithms/
/complex/local_optimization/ ---> /complex/algorithms/local_optimization/
/complex/local_optimization.h ---> /complex/algorithms/local_optimization.h
/complex/intersection.h ---> /complex/algorithms/intersection.h
/complex/boundary.h ---> /complex/algorithms/boundary.h
2011-04-01 17:06:52 +00:00
ganovelli 9ff0ad3f1e Ongoing Rearrangement of filepath
replaced the path to comply the filepaths modification.
The replacements are as follows:

/complex/trimesh/base.h --> /complex/complex.h
/complex/trimesh/allocate.h --> /complex/allocate.h
/complex/trimesh/append.h --> /complex/append.h
/complex/trimesh/ --> /complex/algorithms/
/complex/local_optimization/ ---> /complex/algorithms/local_optimization/
/complex/local_optimization.h ---> /complex/algorithms/local_optimization.h
/complex/intersection.h ---> /complex/algorithms/intersection.h
/complex/boundary.h ---> /complex/algorithms/boundary.h
2011-04-01 17:06:03 +00:00
ganovelli fea1228701 adding complex.h 2011-04-01 17:00:18 +00:00
ganovelli 0cc7ff76b9 Ongoing Rearrangement of filpath
deleting base.h
2011-04-01 16:59:40 +00:00
ganovelli 882896dd8d Ongoing Rearrangement of filpath
renaming of complex/base.h to complex/complex.h
2011-04-01 16:45:05 +00:00
ganovelli 1ad23912db 2011-04-01 16:25:49 +00:00
ganovelli 3262c530c8 Ongoing Rearrangement of filpath
ACTION 3
2011-04-01 16:22:18 +00:00
ganovelli 562ddb5397 Ongoing Rearrangement of filpath
ACTION 2
2011-04-01 16:20:53 +00:00
ganovelli 830a3402c2 Ongoing Rearrangement of filpath
ACTION 1
2011-04-01 16:19:48 +00:00
ganovelli d84b39382a correction to NameBound mechanism to compile with gcc. 2011-03-31 16:19:34 +00:00
granzuglia d09c937697 added missing included file 2011-03-25 11:04:01 +00:00
Paolo Cignoni 605b0fdefc Added functions for removing in a smarter way non manifoldness :
SplitNonManifoldVertex
RemoveNonManifoldFace
2011-03-22 11:57:33 +00:00
Paolo Cignoni daa0030db1 Changed MeshType::HasFFTopology() -> HasFFAdjacency (m ) 2011-03-21 14:47:01 +00:00
Paolo Cignoni 6807df8ea1 added SelectionStack utility class. 2011-03-21 14:45:38 +00:00
Paolo Cignoni e66769545e added cutoff distance to geodesic computations 2011-03-14 15:23:37 +00:00
Paolo Cignoni 4447fab921 Added FaceRandomConnectedComponent to colorize faces according connected components 2011-03-14 09:34:22 +00:00
Paolo Cignoni 127caef1a6 removed a harmless gcc warning 2011-03-11 10:28:21 +00:00
Paolo Cignoni 4c1a6502b2 harmless gcc warnings (ambiguous boolean expressions) 2011-02-17 16:39:38 +00:00
Paolo Cignoni 463c31e27a removed harmless and useless const in return values 2011-02-17 16:25:55 +00:00
Paolo Cignoni 2e6bc99646 harmless gcc warnings 2011-02-17 11:39:21 +00:00
Paolo Cignoni 4a26c71e63 added a safety check for the feature point to be in the cell (could jump outside for numerical errors...) 2011-02-14 10:53:33 +00:00
Paolo Cignoni 59e89dfc73 Fixed parameter order on method compute_fitmap;
Added parameter to set number of smoothing iterations;
2011-02-10 16:02:47 +00:00
Paolo Cignoni 326fa280ce added missing include 2011-02-10 09:51:43 +00:00
Paolo Cignoni 4107c587d0 Modified check for diagonal collapses 2011-02-04 17:14:47 +00:00
Paolo Cignoni c68b61391f Added a missing include 2011-02-04 09:31:47 +00:00
Paolo Cignoni 9ddbd14616 Fixed wrong function calls 2011-02-01 12:59:57 +00:00
Paolo Cignoni 6583f81c3f Removed wrong file inclusion 2011-02-01 12:58:02 +00:00
Paolo Cignoni 99950cc5f4 Modified computation of EH and HE relations in method FromIndexed;
Removed assertions and added checks about EH and HE relations;
2011-02-01 10:55:06 +00:00
Paolo Cignoni e49dfa63bb Corrected bug about mesh attributes 2011-01-31 16:59:46 +00:00
Paolo Cignoni a3fab7ebf2 Removed wrong assertions 2011-01-31 16:58:27 +00:00
Paolo Cignoni 7037098822 Added to BitQuad Support a Generic quad triangulation function and used in OFF importer.
It takes in input 4 vertex pointrs and rotate them so that a simple fan triangulation is Ok.
  It uses geometric criteria for avoiding bad shaped triangles, and folds
  and it use an internal set of already created diagonal to avoid the creation of non manifold situations.
2011-01-27 15:49:21 +00:00
Paolo Cignoni fb836dcf17 Added classes for quad meshes simplification 2011-01-27 15:41:05 +00:00
Paolo Cignoni 183f106f23 Added class HalfedgeQuadClean 2011-01-27 15:39:39 +00:00
Paolo Cignoni 2984bda3c8 Added suffix "_quad" to all methods only for quads 2011-01-27 14:22:48 +00:00
Paolo Cignoni feafb246da Removed class Garbage 2011-01-27 12:19:40 +00:00
Paolo Cignoni 3777d7925d Edge pointers substituted with hedge pointers;
Made EH and HE adjs optional;
Re-written method to check if a diagonal is collapsible;
2011-01-27 12:03:44 +00:00
Paolo Cignoni 94235fc548 commented useless parameter to avoid warning 2010-12-21 15:06:09 +00:00
Paolo Cignoni 6ca76c16b1 added useful he functions 2010-12-15 22:38:36 +00:00
Luigi Malomo 9d1e54a140 fixed bug to prevent deleted faces rasterization 2010-12-05 18:22:45 +00:00
Paolo Cignoni 5a21c7cd76 Removed the ReorderVert function used for permutating the accessory attributes of OCF components. IT should not be used. 2010-11-09 08:27:44 +00:00
Paolo Cignoni 80a8c29144 Added function to normalize face/vertex quality value into a given range (usually 0..1) 2010-10-31 13:03:36 +00:00
Nico Pietroni 969f556691 added if(vp<oldBase || vp>oldEnd) return; test in PointerUpdater::Update function, so that entities that doesn't need to be updated has no problems 2010-10-27 17:46:46 +00:00
ganovelli 766b1b3f89 CompactFaceVector and CompactVertexVector now may return a PointerUpdater 2010-10-22 16:01:58 +00:00
Paolo Cignoni 696afea0a9 removed harmless warnings 2010-10-20 08:57:59 +00:00
Paolo Cignoni 9939b0c51b Harmless warning: commented unused parameter 2010-10-15 21:18:01 +00:00
Nico Pietroni e74d22e0e5 corrected the call to new IntersectionSegmentTriangle function (after a bug fixing in the function) 2010-10-15 15:23:37 +00:00
Nico Pietroni f1a446558f - removed virtual to ComputerPriority Function
- getPos and GetMark become const
2010-10-15 15:20:37 +00:00
ganovelli 123a51b774 replaced ImportLocal with ImportData (it was left behind) 2010-10-15 09:25:52 +00:00
ganovelli d10a9822d3 replaced ImportLocal with ImportData (it was left behind) 2010-10-15 09:25:27 +00:00
Paolo Cignoni 628f22f3c9 removed one useless parameter from the FastFit function of the paso-doble smoothing function. 2010-10-15 09:23:09 +00:00
Paolo Cignoni 445dad8458 removed harmless warnings 2010-10-15 09:15:11 +00:00
Paolo Cignoni ac9f0d1452 removed a couple of CMeshO types that surfaced when moving stuff from meshlab to vcg 2010-10-15 09:12:54 +00:00
ganovelli da757efdd3 bug fixed (final): CompactFaceVector resized the attributes per face
to the number of "vertices" of the mesh
2010-10-08 16:51:45 +00:00
ganovelli 354b225e92 bug fixed: CompactFaceVector resized the attributes per face
to the number of "vertices" of the mesh
2010-10-08 15:58:32 +00:00
granzuglia e2b56e9023 removed int32_t 2010-10-06 09:17:29 +00:00
granzuglia a003c5ce73 added progress bar support to PrincipalDirectionsPCA 2010-10-04 08:47:33 +00:00
Paolo Cignoni 9df46522b2 a comment 2010-10-01 21:37:55 +00:00
Paolo Cignoni c77aeae697 Cleaned up a bit the Final flipping stage of EMC. Now it is a bit more robust. 2010-10-01 21:36:49 +00:00
Paolo Cignoni 92bbd33394 Added function to compute the barycenter of the thin shell surface model. E.g. the barycenter of the mesh as if all the mass was concentrated over the surface of the mesh. Useful for computing barycenter of planar figures. 2010-09-30 23:30:22 +00:00
ganovelli 087e28ddc4 handled offsset for wedgetexcoord (to redo better) 2010-09-27 14:40:24 +00:00
Paolo Cignoni 30f6267da1 Corrected the unneeded resetting of un referenced normals when computing per vertex normals starting from faces. 2010-09-24 11:21:15 +00:00
ganovelli 09c8ff302a added ClusterVertex (like MergeCloseVertex but without removing the copies) 2010-09-23 16:47:25 +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
Paolo Cignoni 7977e270c5 added the possibility of customizing the histogram bucket size 2010-09-13 09:47:23 +00:00
Paolo Cignoni 56fe9a828b BUG! In IntersectionRayMesh the IntersectionLineTriangle had a parameter swapped...
Thanks to Bo Jiang & Meng Luan for the kind bug submission
2010-09-13 09:35:24 +00:00
Paolo Cignoni dbf4fa7311 removed harmless warning 2010-09-13 09:33:30 +00:00
Paolo Cignoni f7e2f7d539 removed harmless warning 2010-09-07 10:31:04 +00:00
Paolo Cignoni 271ac17c95 Added a missing UpdateSelection :: FaceFromQualityRange 2010-09-07 10:28:45 +00:00
Paolo Cignoni 4a84e2035e added function to compute montecarlo distribution with an approximate number of samples exploiting the poisson distribution 2010-09-06 22:11:11 +00:00
Paolo Cignoni 275b0e55d9 corrected small bug in the make_even_by split procedure for making meshes always with an even number of faces (useful prerequisite for tri-to-quad conversion) 2010-09-06 22:09:18 +00:00
ganovelli d0d2efa454 removed the use of RTTI for checking the name of the attribute TYPE
in the Get*Attribute. Now the check is only on the size of the type.
2010-09-03 22:17:14 +00:00
Paolo Cignoni f55d7a0048 removed a small bug in the link condition 2010-09-02 22:23:10 +00:00
Paolo Cignoni 7627f2e9f4 added a few missing include 2010-09-02 21:40:30 +00:00
Paolo Cignoni 149ae8ec5b Significant improvment in correctness and robustness of Loop subdivision surfaces (BIG thanks to Simon Boye' for submitting the patches) 2010-09-02 06:21:07 +00:00
ganovelli 101e46bc6b bug corrected. attribute member "_padding" was not initialized in Add*Attribute 2010-09-01 17:16:43 +00:00
Paolo Cignoni 885bf05702 Added methods to get the 1-ring;
Added comments;
Removed useless methods;
2010-09-01 15:10:30 +00:00
ganovelli 396e54b566 new mod to support partial selection (possibly to revise):
NOTE on how to use Append::MEsh with selected elements:

If we want to append only the  selected faces of the mesh and call the Append::Mesh
with selected parameter = true, we must ensure that also the cofaces of inferior
order are selected (vertices and edges). 
Otherwise what happen is that the vertices are NOT appended and then the appended
(selected) faces cannot be built.
On the other ahnd Append::Mesh will NOT change the selected flag of the input mesh, it must be done
before calling it. (check  tri::UpdateSelection<CMeshO>::VertexFromFaceLoose(currentMesh->cm); ) 

The same problem for the adjacencies with higher order simplexes. In this cases they are simply not updated . For example, if only a few vertices are selected, and they have, say, VFAdj, it is ignored.
2010-08-11 15:54:37 +00:00
ganovelli b9765da147 missing condition on D flag added. It caused deleted elements to be added and
counter to increment, with consequent failure of vn=mesh.vert.size()- #{deleted}
2010-08-11 14:43:16 +00:00
ganovelli 2d35671e51 replaced SetS with SetV and IsS with IsV. 2010-08-09 19:59:30 +00:00
Paolo Cignoni 0f7ec1f8d2 added fitmaps 2010-08-05 14:24:09 +00:00
Paolo Cignoni 9093cce622 removed harmless gcc warnings 2010-08-05 14:20:43 +00:00
Paolo Cignoni 10106736c2 added operation types for quads 2010-08-05 13:18:33 +00:00
ganovelli b25f303ce3 replaced "if" on a condition that has to be always true with assertions 2010-07-27 14:20:12 +00:00
Paolo Cignoni 1140ca5a32 Added multiscale curvature computation (UpdateCurvatureLocal) 2010-07-23 15:48:45 +00:00
Paolo Cignoni c3d20c9b87 added a smoothing algorithm for quad meshes with half-edge topology 2010-07-23 14:11:36 +00:00
Paolo Cignoni e081be0c6f Never write a 'using namespace" inside a .h file. Removed 2010-07-23 06:09:52 +00:00
Paolo Cignoni 59442fff3f optimized halfedge operations 2010-07-22 13:14:55 +00:00
Paolo Cignoni 1d8a4c8e64 added nring class that efficiently extracts the n-ring of a vertex 2010-07-22 12:32:31 +00:00
Paolo Cignoni 882d039da6 removed mostly harmless gcc warnings (unused/uninitialized vars) 2010-07-14 08:00:16 +00:00
Paolo Cignoni b543ff311e fixed gcc compatibility issue 2010-07-12 13:21:12 +00:00
Paolo Cignoni 0f6cfeb1c0 removed harmless gcc warnings (unsigned vs signed int) 2010-07-01 09:21:56 +00:00
granzuglia 3d68cc75cf from iterator to const_iterator 2010-07-01 09:13:08 +00:00
granzuglia 937a004f80 changed include file 2010-07-01 08:51:06 +00:00
ganovelli f890ce75ee added HasPerVertexVFAdjacency and HasPerFaceVFAdjacency. Removed
generic HasVFAdjacency which made the logical AND of the two and updated the 
relative calls.
2010-06-24 18:48:40 +00:00
ganovelli eb3f1a97fc added HasPerVertexVFAdjacency and HasPerFaceVFAdjacency. Removed
generic HasVFAdjacency which made the logical AND of the two and updated the 
relative calls.
2010-06-24 12:35:37 +00:00
ganovelli a42f07b445 added missing include 2010-06-24 12:30:48 +00:00
Paolo Cignoni f7efa76f35 added a missing std:: to max() 2010-06-23 14:25:08 +00:00
Paolo Cignoni 8ca2013615 removed harmless gcc warnings 2010-06-18 14:44:21 +00:00
Paolo Cignoni 74f1f69132 a few changes to remove ambiguous variable naming and a few warnings 2010-06-18 14:40:36 +00:00
Paolo Cignoni 02e0b3409a removed a meaningless import of an uninitailzed var. 2010-06-18 14:31:58 +00:00
Paolo Cignoni 830fb74a0f Complete re-wrote of the link condition test for topology preserving edge collapse. Now it is much slower but really correct. Hopefully. 2010-06-18 11:47:04 +00:00
ganovelli a8ee1c9143 importlocal--> importdata 2010-06-18 08:01:14 +00:00
ganovelli 19755ed9b7 definition of USedTypes changed to ensure that MeshType::FaceType is the same as VertexType::FaceType (begin Vertex and Face any type among Vertex,Face,Edge,HEdge).
Compiles with gcc 4.4, .net 2005
2010-06-18 07:53:21 +00:00
ganovelli f3b67673fc new Append<> beta version 2010-06-16 17:28:18 +00:00
ganovelli 7c35161210 ImportLocal to ImportData. Adjacencies are no more handle by ImportData, but
by speficic functions in append.h (ImportPerxxxAdj(..))
2010-06-16 16:31:17 +00:00
ganovelli 4750b7c666 rewritten including handling of all adjacencies.
Still incomplete treatment of non uptade but existing adjacencies...
2010-06-16 16:30:24 +00:00
ganovelli e92adc2095 ImportLocal to ImportData. Adjacencies are no more handle by ImportData, but
by speficic functions in append.h (ImportPerxxxAdj(..))
2010-06-16 16:29:07 +00:00
ganovelli e8d3020714 added typename to PointerToAttribute to dynamically check the GetPer[]Attribute 2010-06-16 15:18:39 +00:00
ganovelli 0a64a31e6e added typechecking and function to return the list of attributes of a given type 2010-06-16 15:17:42 +00:00
Paolo Cignoni 2bbf1c86ef Added first version of vertex quality saturation function (to be thorougly tested) 2010-06-16 13:23:59 +00:00
Paolo Cignoni beb996e9c9 Renamed a symbol that caused ambiguity (VertexInfo -> vertexClipInfo) added functor and function for box clipping 2010-06-16 13:23:07 +00:00
Paolo Cignoni 79783ac1bb Moved the removal of faces with edges outside a given range to a selection function into UpdateSelection<>:: 2010-06-16 11:40:14 +00:00
Nico Pietroni 066bc0b7cf changed calls to the new InterpolationParameters function 2010-05-25 14:54:50 +00:00
Marco Di Benedetto 0fc8a49a51 2010-05-22 19:47:43 +00:00
Gianpaolo Palma 13f0066cfa Fixed bug in the rasterization function to generate correct samples outside triangles which have a texture space border edge. 2010-05-21 16:43:58 +00:00
ganovelli f12433c258 uncommented fourth template parameter in declaration of trimesh 2010-05-19 17:06:18 +00:00
ganovelli 6b807efa9c separated alltypes from usedtypes. The dummy types for simplex where char, now are derived by
their proper type (eg. the dummy type for Vertex is a simple derivation of vcg::Vertex)
2010-05-19 17:05:29 +00:00
Nico Pietroni 3ab37342c6 corrected 1 bug in CountEdges function 2010-05-19 15:09:59 +00:00
Paolo Cignoni 7473b2177a Added ComputePerFaceQualityHistogram (provided by Andrea Tagliasacchi) 2010-05-05 12:30:58 +00:00
Paolo Cignoni b6d2c330f2 added a wrapper for the getkclosest that does not need the edgeplane additional data structure
and corrected a bug in the function that shot a bunch ofrays
2010-05-04 08:19:51 +00:00
Paolo Cignoni b2d20dd837 Removed printf and added the standard callback approach 2010-04-30 09:55:34 +00:00
Paolo Cignoni c7f479c580 Cleaned up a bit the generic updateheap function of the generic tri_edge_collapse that was incorrect in case of generic non symmetric collapses 2010-04-30 09:54:00 +00:00
Paolo Cignoni cc92e014cc added RemoveFaceFoldByFlip that Search and remove by flipping small single triangle folds:
- a face has normal opposite to all other faces
 - choose the edge that brings to the face f1 containing the vertex opposite to that edge.
2010-04-30 09:43:42 +00:00
mtarini ddcd4c0bf9 Fixed catmull clark subdivision schema. 2010-04-29 15:07:41 +00:00
Paolo Cignoni 05151acef5 added ComputePerFaceQualityDistribution 2010-04-29 14:54:07 +00:00
granzuglia 43592cc07e updated code in order to improve compatibility with g++ compiler. 2010-04-29 10:39:07 +00:00
granzuglia 904f0d9d3a updated callback function for ball pivoting. 2010-04-29 09:33:05 +00:00
granzuglia bc14f81543 patched many bugs in advancing front basic algorithm.
updated ball pivoting to new interface.
2010-04-29 09:19:49 +00:00
Paolo Cignoni 75bada1828 added class HalfEdgeTopology 2010-04-29 07:02:37 +00:00
Nico Pietroni aeff903128 added normal vector return on the RaySpherical function 2010-04-28 13:11:26 +00:00
Paolo Cignoni e271f9adb8 added missing function HasEHAdjacency 2010-04-26 15:11:52 +00:00
Paolo Cignoni df4edbee23 corrected some bugs in halfedge allocation 2010-04-26 14:49:42 +00:00
Paolo Cignoni 5c9ee5cdff added allocation and conversion of edges in function FromIndexed
added new tests in function CheckConsistency
2010-04-26 14:33:55 +00:00
Paolo Cignoni 956f343087 added missing typenames to new rayspherical fucntion 2010-04-21 21:08:08 +00:00
Nico Pietroni 7c89077eb7 Added function RaySpherical 2010-04-21 17:21:43 +00:00
Paolo Cignoni 8c0d44a430 Refactored and uniformed the naming of functions for testing manifoldness. Now they are named CountNonManifoldEdgeFF and CountNonManifoldVertexFF and eventually they can select the non manifold components 2010-04-20 00:45:12 +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 84a6e15c84 added missing std:: qualifier 2010-04-20 00:34:21 +00:00
Paolo Cignoni 9f7776f96f added selection to FaceQualityRamp colorization 2010-04-14 10:42:19 +00:00
granzuglia 9cd42be265 removed illegal *m.vert.end() 2010-04-12 12:45:06 +00:00
Marco Di Benedetto 38a4636b51 added generic functors to attribute seam. 2010-03-29 16:27:41 +00:00
Paolo Cignoni b2e4c6cf80 corrected an ugly bug in the testfaceface
(note that it still assert for non 2manif meshes...)
2010-03-26 22:53:31 +00:00
Paolo Cignoni 0165f918f1 removed harmless gcc warnings 2010-03-26 09:43:45 +00:00
ganovelli d4b7e1c8fe [introduction of half edges as alternative representation]
No modification should be necessary for the existing code.

most relevant changes:

creation of folder:
vcg/connectors  
vcg/connectors/hedge.h
vcg/connectors/hedge_component.h

addition to the container of half edges to the trimesh:
HEdgeContainer hedge; // container
int hn;               // number of half edges

addition of 
vcg/trimesh/update/halfedge_indexed.h
which contains:
- the functions to compute the half edge representation from the indexed  and vivecersa
- the functions to add or remove an half edge
2010-03-25 16:52:55 +00:00
ganovelli be64ec50c3 added inclusion of <string> 2010-03-25 16:51:20 +00:00
ganovelli a96c0e79aa [introduction of half edges as alternative representation]
No modification should be necessary for the existing code.

most relevant changes:

creation of folder:
vcg/connectors  
vcg/connectors/hedge.h
vcg/connectors/hedge_component.h

addition to the container of half edges to the trimesh:
HEdgeContainer hedge; // container
int hn;               // number of half edges

addition of 
vcg/trimesh/update/halfedge_indexed.h
which contains:
- the functions to compute the half edge representation from the indexed  and vivecersa
- the functions to add or remove an half edge
2010-03-25 16:50:45 +00:00
ganovelli 42557f19f8 [introduction of half edges as alternative representation]
No modification should be necessary for the existing code.

most relevant changes:

creation of folder:
vcg/connectors  
vcg/connectors/hedge.h
vcg/connectors/hedge_component.h

addition to the container of half edges to the trimesh:
HEdgeContainer hedge; // container
int hn;               // number of half edges

addition of 
vcg/trimesh/update/halfedge_indexed.h
which contains:
- the functions to compute the half edge representation from the indexed  and vivecersa
- the functions to add or remove an half edge
2010-03-25 16:50:28 +00:00
ganovelli cf7563eff4 [introduction of half edges as alternative representation]
No modification should be necessary for the existing code.

most relevant changes:

creation of folder:
vcg/connectors  
vcg/connectors/hedge.h
vcg/connectors/hedge_component.h

addition to the container of half edges to the trimesh:
HEdgeContainer hedge; // container
int hn;               // number of half edges

addition of 
vcg/trimesh/update/halfedge_indexed.h
which contains:
- the functions to compute the half edge representation from the indexed  and vivecersa
- the functions to add or remove an half edge
2010-03-25 16:50:10 +00:00
ganovelli e06c7f7e70 [temporary commit, it is to be moved to trimesh/update/halfedge_indexed.h] 2010-03-25 16:23:09 +00:00
Paolo Cignoni 1fb9d1c555 added a few disambiguating 'template' keywords 2010-03-23 22:37:46 +00:00
Paolo Cignoni ac52e05bc4 added management variable disk radius sampling to poisson pruning 2010-03-23 16:15:27 +00:00
ganovelli fb9d702e08 nametypebound..corrected bugs, changed a name, regrouped functions.
Change useless NameOf in NamesWithType which returns all the names bound to a given type
2010-03-23 09:47:52 +00:00
ganovelli bda10aba6e NameTypeBound wsorking (still to refine) 2010-03-23 09:25:13 +00:00
Paolo Cignoni b6cb2fc881 added option to the Poisson sampling filter of using an additional mesh as source of already generated samples.
In this way it is possible to refine existing sampling by using different sample pools
2010-03-23 07:26:34 +00:00
Paolo Cignoni b4857331f6 added FaceFauxCrease and other small helper for managing faux edges 2010-03-23 07:23:32 +00:00
Paolo Cignoni d55a1069de converted to the new style with mark outside the trimesh class 2010-03-19 22:56:30 +00:00
ganovelli ca8d4abed3 All the functions handling TriMesh::imark have been moved outside the definition
of TriMesh to workaround an internal compiler error of vc compiler, and the usages have been
consequently updated
2010-03-19 17:14:01 +00:00
ganovelli 584936f27a [ Changes in definition of TriMesh: PART II ]
Note: No changes to existing code need be the done, this mod
should be fully backward compatible

Old way to define a TriMesh ==============
struct MyMesh: public vcg::tri::TriMesh< vector<MyVertex> , vector <MyFace> >{};

new  ways to define a TriMesh ==============

struct MyMesh: public vcg::tri::TriMesh< CONT1 >{};
struct MyMesh: public vcg::tri::TriMesh< CONT1 , CONT2>{};
struct MyMesh: public vcg::tri::TriMesh< CONT1 , CONT2, CONT3>{};

where CONT[i] can be vector< [MyVertex | MyEdge | MyFace ] > 
(the order is unimportant)
2010-03-19 17:13:31 +00:00
ganovelli 30f799220d All the functions handling TriMesh::imark have been moved outside the definition
of TriMesh to workaround an internal compiler error of vc compiler, and the usages have been
consequently updated
2010-03-19 17:05:14 +00:00
ganovelli f90bd789a3 added class AllTypes to implement type trait in trimesh/base.h
AllTypes is a class defining, as inner classes, global default names
for vertex,edge and face
2010-03-19 17:02:36 +00:00
ganovelli 5ce2c677f5 added include to trimesh/base.h 2010-03-19 17:00:45 +00:00
Paolo Cignoni 3b770c935a added updateQuality Vertex Clamp 2010-03-18 14:20:29 +00:00
Paolo Cignoni 3976724c18 removed harmless warnings and improved Cone generator 2010-03-18 10:07:39 +00:00
Paolo Cignoni 9aa23c4f6c removed harmless warnings 2010-03-18 10:03:31 +00:00
Paolo Cignoni 335afeee7e Disambiguated the origin of the ScalarType and CoordType in the simplex class. Now it derives from the type specified by the vertexRef component for the faces and from the Coord component for the vertexes. To be sure the ScalarType and CoordTypes are initialized to weird point3<bool> and char just to detect easisly when the wrong types shallow... 2010-03-18 10:03:00 +00:00
Paolo Cignoni 63e21f15cb Disambiguated the origin of the ScalarType and CoordType in the simplex class. Now it derives from the type specified by the vertexRef component for the faces and from the Coord component for the vertexes. To be sure the ScalarType and CoordTypes are initialized to weird point3<bool> and char just to detect easisly when the wrong types shallow... 2010-03-18 10:02:32 +00:00
Paolo Cignoni 2a1aebfa3d converted to the new UsedTypes syntax 2010-03-17 09:22:23 +00:00
Paolo Cignoni 80f825a428 removed harmless warnings 2010-03-16 14:25:30 +00:00
Paolo Cignoni bf69d1c24a removed harmless warnings 2010-03-16 14:22:08 +00:00
Paolo Cignoni 404831fc2f added a missing 'template' keyword between class and metod name. 2010-03-16 11:06:32 +00:00
ganovelli 09b0fb5ef7 added a way to define a scope, i.e. a collection of bounds between name of the attributes
and their type, so  that one can add an attribute without knowing its type. It is useful
when working with plugin.
example:
vcg::tri::NameTypeScope myScope;


AddNameTypeBound<int>(myScope,std::string("number");
AddNameTypeBound<float>(myScope,std::string("incoming_light"));

we have crated a scope myScope where "number" is bound a int and incoming_light is a float

In another part of code where I may not know the type of "number", I can still do:

AddPerVertexAttribute(myScope, mesh, "number");

and an int attibute name "number" will be added.
2010-03-15 15:17:20 +00:00
ganovelli 2e739825c8 [ Changes in definition of TriMesh: PART I ]
Note for the developers: the change to make to existing projects is very little
but strictly necessary to compile. This change IS NOT backward compliant.


==== OLD ==== way to define a TriMesh:

// forward declarations
class MyVertex;
class MyEdge;
class MyFace;

class MyVertex: public VertexSimp2 < MyVertex, MyEdge, MyFace, vertex::Coord3f,...other components>{};
class MyFace: public FaceSimp2 < MyVertex, MyEdge, MyFace, face::VertexRef,...other components>{};
class MyMesh: public TriMesh<vector<MyVertex>,vector<MyFace> >{};


==== NEW ==== way to define a TriMesh:
// forward declarations
class MyVertex;
class MyEdge;
class MyFace;

// declaration of which types is used as VertexType, which type is used as FaceType and so on...
class MyUsedTypes: public vcg::UsedType < vcg::Use<MyVertex>::AsVertexType,
                                         vcg::Use<MyFace>::AsFaceType>{};

class MyVertex: public Vertex < MyUsedTypes, vertex::Coord3f,...other components>{};
class MyFace: public Face < MyUsedTypes, face::VertexRef,...other components>{};
class MyMesh: public TriMesh<vector<MyVertex>,vector<MyFace> >{};

                               ===== classes introduced         [vcg::UsedType] : it is a class containing all the types that must be passed to the definition of Vertex, Face, Edge... This
class replaces the list of classes to pass as first templates and the need to specify the maximal simplicial. So

< MyVertex, MyEdge, MyFace,  beocmes  MyUsedTypes,
and
VertexSimp2 becomes Vertex

[vcg::Use] : an auxiliary class to give a simple way to specify the role of a type

Note 2: the order of templates parameters to vcg::UsedTypes is unimportant, e.g:

class MyUsedTypes: public vcg::UsedType <vcg::Use<MyVertex>::AsVertexType,
                                        vcg::Use<MyEdge>::AsEdgeType,
                                        vcg::Use<MyFace>::AsFaceType>{};

is the same as:
class MyUsedTypes: public vcg::UsedType <vcg::Use<MyFace>::AsFaceType,
                                        vcg::Use<MyEdge>::AsEdgeType,
                                        vcg::Use<MyVertex>::AsVertexType>{};

==== the Part II will be a tiny change to the class TriMesh it self.
2010-03-15 13:10:43 +00:00
ganovelli c40a6c3d97 [ Changes in definition of TriMesh: PART I ]
Note for the developers: the change to make to existing projects is very little 
but strictly necessary to compile. This change IS NOT backward compliant.


==== OLD ==== way to define a TriMesh:

// forward declarations
class MyVertex;
class MyEdge;
class MyFace;

class MyVertex: public VertexSimp2 < MyVertex, MyEdge, MyFace, vertex::Coord3f,...other components>{};
class MyFace: public FaceSimp2 < MyVertex, MyEdge, MyFace, face::VertexRef,...other components>{};
class MyMesh: public TriMesh<vector<MyVertex>,vector<MyFace> >{};


==== NEW ==== way to define a TriMesh:
// forward declarations
class MyVertex;
class MyEdge;
class MyFace;

// declaration of which types is used as VertexType, which type is used as FaceType and so on...
class MyUsedTypes: public vcg::UsedType < vcg::Use<MyVertex>::AsVertexType,
                                          vcg::Use<MyFace>::AsFaceType>{};

class MyVertex: public Vertex < MyUsedTypes, vertex::Coord3f,...other components>{};
class MyFace: public Face < MyUsedTypes, face::VertexRef,...other components>{};
class MyMesh: public TriMesh<vector<MyVertex>,vector<MyFace> >{};

                                 
===== classes introduced          
[vcg::UsedType] : it is a class containing all the types that must be passed to the definition of Vertex, Face, Edge... This
class replaces the list of typenames to pass as first templates and the need to specify the maximal simplicial. So 

<MyVertex, MyEdge, MyFace  becomes <MyUsedTypes<

and 

VertexSimp2 becomes Vertex

[vcg::Use] : an auxiliary class to give a simple way to specify the role of a type

Note 2: the order of templates parameters to vcg::UsedTypes is unimportant, e.g:

class MyUsedTypes: public vcg::UsedType <vcg::Use<MyVertex>::AsVertexType,
                                         vcg::Use<MyEdge>::AsEdgeType,
                                         vcg::Use<MyFace>::AsFaceType>{};

is the same as:
class MyUsedTypes: public vcg::UsedType <vcg::Use<MyFace>::AsFaceType,
                                         vcg::Use<MyEdge>::AsEdgeType,
                                         vcg::Use<MyVertex>::AsVertexType>{};

Note 3: you only need to specify the type  you use. If you do not have edges you do not need 
to include vcg::Use<MyEdge>::AsEdgeType in the template list of UsedTypes.
==== the Part II will be a tiny change to the class TriMesh it self.
2010-03-15 10:42:52 +00:00
Paolo Cignoni d340b8b92a removed harmless gcc warnings 2010-03-02 23:17:15 +00:00
Paolo Cignoni 355edd042e removed harmless warnings 2010-02-24 09:56:58 +00:00
Paolo Cignoni 9f8497013f removed harmless warnings 2010-02-24 09:55:28 +00:00
Paolo Cignoni 18c92582d4 Cleaned up the CompactFaceVector and the CompactVertexVector, Now they correctly manage existing FV and FF topology by preserving them (if they are initialized to something meaningful). 2010-02-22 17:37:51 +00:00
Paolo Cignoni 446400f6fc Now the compactvertex and compactface funtions use the importlocal chain so we are sure that all the meaningful data is correctly copied (otherwise ocf stuff will not be copied) On the other hand when using ImportLocal we do not copy pointer based stuff like adjacency and *vertex pointers* that must be terefore copied by hand... 2010-02-19 00:21:26 +00:00