Re: [Meshlab-devel] octree
A processing system for 3D triangular meshes
Brought to you by:
cignoni,
granzuglia
From: Paolo C. <pao...@is...> - 2008-08-03 07:40:30
|
skunkwerk 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? > yes refine can clip single triangles. You have just to define a predicate that says for each given edge if it has to be splitted or not. A lot of code use it, all the subdivision surface code use it (look at the corresponding meshlab filter). p. > is Paolo on vacation? > yes, but I being still at home I still read email and compile meshlab... :( p. > imran > > On Thu, Jul 31, 2008 at 1:47 PM, fabio ganovelli > <fab...@gm... <mailto: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...> > <mailto: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=/> > > <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...> > > <mailto: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=/> > > <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...> > > <mailto: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=/ > <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 > -- Paolo Cignoni -- Senior Researcher Visual Computing Laboratory - ISTI - CNR http://vcg.isti.cnr.it/~cignoni ISTI - CNR Via Moruzzi 1, 56124 Pisa ITALY |