Commit Graph

4286 Commits

Author SHA1 Message Date
Paolo Cignoni ea701b39b3 Restructured Face component in order to follow the unique emptycore approach that avoid an endless derivation chain in the type definition 2012-04-04 10:04:46 +00:00
Paolo Cignoni 3811efacd8 removed useless include 2012-04-04 09:59:42 +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
Paolo Cignoni 93b4573910 Moved the trimesh_copy sample to the apps/sample folder 2012-04-03 10:52:51 +00:00
granzuglia 4d4ac4b41e added (commented) code for copying non-optional attribute mesh in an ocf one. 2012-04-03 08:03:30 +00:00
granzuglia 3d46da2cb5 unit test function for meshcopy. It uses ftime to get time. 2012-04-02 14:47:04 +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
Paolo Cignoni e3d0a6d0cb added method for generating a random point into a triangle (it generate three random barycentric coords) 2012-03-30 23:42:04 +00:00
Nico Pietroni a53447ab1c added VFOrderedStarVF_FF function 2012-03-29 16:36:01 +00:00
Nico Pietroni 2413b12724 switched to the new version of tangent directions component per face 2012-03-29 16:35:15 +00:00
Nico Pietroni fe71126700 added TransformationMatrix function 2012-03-29 16:34:31 +00:00
Nico Pietroni d5e7d551ba clean up the code and used new per face component 2012-03-29 16:33:33 +00:00
ganovelli bbcfbfabc2 added CurvatureDir to Face 2012-03-28 12:39:22 +00:00
ganovelli 749f67c3b6 added curvature direction 2012-03-28 11:56:10 +00:00
Nico Pietroni 9d37776dd6 first release version 2012-03-16 13:50:45 +00:00
Nico Pietroni 4f166fbd95 added Crease Flag access functions 2012-03-16 13:49:04 +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 57bd611892 added assert in the VFIterator to handle uninitialized topology. 2012-03-14 16:02:30 +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
Paolo Cignoni f58551601a CHANGE to the VERY USED PointDistanceBase, the basic functor used to find the closest point to a face in all the grids.
It has a bug that could return a nan in some degnerate case where an almost null face has different vertices but the squared distance between them could be zero. 
Now it should handle also these cases.
2012-03-14 15:59:42 +00:00
Paolo Cignoni b57a747441 rewriting of the SegmentPointSquaredDistance, now it is much much much shorter. 2012-03-14 15:57:37 +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 a912ac3a82 Small changed in the rendering of the trackball icon to remove the stepped line effect due to line antialiasing 2012-03-06 11:52:00 +00:00
Paolo Cignoni 3ed7a817e2 yet another surviving m.hasSomething -> has something (m) 2012-03-04 17:48:04 +00:00
Paolo Cignoni 3c85446ae4 added another special key to the one mapped from qt to anttweakbar 2012-03-04 16:27:02 +00:00
Paolo Cignoni 858e4c575f Improved the anttweakbar sample now has zoom with doubleclick... 2012-03-04 16:26:15 +00:00
Paolo Cignoni add25e7bf0 added a missing std:: 2012-02-27 07:06:26 +00:00
Paolo Cignoni 29fdad2622 Added constructor with seed to the Mersenne rnd generator 2012-02-27 06:58:17 +00:00
Paolo Cignoni 6983d4f6e9 Added a few comments... 2012-02-25 14:40:23 +00:00
Paolo Cignoni bc57fc36b4 Moved here and cleaned the kdtree for points implemented by Gael 2012-02-22 16:57:44 +00:00
Paolo Cignoni 3a9c974fd5 Handy function for setting the size of the drawing in mm and correct management of label printing 2012-02-16 17:31:31 +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
Luigi Malomo e2b5b6fba3 Added to anttweakbar qt mapper a function to copy std::string values 2012-02-14 11:39:27 +00:00
Paolo Cignoni 0464c9f822 removed a surviving UpdateFlags::FaceProjection that should have been deleted a few month ago... 2012-02-13 23:03:38 +00:00
Paolo Cignoni 1def190868 harmless gcc warnings 2012-02-09 17:55:41 +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 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 d331cf7f60 Added OrientedDisk creation method. and a missing "clear()" 2012-02-09 17:50:38 +00:00
Paolo Cignoni 790cf5d7ef Added a second function to compute the distance between a point and a box, according to the fact that you need the distance between the surface of a box or the distance from the filled box (e.g. the distance is 0 inside the box) 2012-02-09 17:30:54 +00:00
Paolo Cignoni 86f636b64b Added function to add a point with radius to a bbox. 2012-02-09 17:24:23 +00:00
Nico Pietroni 69508353bb resolved minor compilation issues 2012-02-09 14:02:34 +00:00