Commit Graph

43 Commits

Author SHA1 Message Date
Paolo Cignoni 3b38917e95 corrected the ImportData of the curvature type. 2014-08-09 00:11:32 +00:00
Paolo Cignoni eb642099f1 Corrected another typeclash in the curvature types (a CurVecType definition was missing in the emptycore component) 2014-06-24 08:41:41 +00:00
Paolo Cignoni df97ef0c36 Added zero initialization to quality component. (and corrected a small bug in the ocf quality component) 2013-09-24 13:55:23 +00:00
Paolo Cignoni 4665f36e40 Improved component documentation. Added IsVFInitialized, VFClear function for VF component. Clarified the difference between null and uninitialized for a VF component. 2013-03-13 14:02:03 +00:00
Paolo Cignoni b48b0e568c added initialization of mark component to zero. So all the element it is sure that are unitialized after the first unmarkall. 2012-12-21 15:33:18 +00:00
Paolo Cignoni 8476a1ff20 Reorganized ocf vertex component and added a standard interface for query the availability of data:
now we have 
static bool vertextype::HasXXX() // statically says if a certain type is present
bool vertextype::IsXXXAvaialble() // NON STATIC (always true for non ocf objects)
So now ImportData correctly works for both sides of vertex ocf component.
2012-12-17 22:54:48 +00:00
Paolo Cignoni 3b466514b3 Added Standard exception throwing functions to claim requirements in the mesh algorithmic functions (Te Deum!)
for example, now at the beginning of a function requiring FFAdjacency you should just write:

RequireFFAdjacency(mesh); 

No more assert please.
2012-12-06 10:34:08 +00:00
Paolo Cignoni 3fb4e6d061 re-Added to all the data members of vertex the const access member 2012-11-27 12:16:16 +00:00
Paolo Cignoni 5c266a7ccb HEAVY CHANGE:
The vertex and face component (natural and optional) have been cleaned and reordered.
Particular care has been devoted to have common behaviour in the import, const access, and so. 
If you get compilation errors probably it is due to the fact that if you really need constant access to a member you have to use the "c" prefixed member (e.g. if you access to normal of a constant vertex you should use the cN() member.
2012-11-15 19:04:08 +00:00
Paolo Cignoni 3170472174 added a IMark()->cIMark() 2012-11-08 18:35:38 +00:00
Paolo Cignoni 1046deb107 Corrected bug recently introduced due to small difference in the signature of the flags functions... 2012-11-07 15:42:14 +00:00
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
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 671af109a9 improved vertex component documentation 2012-10-25 21:20:10 +00:00
Paolo Cignoni 9658740974 Improving documentation. Reordered groups and started documenting main components 2012-10-25 13:47:31 +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
ganovelli 0f99bd505e changes and minor fix to enable input/output with VMI on memory 2012-07-02 14:38:10 +00:00
Nico Pietroni c1e19b4b55 added assert(0) for cVFi function if does not exixts the component 2012-05-25 13:19:03 +00:00
granzuglia 1548d6415a added missing functions in Empty:
- static bool HasCurvatureDir() { return false; }
- static bool IsCurvatureEnabled(const typename TT::VertexType *)  { return false; }
2012-04-06 08:10:32 +00:00
Paolo Cignoni b0d7d5c52e removed harmless gcc warnings 2012-04-04 10:05:35 +00:00
ganovelli 749f67c3b6 added curvature direction 2012-03-28 11:56:10 +00:00
Paolo Cignoni c8e202738c added initialization of VE adjacency components to something that allows to discriminate between the uninitializated adjacency and a vertex with no edges 2012-02-09 17:53:08 +00:00
Paolo Cignoni dee3de3cc8 Added correct overloading of ImportData for per vertex curvature component. 2011-11-01 18:33:52 +00:00
Paolo Cignoni 2fe129645b Rolled back 2011-10-05 15:04:40 +00:00
ganovelli a815890b15 minimal addition to support neighboorhood relation between vertices
and between faces
2011-06-14 16:18:34 +00:00
Paolo Cignoni 799914a0d8 commented unused argument of base ImportData to remove gcc warning 2010-06-18 14:32:50 +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 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
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
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 5e1f0ce521 Heavily restructured component of vertex simplex. Compacted all the emptyXXXX into a single EmptyCore class. Cleaned up the interface for the optional stuff now there is a standard static function that can say if a given component is enabled or not. 2010-03-03 16:01:39 +00:00
Paolo Cignoni fc6483307b added a missing cVFi() 2010-02-23 16:45:45 +00:00
Marco Di Benedetto 939da657a9 added public: to TexCoord* Name(). 2009-12-01 17:36:27 +00:00
Nico Pietroni 74bd57f2fa missing CurvatureType and CurvatureDirType inside EmptyCurvatureData 2009-10-14 17:19:56 +00:00
Nico Pietroni c57e10951c corrected funtion Normal::ImportLocal 2009-10-14 14:25:59 +00:00
Paolo Cignoni 415228fcd4 Added some missing importLocal functions 2009-08-30 13:54:06 +00:00
Marco Di Benedetto 24327b218c added HasColorOcf(). 2009-06-28 22:39:57 +00:00
Marco Di Benedetto 29b9011026 added HasNormalOcf() and HasColorOcf(). 2009-06-28 03:14:48 +00:00
Paolo Cignoni a88ee5b244 Added ocf management of per vertex texture coord 2009-06-23 20:45:44 +00:00
Federico Ponchio e888ef1560 removed some useless consts 2009-06-03 12:23:20 +00:00
Paolo Cignoni 8be6f002a3 Significant rewrote of the ImportLocal framework. Now it can really manage differently typed meshes.
It still requires that for OCF meshes the user enable stuff as needed.
2009-04-05 23:33:04 +00:00
Paolo Cignoni b8fc43e7c6 Added non optional per vertex radius component 2009-03-18 15:53:52 +00:00
ganovelli c9b6f8f7c8 2008-12-19 10:31:56 +00:00