2014.12.5
So many days of compiling, finally put boost+cgal+qt+qt-addin+libqglviewer fix. Although.. /demo/polyhedron did not get out (compile all over, but the execution file does not run), but put. /demo/aabb_tree to good grasp.
Aabb This demo feels very practical. There are cut plane,intersection,segements, need to understand this.
In addition today re-looked at the school sister sent me the example of Cgal cut, feel a new harvest, the link recorded: http://www.xpc-yx.com/2013/08/05/%e4%bd%bf%e7%94%a8cgal%e5%ae%9e%e7% 8e%b0%e6%b2%bf%e7%9d%80%e9%bc%a0%e6%a0%87%e8%bd%a8%e8%bf%b9%e5%88%86%e5%89%b2%e6%a8%a1%e5%9e%8b/
Qt really is a very magical thing, feel more useful than MFC.
AABB demo, the program in the. \cgal\demo\aabb_tree\scene.cpp, where Algorithm->cut plane->intersection is called by the function Cut_segment_plane ().
1 voidScene::cut_segment_plane ()2 {3 //Build tree (if build fail, exit)4 Build_facet_tree ();5 if(M_facet_tree.empty ()) {return; }6 7Plane Plane =Frame_plane ();//Is it possible to modify it here? 8 9 //Compute IntersectionsTentypedef std::vector<facet_tree::object_and_primitive_id>intersections; One intersections intersections; A m_facet_tree.all_intersections (plane, std::back_inserter (intersections)); - - //Fill Data Structure the m_cut_segments.clear (); - for(Intersections::iterator it =Intersections.begin (), -End = Intersections.end (); It! = end; ++it) - { + Constsegment* inter_seg = cgal::object_cast<segment> (& (it->First )); - + if(NULL! =inter_seg) A { atM_cut_segments.push_back (*inter_seg); - } - } - -M_cut_plane =cut_segments; -}
Bi Set record