Commit Graph

62 Commits

Author SHA1 Message Date
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
Paolo Cignoni 39f12e9fdd added a function to permutate the vertex vector according to a given permutation. 2009-12-07 09:05:20 +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
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
Marco Di Benedetto a79d8f9bd8 changed field order in PointerUpdater to prevent constructor warning (in initialization list). 2009-07-08 16:12:46 +00:00
Marco Di Benedetto 54f5418be2 removed reset to false of preventUpdateFlag in Clear(). 2009-06-29 16:13:26 +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 917343b0f5 removed the (useless) template parameter to Per[XXX]DeleteAttribute(mesh,name) 2009-03-20 10:22:16 +00:00
ganovelli 87b8c55144 added Allocator::IsValidHandle which returns true if an handle to an attribute is valid or if the attribute
has been removed. This modification affects timesh/allocate.h and trimesh/base.h
2009-01-15 17:41:59 +00:00
ganovelli 4cae6b5107 added the update of the pointers related to the AddEdges 2008-11-26 17:46:31 +00:00
ganovelli 1aa88e635b added update of newEnd in AddFaces
Added [de]allocation of edges and per-edges attributes.
2008-11-12 15:46:16 +00:00
Paolo Cignoni 2e7c97e90e Corrected the update cycle in the AddFace. Thanks to Michele Vannoni for pointing out this bug! 2008-11-07 15:36:19 +00:00
ganovelli 0d4b3fbed0 [Polygon modification]
Added components to the face to handle generic polygons.
(compiled with .net and gcc)

This commit includes the following files:
vcg/complex/trimesh/base.h
Added deallocation of polygon data in the destructor

vcg/complex/trimesh/allocate.h
generalization from 3 to VN() vertices

vcg/complex/trimesh/update/topology.h
generalization from 3 to VN() vertices

vcg/complex/trimesh/update/flags.h
generalization from 3 to VN() vertices

vcg/simplex/face/pos.h
generalization from 3 to VN() vertices

vcg/simplex/faceplus/base.h
Added the method VN() to query the number of vertices
of the polygon (deafult 3) and methods Prev and Next

vcg/simplex/faceplus/component.h
added Alloc and Dealloc calls along the hierarchies
2008-10-08 09:10:53 +00:00
ganovelli 1a9220ce98 behaviour change: AddFaces and AddVertices return the vert.end() and face.end() if called with n==0.
Added AddVertices with local pointers to VertexPointer to update
2008-07-29 13:20:44 +00:00
Paolo Cignoni 1407af2537 removed harmless warnings 2008-07-09 10:31:55 +00:00
Paolo Cignoni 700b8cd26e Removed annoying unsigned vs signed warnings.
Thanks to Alain Boyer for the kind bug submission!
2008-06-29 22:44:44 +00:00
ganovelli db1c99cdf9 added PerMeshAttribute 2008-06-23 14:18:13 +00:00
Massimiliano Corsini 1059b3d24d add missing include 2008-06-05 14:12:40 +00:00
ganovelli 666040bcf5 PerVertexAttribute and PerFaceAttribute added to Trimesh 2008-05-15 16:32:27 +00:00
Paolo Cignoni 820bfdd65e fast return for compacting functions if no compacting is needed 2008-04-18 17:45:23 +00:00
Paolo Cignoni fc917d5080 moved Index function from append to the allocate 2008-04-10 09:18:57 +00:00
Paolo Cignoni 9a31f6318d template the reorder functions on the vector types (for ocf) 2008-04-03 22:47:10 +00:00
Paolo Cignoni 3d4222b231 Completed the garbage collecting functions CompactVertexVector and CompactFaceVector. 2008-03-11 09:22:07 +00:00
Paolo Cignoni 1f38a990b5 forgotten required std:: 2007-12-11 20:18:55 +00:00
Paolo Cignoni 7d6a210e75 Added the CompactVertexVector garbage collecting function. 2007-12-11 11:36:03 +00:00
Paolo Cignoni 12c8c9f3ff Added Allocator::DeleteFace and Allocator::DeleteVertex; Now the use of SetD() should be deprecated. 2007-10-16 16:46:53 +00:00
Paolo Cignoni f4d3561502 Added test in AddVertices to do not update un-initalized vert references (for newly allocated faces) 2007-01-11 10:24:25 +00:00
Paolo Cignoni 5670460684 Added check with the new end and avoided dangerous updating of already updated pointers 2006-11-29 15:58:50 +00:00
Paolo Cignoni d614e6baa5 Added default constructor with null initialization to adjacency members.
AddFaces and AddVertices NEED to know if the topology is correctly computed to update it.
2006-11-28 22:34:28 +00:00
Federico Ponchio cc5d4df4e8 Removed a couple of useless assert. 2006-11-13 13:12:27 +00:00
ganovelli 841b424b5c the calls to HasFFAdjacency e HasVFAdjacency have been changed to override them for the optional attributes (see vcg/complex/trimesh/base.h) 2006-10-27 11:06:29 +00:00
Paolo Cignoni 804c4aaf1c Added #include <assert.h> 2006-10-17 06:54:14 +00:00
Federico Ponchio b5f612153c usual typename missing 2006-10-02 09:31:47 +00:00
Paolo Cignoni 655ae0ce8b Fixed a few bug. 2006-09-29 15:11:41 +00:00
Paolo Cignoni aabba26c14 Removed a useless, wrong version of AddFaces 2006-09-29 14:40:22 +00:00
Paolo Cignoni a16d494cd5 fix bug end iterator++ 2006-02-28 12:22:48 +00:00
Paolo Cignoni baad6db4b9 fix bug end iterator++ 2006-02-28 12:13:49 +00:00
Paolo Cignoni e58bf0d711 Removed flags clearing (now it should be in the constructor of face and vertex) 2005-11-10 15:37:58 +00:00
Paolo Cignoni dee2e4f284 Re-inserted the cFFp and cVFp access. If only the const version of the member function exists, the compiler will call it
when a non-const object invokes that function
2005-10-13 09:32:11 +00:00
Federico Ponchio 1723bbf895 cFFp doesn not exist -> FFp (there is the const version...)
same for cVFp.
2005-10-12 17:26:19 +00:00
Paolo Cignoni ead8780772 Removed clearing of flags of added faces. Now the flag component has a constructor that clear it.
FF and VF adjacency are updated only if they are present and consistent (e.g. only if VFp(k) != 0 or FFp(k)!=0)
2005-10-12 10:47:21 +00:00
Paolo Cignoni 24a1c6f2eb Corrected for the fourth time line a cast to Facetype at line 341.
Read the notes there before changing it again
2005-07-01 11:22:00 +00:00
ganovelli e865911042 two warnings on type cast 2005-06-09 14:14:29 +00:00
Marco Callieri a0b3813df9 in addfaces, added casting for face* returned from vertex.VFp() [borland] 2005-04-27 16:08:39 +00:00
Paolo Cignoni 22ba690fda Wrong left parenthesis removed. 2005-03-23 13:22:57 +00:00
ganovelli c00bed83e6 cast int->iterator corrected 2005-03-23 11:29:49 +00:00
Federico Ponchio cce86d42f8 reverted tarini mod 2005-02-19 10:43:11 +00:00
mtarini 56609abbb0 aggiunto un typecast a (FaceType*) per farlo compilare under Mingw comp 2005-02-08 17:14:28 +00:00
Nico Pietroni 818428b69a added i#nclude <vector> 2004-10-14 15:08:04 +00:00
Paolo Cignoni 8c18db4e51 Replaced some typename definitions 2004-09-07 07:36:32 +00:00