Menu

#45 templates in the mesh

v1.0_(example)
closed
nobody
None
1
2015-01-20
2014-12-24
Anonymous
No

Hello,
I have tried to define the type of the mesh like this:

class MyMesh : public vcg::tri::TriMesh< std::deque<myvertex>, std::deque<myface> , std::vector<myedge> > {};</myedge></myface></myvertex>

but I get weird templates messages I do understand fully. Does the container have to be a std::vector?

Discussion

  • Fabio Ganovelli

    Fabio Ganovelli - 2014-12-25

    Hello,
    the containers must be std::vector or vcg::[simplexname]:vector_ocf

    In principle any random access container would do it but there are template specializations in the library that are done only for std::vector so it would not work with other containers.
    Beside, the library handles the containers, one should not push_back or push_front directly so it would not be tremendously useful to use a deque.

     
  • Fabio Ganovelli

    Fabio Ganovelli - 2015-01-20
    • status: open --> closed
     

Anonymous
Anonymous

Add attachments
Cancel