Commit Graph

55 Commits

Author SHA1 Message Date
Paolo Cignoni 7bc4277fcd Cleaned up documentation of components (new doxygroup for them, written something for most of them...).
Cleaned Edge components (Added adjacency stuff, implemented the single emptycore)
2012-11-07 01:24:45 +00:00
Nico Pietroni 8e8f537321 corrected order of functions call in NextE() 2012-10-26 12:28:17 +00:00
Paolo Cignoni d784bebe07 Added guards to avoid useless (and sometime dangerous) inclusion of internal file of the vcglib 2012-10-25 21:29:10 +00:00
Paolo Cignoni cfda5a3eca Removed all the UberXXX members from the various components. No more needed since many years. Still there just because we are quite lazy... 2012-10-25 13:07:25 +00:00
Paolo Cignoni b045c9b992 Removed old useless files. Why do we kept them? 2012-10-25 13:01:34 +00:00
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
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
Paolo Cignoni 37759ffcb0 sligthly better comments 2012-05-06 14:42:04 +00:00
Paolo Cignoni e532ec9751 Added VVStarVE and VEStarVE functions (to get stars of vertexes and edges when working with edge meshes) to edge topology. 2012-04-27 09:23:01 +00:00
Paolo Cignoni 159f9d0c0f added an assertion to block the use of VEiterators in case of unitialized VEadjacency 2012-02-09 17:54:25 +00:00
Paolo Cignoni 7fb6c417da Missing Include 2012-01-20 07:51:49 +00:00
Paolo Cignoni c8fecaecf3 added Class VEIterator for traversing all the edges over a single vertex 2011-12-12 23:27:26 +00:00
Paolo Cignoni e8971a7ee7 corrected bug in vertexEdge adjacency relations 2011-12-12 23:26:25 +00:00
Paolo Cignoni 66b2f8539f removed useless reference return in const int imark() 2011-11-21 07:22:00 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +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
ganovelli 7a86b3fd25 added EmptyVertexRef to the default type 2011-06-01 13:31:28 +00:00
Paolo Cignoni 08e072aeb1 added empty VE reference to the base class of edges 2011-05-31 08:45:41 +00:00
Paolo Cignoni 7f12ed85d7 Cleaned up a bit the duplicated EV and VertexRef relations. Added VE component for keeping the list of edges incident on vertex 2011-05-31 08:33:41 +00:00
Paolo Cignoni e2d800f89f Cleaned up a few things for edge topology management. Added isborder for edges... 2011-05-24 09:39:37 +00:00
Paolo Cignoni 2eec2e0d55 missing const in edge adj access 2011-05-10 21:56:15 +00:00
ganovelli 099149e990 corrected bug in EEAdj constructor 2011-04-21 15:51:03 +00:00
ganovelli 585f0462e8 ImportLocal to ImportData. Adjacencies are no more handle by ImportData, but
by speficic functions in append.h (ImportPerxxxAdj(..))
2010-06-16 16:24:26 +00:00
ganovelli de851eb29e inclusion of alltypes.h 2010-05-19 17:16:58 +00:00
Paolo Cignoni 4a4039f138 fixed wrong pointer type in EHAdj class 2010-04-26 15:02:04 +00:00
ganovelli 261ff53ab1 [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:18 +00:00
ganovelli 2f8a8945cc added inclusion of used_types.h 2010-03-19 17:21:25 +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
mtarini 1664791bf3 minor: local variable rename to avoid weird compilation problems. 2009-10-14 14:30:28 +00:00
Nico Pietroni 98e834c540 corrected 1 bug in PointDistance function 2009-09-18 09:16:17 +00:00
Paolo Cignoni c534298f2f removed harmless warning 2009-06-23 20:45:06 +00:00
Federico Ponchio e888ef1560 removed some useless consts 2009-06-03 12:23:20 +00:00
ganovelli 49b4970452 [SIMPLEXplus promotion]
This modification removes the old way to define simplexes (already deprecated and unsupported).
In the following SIMPLEX = [vertex|edge|face|tetrahedron]

All the stuff that was in vcg/simplex/SIMPLEXplus/ has now been promoted to vcg/simplex/

Details:
- the folder vcg/simplex/SIMPLEX/with has been removed
- the file vcg/simplex/SIMPLEX/base.h has been renamed into  vcg/simplex/SIMPLEX/base_old.h 
- the content of vcg/simplex/SIMPLEXplus/ has been moved into vcg/simplex/SIMPLEX/
- the folder vcg/simplex/SIMPLEXplus/ has been removed

Actions the update the  code using vcglib:
replace <vcg/simplex/SIMPLEXplus/*> with  <vcg/simplex/SIMPLEX/*> in every include
for MESHLAB users: already done along with this commit
2008-12-19 10:32:32 +00:00
ganovelli ca3f973398 added unsupported to deprecated in the warning 2008-12-12 18:11:42 +00:00
ganovelli cdb021e821 added typenames to compile with gcc 2008-09-30 10:38:58 +00:00
ganovelli 5d1bd20c33 added warning for deprecation of this way to define the simplex 2008-09-30 10:38:04 +00:00
Paolo Cignoni f354a9f445 Small gcc compiling issues 2007-05-31 09:39:56 +00:00
mtarini 22fd220c6f Texture coord name change! "TCoord" and "Texture" are BAD. "TexCoord" is GOOD. 2007-03-12 15:37:19 +00:00
Paolo Cignoni a3ba09a069 Added missing typename for interp.parameters 2006-10-07 10:02:16 +00:00
Nico Pietroni 5f842ad53e *** empty log message *** 2006-07-26 08:13:57 +00:00
Nico Pietroni 184edbcc3f first release version 2006-07-26 08:09:09 +00:00
Federico Ponchio 7f2aac509e Fixed some UberZ fuynctions and non defined _flags 2005-11-30 14:05:04 +00:00
Paolo Cignoni 4be15d81cd Added ordered constructor that build a edge with unique ordering
among vertices (useful for edge-collapse simplification)
2005-10-14 12:34:55 +00:00
Paolo Cignoni a60af2bbb7 *** empty log message *** 2005-10-01 09:26:57 +00:00
Paolo Cignoni 957255b9a8 Major rewriting of the whole class edge. Removed default flags and nonsense attibutes. Given consistent naming to defines. 2005-10-01 09:22:51 +00:00
ganovelli 8ca165bb98 template parametere Scalar removed 2005-07-15 15:45:51 +00:00
Federico Ponchio 2328e5b1e4 *** empty log message *** 2005-04-14 11:35:09 +00:00
Federico Ponchio 8ca8327f5d inline Set(...) -> inline void Set(...) 2004-10-25 16:25:12 +00:00
ganovelli d7799df3d6 created 2004-10-25 16:08:08 +00:00
ganovelli 4f9a67327e added: constructor,Set and some minor changes. 2004-10-25 08:21:17 +00:00