Commit Graph

33 Commits

Author SHA1 Message Date
Gianpaolo Palma f961a49248 Added type info to the custom attributes 2017-12-07 13:52:03 +01:00
Paolo Cignoni cca62803d4 added a missing include (according to vstudio) 2017-08-30 17:09:00 +02:00
Paolo Cignoni b52734115a Added first version of foreach helpers 2017-08-30 15:57:50 +02:00
Paolo Cignoni 4b9480e2df header cleanup 2017-07-27 15:55:22 +02:00
Paolo Cignoni 012c6f6d50 Small changes required for windows compilation of all the samples 2017-04-02 19:52:16 +02:00
Paolo Cignoni 6c8cba901d Added a missing include (requested by gcc to compile unused code) 2017-03-14 22:58:18 +01:00
Paolo Cignoni c4d97c2c03 Huge reordering of header file inclusion order 2017-03-14 07:48:48 +01:00
Paolo Cignoni 97e4c0d23b Promoted the pos.h and topology.h include files to the standard inclusion. 2017-03-13 15:50:19 +01:00
Paolo Cignoni 32333eba24 Huge copyright sanitization of the header files of vcg folder. 2016-06-13 05:29:25 +00:00
Paolo Cignoni b328a5f94a Added the new mechanism for run time checking of mesh adequacy to a given algorithm.
While the many RequireXXX functions allow to check the static correctness of a mesh and
have a O(1) complexity, in many cases we need to run more complex checks to be sure that
the subsequent algorithm can run without issues.
Typical cases are the fact that there are no unreferenced vertices (NoUnreferencedVertex)
or a given adjacency is correctly initialized (and not only statically present as a type component).
2014-11-03 14:50:37 +00:00
Paolo Cignoni 3d676586a7 callback is part of the default inclusion now. 2014-02-18 20:16:26 +00:00
Paolo Cignoni 84c80a1972 Include header cleaning and reordering. 2013-11-25 10:01:24 +00:00
Paolo Cignoni c5d8479003 Refactored the complex.h file into a include manager and a base.h file
Due to a inclusion conflict order between pieces of old complex h and append/allocate
2012-12-06 10:59:18 +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 75ca1eabfc Uniformed the rarely used per mesh color to the const/reference notation standard of the components 2012-11-28 11:13:46 +00:00
Paolo Cignoni 8b4d04be7a Added a bunch of 'c' to component members to clarify constant access 2012-11-15 19:11:28 +00:00
Paolo Cignoni 586d800c66 added missing edge reflection functions (HasEdgeXXXX etc) 2012-11-10 14:57:53 +00:00
Paolo Cignoni a97119dde3 Name Cleanup VertexVectorHasPerFaceVFAdjacency -> VertexVectorHasVFAdjacency 2012-11-07 22:51:16 +00:00
Paolo Cignoni fe95eeca43 Improving Documentation: removed a ton of doxygen warnings. Cleared a bit the groups structure, added a few comments to allocator 2012-10-26 06:16:15 +00:00
Paolo Cignoni d59ea952ed Added append to the set of files always included by complex.h 2012-10-25 23:37:25 +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
Paolo Cignoni 783aef369b added hn initialization in the trimesh constructor 2012-04-04 09:53:54 +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
Nico Pietroni fc7983d3fd added HasPolyInfo function, line 538 2012-01-24 13:34:46 +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 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 4f761caf15 Added missing HasEdgeXXXX for checking the components avalability in meshes 2011-05-31 08:32:01 +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 6d27dabf19 Added Initialization of en to ZERO !!!! 2011-05-11 06:18:01 +00:00
ganovelli fea1228701 adding complex.h 2011-04-01 17:00:18 +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