Re: [Meshlab-devel] octree
A processing system for 3D triangular meshes
Brought to you by:
cignoni,
granzuglia
From: skunkwerk <sku...@gm...> - 2008-08-02 23:09:18
|
Is anyone familiar with any functions for triangulation or tesselation? because that's the way i'm thinking of splitting triangles... /vcglib/wrap/gl has a file named glu_tesselator.h i'm not sure what the "outlines" to the tesselate function are supposed to be. or which indices to pass to it - those of the model's vertices (m.vert)? the use on line 178 of import_dae.h seems to indicate that the indices are just a local, empty vector of ints and hte outlines are just the vertices - is this correct? there's also a triangulate function in hole.h, but it doesn't seem to do much any suggestions? imran On Fri, Aug 1, 2008 at 9:27 AM, skunkwerk <sku...@gm...> wrote: > thanks Fabio, i'll try it out. I was also looking for where in the code it > splits triangles that intersect the plane you're dividing with - I remember > Paolo said something about how the refine.h file can clip triangles; do you > know of any code that uses this? > > is Paolo on vacation or something? > > imran > > > On Thu, Jul 31, 2008 at 1:47 PM, fabio ganovelli < > fab...@gm...> wrote: > >> Hi, >> I think you overseen the project metro? (vcglib/apps/metro) >> In the file sampling.h of that project you can read the declaration: >> >> typedef Octree<FaceType, typename MetroMesh::ScalarType > MetroMeshOctree; >> >> and some lines later the definition: >> >> MetroMeshOctree oS2; >> >> and finally the population: >> >> if(Flags & SamplingFlags::USE_OCTREE) >> oS2.Set(S2.face.begin(),S2.face.end()); >> >> which (just like the other SI structure) is done with the function Set >> which takes >> the iterators to the first and the last element to store. >> >> However, you can also find the implementation in the file >> vcglib/space/octree.h >> (line 231) >> >> /*! >> * Populate the octree >> */ >> template < class OBJECT_ITERATOR > >> void Set(const OBJECT_ITERATOR & bObj, const OBJECT_ITERATOR & >> eObj /*, vcg::CallBackPos *callback=NULL*/) >> >> with an English comment :) >> >> cheers, >> Fabio >> >> >> >> > thanks Fabio, >> > i looked at the files you mentioned... an octree would work fine >> > for my needs, if i could figure out how to use the code in meshlab - >> > is there a function somewhere to actually populate an octree from a >> > given model? the initialize function in octree_template.h doesn't >> > seem to do much, and the comments are in Italian! >> > >> > imran >> > >> > On Thu, Jul 31, 2008 at 2:41 AM, fabio ganovelli >> > <fab...@gm... <mailto:fab...@gm...>> wrote: >> > >> > The files in /vcglib/vcg/space/index implement a few spatial >> indexing >> > data structures >> > and algorithms (regular grid, octree, spatial hashing..) with a >> common >> > interface. >> > This means that you have function to get the closest k elements in >> the >> > spatial index >> > without caring if it is a grid or an octree. See >> > vcg/complex/trimesh/closest.h to get the picture of how it is >> > done. Even >> > better, look at the project metro in vcglib/apps/metro which >> computes >> > "point to mesh" distance with (optionally) all the spatial >> > indexing data >> > structures. >> > >> > At the present the spatial indexing ds include vicinity tests and >> > (ordered) ray intersection test, but no z sorting and no generic >> BSP. >> > >> > cheers, >> > Fabio >> > >> > >> > > I'm looking to create a binary space partitioning (BSP) tree in >> > > meshlab, to use when rendering on another platform for correct >> > > z-sorting. I noticed two files already present: octree.h in >> > > /vcglib/vcg/space/index, and aabb_binary_tree.h in >> > > /vcglib/vcg/space/index (written by m_di_benedetto >> > > <http://sourceforge.net/users/m_di_benedetto/>)? Does anyone >> know >> > > what these files do, and if they could be of any use for what i'm >> > > trying to do? >> > > >> > > thanks >> > > imran >> > > >> > >> ------------------------------------------------------------------------ >> > > >> > > >> > >> ------------------------------------------------------------------------- >> > > This SF.Net email is sponsored by the Moblin Your Move >> > Developer's challenge >> > > Build the coolest Linux based applications with Moblin SDK & win >> > great prizes >> > > Grand prize is a trip for two to an Open Source event anywhere >> > in the world >> > > http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> > > >> > >> ------------------------------------------------------------------------ >> > > >> > > _______________________________________________ >> > > Meshlab-devel mailing list >> > > Mes...@li... >> > <mailto:Mes...@li...> >> > > https://lists.sourceforge.net/lists/listinfo/meshlab-devel >> > > >> > >> > >> > >> ------------------------------------------------------------------------- >> > This SF.Net email is sponsored by the Moblin Your Move Developer's >> > challenge >> > Build the coolest Linux based applications with Moblin SDK & win >> > great prizes >> > Grand prize is a trip for two to an Open Source event anywhere in >> > the world >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> > <http://moblin-contest.org/redirect.php?banner_id=100&url=/> >> > _______________________________________________ >> > Meshlab-devel mailing list >> > Mes...@li... >> > <mailto:Mes...@li...> >> > https://lists.sourceforge.net/lists/listinfo/meshlab-devel >> > >> > >> > ------------------------------------------------------------------------ >> > >> > >> ------------------------------------------------------------------------- >> > This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> > Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> > Grand prize is a trip for two to an Open Source event anywhere in the >> world >> > http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> > ------------------------------------------------------------------------ >> > >> > _______________________________________________ >> > Meshlab-devel mailing list >> > Mes...@li... >> > https://lists.sourceforge.net/lists/listinfo/meshlab-devel >> > >> >> >> ------------------------------------------------------------------------- >> This SF.Net email is sponsored by the Moblin Your Move Developer's >> challenge >> Build the coolest Linux based applications with Moblin SDK & win great >> prizes >> Grand prize is a trip for two to an Open Source event anywhere in the >> world >> http://moblin-contest.org/redirect.php?banner_id=100&url=/ >> _______________________________________________ >> Meshlab-devel mailing list >> Mes...@li... >> https://lists.sourceforge.net/lists/listinfo/meshlab-devel >> > > |