Commit Graph

1302 Commits

Author SHA1 Message Date
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
Luigi Malomo 8465fa432c Modified rasterization algorithm to generate samples from buffer areas outside (texture space) border edges 2010-02-09 19:10:22 +00:00
Paolo Cignoni 796c2f0b56 Implemented MakeTriEvenBySplit (still assume that the mesh is a single connected component), removed some face assigment with the (hopefully) safer ImportLocal. 2010-01-03 02:14:51 +00:00
Paolo Cignoni 29e956d524 Corrected a small bug in CountNonManifoldVertexFFVF and changed the use of bit from selection to visit bit in the CountEdges 2010-01-03 01:59:32 +00:00
Paolo Cignoni 49bbc55cac removed harmless gcc warnings 2010-01-03 01:57:39 +00:00
Paolo Cignoni 137c239375 removed harmless gcc warnings 2010-01-03 01:31:26 +00:00
matteodelle 401abff90a Correction of IntersectionRayMesh functions, they did not compile. 2009-12-21 13:02:28 +00:00
Paolo Cignoni fbbf8fe436 Removed gcc4.4 warnings 2009-12-08 15:57:19 +00:00
Paolo Cignoni 39f12e9fdd added a function to permutate the vertex vector according to a given permutation. 2009-12-07 09:05:20 +00:00
Paolo Cignoni d60fa01037 cleaning up include files 2009-12-07 08:23:02 +00:00
Paolo Cignoni 8a0c86c857 corrected the template in the normal<> function... again 2009-12-07 08:17:10 +00:00
Paolo Cignoni 760a767504 cleaning up include files 2009-12-07 08:15:59 +00:00
Paolo Cignoni 1c0ae1268c added a slightly faster version of the longest edge stratified subdivision sampling 2009-12-04 08:36:49 +00:00
Paolo Cignoni 32619f1625 harmless gcc compiling issues 2009-12-03 23:17:46 +00:00
Paolo Cignoni c749b3e143 Heavily restructured PoissonDisk resampling. Now there are two approaches, a pure pruning and a cell pruning approach 2009-12-02 15:10:12 +00:00
Paolo Cignoni 7c907e72ae Corrected a survived old style use of temporary data in smoothning of vertex normals 2009-12-01 08:37:27 +00:00
Paolo Cignoni 86d534ec95 added a missing std:: 2009-12-01 08:34:16 +00:00
Paolo Cignoni dc82ece647 Optimized version of poisson sampling 2009-11-30 15:53:23 +00:00
Paolo Cignoni a89b2ace77 added some const and inline keywords 2009-11-30 10:32:37 +00:00
Paolo Cignoni a209a9b890 Refactoring of the Poisson Sampling algorithm. Hopefully faster 2009-11-25 15:50:36 +00:00
Paolo Cignoni 3482ee805e added a few missing std:: and cleaned up a bit the requirements 2009-11-05 10:19:42 +00:00
Paolo Cignoni ad4ad4026c added computation of the per-vertex directions and values of curvature using a quadric fitting method 2009-11-05 09:55:43 +00:00
Nico Pietroni fe6d3ca34d restored changes for a corrected use of default copy constructor 2009-10-27 10:48:52 +00:00
Marco Di Benedetto a80c4d25ef fixed in-place version. 2009-10-26 12:19:21 +00:00
Marco Di Benedetto e7cbe4f558 modified typedef due to GCC complaints. 2009-10-23 20:25:54 +00:00
Marco Di Benedetto d650013e60 first commit. 2009-10-23 10:04:51 +00:00
Paolo Cignoni 8dd2320a4d add missing std:: 2009-10-15 11:53:09 +00:00
Nico Pietroni fdd33df567 minor changes 2009-10-14 16:15:50 +00:00
Nico Pietroni 01f772d7f8 corrected order of operations of decrease-increase valencies 2009-10-14 15:15:32 +00:00
Nico Pietroni 8c67be5617 added interpolator class for refinement 2009-10-14 15:05:08 +00:00
mtarini 2f1c77c69a Added a flag to choose whether to use Length based criteria or Quality based ones. 2009-10-14 14:35:25 +00:00
mtarini 7c78d81cdc added importance weighting. 2009-10-14 14:32:55 +00:00
Nico Pietroni a60c31845c added function HasConsistentEdges 2009-10-14 13:56:06 +00:00
Nico Pietroni 810c3df9a4 Changed TestVertexFace function in order to test if the each face is effectively added to the VF list of a vertex. 2009-10-14 13:54:39 +00:00
ganovelli b902431bc1 extended support to dump attributes (see wrap/io_trimesh/[import | export]_VMI.h )
It was only for vertices, now it is also for faces and mesh attributes.
Compiled gcc and .net. Tested only on toy exmaples
2009-10-07 11:05:29 +00:00
Paolo Cignoni 06bda0acae corrected the use of default copy constructor with the more or less standard importLocal 2009-10-05 22:46:32 +00:00
Paolo Cignoni ca16dcdf52 added management of faux edges in functions that retrieve the set of edges 2009-10-02 14:13:04 +00:00
Paolo Cignoni a35120d9d9 added faux edge sampling management 2009-10-02 14:11:34 +00:00
mtarini 5acb759d8e Removed a rarely expressed bug on CollapseDiag 2009-09-24 16:12:57 +00:00
Paolo Cignoni d2edfc1f4d removed two dummy useless functions 2009-09-22 22:36:22 +00:00
Paolo Cignoni 022df4f59a Added ComputePerVertexQualityDistribution 2009-09-22 16:42:59 +00:00
Paolo Cignoni 1b7adbe035 Hole filling now returns the number of closed holes 2009-09-12 05:20:32 +00:00
mtarini beb12f0b7c 2009-09-09 12:26:04 +00:00
mtarini 88ef8fa03b minor performance optimizations. 2009-09-07 17:54:39 +00:00
mtarini 7e3ad9eced 2009-09-07 16:44:01 +00:00
mtarini 15f6f89d06 Added a few convenience methods to Pos. 2009-09-07 15:53:28 +00:00
mtarini a2e777fd9a 2009-09-04 16:49:41 +00:00
Nico Pietroni 5846e9a86d added initial #define to avoid multiple inclusion 2009-09-04 15:52:21 +00:00
mtarini 2c3a92242b Added working valency in flags computations (and used to detect singlets/doublets quicker) 2009-09-03 22:35:28 +00:00
mtarini b4b6e596eb 2009-09-02 17:25:17 +00:00
Nico Pietroni e43cfa5f43 corrected bugs in Iterator 2009-09-02 13:28:37 +00:00
Nico Pietroni c1daa656fe corrected bug in returning value of MarkSmallestEdgeOrDiag 2009-09-02 13:27:30 +00:00
Nico Pietroni 672cb554b1 added Initial #define to exclusive inclusion 2009-09-01 18:23:50 +00:00
mtarini 8f89da47ef Now collapse methods (diagonal, counter-diag, and edge) return bool success and take optional parameter of type Pos (around which to rotate to find all affected quads). Also added an iterator that goes around Pos that returns quads (only once per quad). 2009-09-01 17:14:35 +00:00
Nico Pietroni 37c11749f7 changed flags of vertices in case of modifications 2009-08-31 18:45:58 +00:00
mtarini d3232eb472 Added keep track Valency (in flags. For now, uses hard-wired flag interval 24-28.).
Valency used to detect Singlet, Doublets. Marks vertex flag V in affected Quads in all basic operations (method MarkFaceF)
2009-08-31 14:58:57 +00:00
Nico Pietroni 733caf9478 changed TestEdgeRotation() and quadQuality() from private to public 2009-08-30 10:04:21 +00:00
Paolo Cignoni b14cd10824 Added management of per-vertex quality values during simplification to amplify initial quadric values 2009-08-30 09:35:36 +00:00
mtarini d231b9d021 Encapsulated everything in a static class. Also, templated with Interpolator "single-method static class" functor to make custom vertex interpolations during collapses. 2009-08-28 15:17:23 +00:00
mtarini ecd1de4d94 added UpdateQualityAsBitQuadValency 2009-08-21 18:46:51 +00:00
mtarini 8e081cde43 Now BitQuadMarkVertexRotations rotates all profitable ones (not just the 1st) 2009-08-21 18:46:05 +00:00
Paolo Cignoni b9ad0d4aa2 A function inside AddPointSet() was templated on CMeshO instead of the general type MeshType. This could lead to errors at compile time. CMeshO has been replaced with MeshType and now works fine. 2009-08-07 13:56:38 +00:00
Paolo Cignoni b54b74e103 changed doxigen comments. 2009-08-04 21:10:08 +00:00
Paolo Cignoni b507e2e8f7 added comments in doxygen style. 2009-08-02 21:43:13 +00:00
ganovelli 286ac9162a added cr at the end 2009-07-29 12:48:30 +00:00
ganovelli f1b1220225 small changes to enable the mesh dumping on VMI file (see wrap/io_trimesh/[import | export]_VMI.h )
and HandlesWrapper renamed to PointerToAttribute
2009-07-29 12:46:46 +00:00
Paolo Cignoni 4e1b6897b1 class that provides an estimation of the overlap of two meshes. It works as follow: it samples N points in a normal equalized manner on the Mov mesh, then count how many points of the Fix mesh are in consensus with the sampled points. To be in consensus means: distance between points is <= param.consensusDistance AND the angle between points normals is <= param.normalAngle. This works for point clouds too. comments will be added in next commit. 2009-07-28 23:07:26 +00:00
Paolo Cignoni 44fd7bb2ba slightly changed the trivial sampler to make simpler to use all the sampling strategies to just get a coord vector. 2009-07-22 05:59:03 +00:00
Paolo Cignoni 9608ec798b compilation fixes with Eigen 2009-07-21 07:29:13 +00:00
granzuglia b41603d086 added missing #include file update/topology.h 2009-07-17 08:22:38 +00:00
Paolo Cignoni 7e5a7630f2 -added CountPointSet() to clustering
-ComputePerVertexQualityHistogram() modified; added a parameter to compute histogram taking into account just selected vertexes.
2009-07-16 10:16:39 +00:00
granzuglia bb97c3a1ec changes in order to compile with gcc 3.x 2009-07-15 16:27:29 +00:00
Nico Pietroni 046558798a lien 242 added cast to ScalarType on "2.0" to avoid warning in case of float usage 2009-07-14 14:33:00 +00:00
Nico Pietroni 61d4d72c4c removed closests[i]->C()=Color4b::Green; form MergeCloseVertex function 2009-07-14 14:31:20 +00:00
Paolo Cignoni 15531646b5 better comment in assert of finding nan in histograms 2009-07-14 09:00:23 +00:00
Paolo Cignoni d71d110703 Heavily restructured clustering class to allow also a subsampling strategy that allow the fast extraction of a well spaced subset of vertices 2009-07-14 08:57:05 +00:00
Marco Di Benedetto a79d8f9bd8 changed field order in PointerUpdater to prevent constructor warning (in initialization list). 2009-07-08 16:12:46 +00:00
mtarini ec1c94cee2 Added a few seek-best-op (and-do-it) operations (MarkSmallestEdgeOrDiag... etc) 2009-07-07 15:25:13 +00:00
mtarini ef71c4ef04 Added new local operations (RotateBitQuadVertex, CollapseQuadEdge...). 2009-07-07 15:23:42 +00:00
mtarini 077e720428 Added PerBitQuadFaceNormalized 2009-07-07 15:22:28 +00:00
mtarini f4bc92f6f7 Bitquad_* first version. 2009-06-30 14:09:09 +00:00
Marco Di Benedetto 54f5418be2 removed reset to false of preventUpdateFlag in Clear(). 2009-06-29 16:13:26 +00:00
Paolo Cignoni e8908f7742 Added CountBitLargePolygons (better name suggestion?) for counting the number of polygons in the case that there are vertexes surrounded by faux edges too (like in the case of dodecahedron of platonic.h) 2009-06-26 23:18:51 +00:00
mtarini 92e3bf554f Added ExtractPolygon quad support function 2009-06-26 13:05:52 +00:00
Paolo Cignoni c7320a32a3 added functions to remove connected components 2009-06-25 08:49:37 +00:00
Paolo Cignoni b2bc0d07ba small gcc compilation errors (typenames, missing std...) 2009-06-25 07:29:29 +00:00
Paolo Cignoni eae78a0251 completed the correct working of temporary data inside the refinement functions 2009-06-25 06:19:00 +00:00
Paolo Cignoni 2c3da1c3c9 changed the constructor of the MidPoint functor of the refine. Now it requires a Mesh as an argument to get reliable knowledge of the presence/absence of temporary data. 2009-06-24 20:31:57 +00:00
Paolo Cignoni 60afe72ca8 added initialization of the mesh color to the standard opossum gray 2009-06-23 20:43:39 +00:00
Paolo Cignoni 168ea81ca8 Added PerlinColor function and ColorNoise function 2009-06-16 08:57:24 +00:00
Paolo Cignoni fde38e0612 added missing iteration control inthe hc laplacian smoothing 2009-06-11 23:56:06 +00:00
Paolo Cignoni 70d3ccfa23 Removed harmless warnings 2009-06-11 23:55:06 +00:00
Marco Callieri b066baa686 added cast in a SQRT (could not resolve overloading
(int)(sqrt((double)n_samples) +1.0);
2009-06-08 15:48:55 +00:00
Paolo Cignoni b05e5d1184 Made public the default constructor of PerVertexAttributeHandle, PerFaceAttributeHandle.
I hope that it was done private by mistake...
2009-06-07 08:55:44 +00:00
Federico Ponchio b39afe0c18 gcc complained about perVertexAttributeHandle missing template parameters... 2009-06-05 11:08:37 +00:00
ganovelli f223914581 factorized a bit the attribute classes in TriMesh;
added to IsValidHandle the check that pointer to data is not null.
Explanation:
a handle may be not valid for two reasons:
1) the attribute has been destroyed with a DeletePer*Attribute
2) the handle has been declared but not initialized.
The change is to cover the case 2)
2009-06-04 16:13:21 +00:00
ganovelli 66ec7652dc factorized a bit the attribute classes in TriMesh;
added to IsValidHandle the check that pointer to data is not null.
Explanation:
a handle may be not valid for two reasons:
1) the attribute has been destroyed with a DeletePer*Attribute
2) the handle has been declared but not initialized.
The change is to cover the case 2)
2009-06-04 16:08:15 +00:00
Paolo Cignoni 69004410e3 Corrected a wrong function to clear border face flag (and added BORDER012 to the enums of the flags) 2009-06-04 08:15:59 +00:00
Federico Ponchio e888ef1560 removed some useless consts 2009-06-03 12:23:20 +00:00
Paolo Cignoni b3e9a9e105 Changed a few geodesic function from void to bool to return possible failures (like for exmple asking for border distance on a mesh without border) 2009-05-26 22:31:58 +00:00
mtarini c0b0c7469c Added diagnostic and measurement methods for bit-polygonal meshes: IsBitQuadOnly, IsBitTriOnly, IsBitPolygonal, IsBitTriQuadOnly, CountBitQuads, CountBitTris, CountBitPolygons, HasConsistentPerFaceFauxFlag... 2009-05-26 18:19:17 +00:00
Paolo Cignoni 37057700b2 Changed the brightness and contrast color processing algorithm to match exactly the GIMP algorithm. 2009-05-25 09:02:32 +00:00
Paolo Cignoni a0a965f17c Added the method GetClosestFaceNormal, that use the functor PointNormalDistanceFunctor. 2009-05-23 20:10:48 +00:00
Paolo Cignoni 291c2790af Removed harmless warnings 2009-05-22 07:54:42 +00:00
Paolo Cignoni e1e58a75cf added another shape to platonic, a camera. 2009-05-21 23:04:49 +00:00
Paolo Cignoni c5491807fd *** SIGNIFICANT CHANGE ***
The member 'camera' of the base trimesh class, is no more used since Dec 2006.His initial purpose was keeping intrinsics of the camera, but it is a long time that intrinsics have moved into the Shot class. 
The I/O procedure already comply this fact filling only the interal structure.
2009-05-21 23:02:48 +00:00
Paolo Cignoni 143f9461dd moved (and renamed) trivial walker from apps/ to vcg/complex/trimesh/create 2009-05-18 14:19:12 +00:00
Paolo Cignoni 08ffe4b7a1 re-correct the assert that was causing a failure. The previous commit tho marching cubes.h (done by me!) was rather wrong. Sorry,. 2009-05-08 21:41:37 +00:00
mtarini a7e5e51ddc added IsPolygonal, which tells you whether the mesh actually represents a polygonal mesh (false if triangle only) 2009-04-27 14:13:28 +00:00
Paolo Cignoni 1236df14c5 Added RemoveDuplicateFace Function 2009-04-23 21:21:21 +00:00
Nico Pietroni c73495b7ce added __VCG_DECIMATION_TRIFLIP to ensure unique inclusion 2009-04-22 15:13:41 +00:00
Paolo Cignoni 8bd0953add removed harmless warning 2009-04-22 10:31:33 +00:00
Paolo Cignoni cc0204e797 removed harmless warning 2009-04-22 10:30:04 +00:00
Paolo Cignoni 665fa05d1c Added RegularRecursiveOffset sampling function 2009-04-22 10:27:44 +00:00
Paolo Cignoni 312532aab3 added missing test on deleted faces 2009-04-21 15:42:18 +00:00
mtarini aeaec2ab4c All methods now set flags Faux (where appropriate) that identifies edges inside a polynomial face (quads & penta).
FaceGird now cuts closer aoround holes.
Rewritten Cilynder (too many errors in prev version)
2009-04-20 22:53:31 +00:00
mtarini 52de726be4 minor (commento) 2009-04-20 22:50:43 +00:00
Paolo Cignoni fb261dc8bf added cleaning function to merge very close vertice (for the one who needs a unify duplicate vertices that unify also vertices that are not exactly the same 2009-04-19 21:13:36 +00:00
Paolo Cignoni 0c61619049 Solved bug about aliasing when resampling with signed distance thin and long triangles. 2009-04-10 15:05:49 +00:00
Paolo Cignoni 47dc2ecd6c Added two different methods for computing vertex normals from facet normals, weighted and weighted by angle 2009-04-10 14:21:00 +00:00
Paolo Cignoni e702547041 added in the Append::Mesh function the possibility of copying also unreferenced vertices (indispensable for point sets!) 2009-04-04 16:58:21 +00:00
ganovelli dd468f9d5d compiled with gcc 2009-04-01 13:07:08 +00:00
ganovelli b7dd6f79aa added include to flag.h 2009-04-01 13:05:35 +00:00
Paolo Cignoni a16baded52 Added FaceConnectedFF; the function expands current selection to cover the whole connected component. 2009-04-01 04:30:35 +00:00
Paolo Cignoni 3447c82e88 Removed a few harmless warnings 2009-03-30 20:58:18 +00:00
Paolo Cignoni 066c2bdb8b Corrected ComputePoissonDiskRadius to Manage approximately the PointCloud Case, using area of the bbox as an approx of the surface area. 2009-03-27 15:09:14 +00:00
Paolo Cignoni 9a0b315fb0 Small change in poisson point sampling, we should call the sampler class with the input mesh 2009-03-26 10:51:44 +00:00
Paolo Cignoni cf028b728b Added parameter invertQuality to PoissonDiskSampling in order to invert
how quality influences density distribution
2009-03-25 08:22:03 +00:00
Paolo Cignoni 499822bc17 NO_QT defines to explicitly disable qt dependant behavior 2009-03-25 08:13:07 +00:00
ganovelli 917343b0f5 removed the (useless) template parameter to Per[XXX]DeleteAttribute(mesh,name) 2009-03-20 10:22:16 +00:00
ganovelli 60c50bcf48 corrected vert:: to vertex:: 2009-03-20 07:15:20 +00:00
Paolo Cignoni e6fe311c6d Updated DepthSmooth to the recent library changes 2009-03-20 00:27:07 +00:00
Paolo Cignoni 2ba11ecc4a Restructured a bit the stratified sampling approaches 2009-03-19 22:04:52 +00:00
Marco Di Benedetto 375e0cec74 added static member for vertex radius check (HasPerVertexRadius()). 2009-03-19 17:26:26 +00:00
Paolo Cignoni c955238597 Added a missing HasPerVertexRadius 2009-03-19 16:22:23 +00:00
Marco Di Benedetto a0e1593671 use const_iterator for input face container. 2009-03-17 16:39:23 +00:00
Paolo Cignoni c39498df1f Fixed CMeshO error 2009-03-12 15:56:31 +00:00
Paolo Cignoni 04e2464e3d Added RemoveTVertexByCollapse and RemoveTVertexByFlip methods 2009-03-11 16:43:16 +00:00
Nico Pietroni d2bcd3dffa added in MidPoint inheritance of texture coordinates 2009-02-27 16:12:20 +00:00
Paolo Cignoni 17f0ac0431 added another grid building function. This one build up a possibly incomplete grid. 2009-02-16 00:59:24 +00:00
Paolo Cignoni 891aaef124 Corrected bug in the normalization of quality->radius of the poisson variable disk sampling 2009-02-11 09:38:41 +00:00
Paolo Cignoni b9949e8910 Added a custom macro to disable qt calls if not needed, just a temporary
solution
2009-01-29 11:12:57 +00:00
Paolo Cignoni 5b921d1159 max must begin with a capital M... 2009-01-29 10:49:34 +00:00
Paolo Cignoni 76f8093297 Namespace correction for max function 2009-01-29 10:46:39 +00:00