Go to the documentation of this file.00001 #ifndef OPENTISSUE_COLLISION_AABB_TREE_AABB_TREE_DEBUG_DRAW_H
00002 #define OPENTISSUE_COLLISION_AABB_TREE_AABB_TREE_DEBUG_DRAW_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/collision/bvh/bvh_get_leaf_nodes.h>
00013
00014 namespace OpenTissue
00015 {
00016 namespace aabb_tree
00017 {
00018
00024 template<typename aabb_tree_geometry>
00025 void debug_draw( aabb_tree_geometry const & aabb_tree)
00026 {
00027 typedef typename aabb_tree_geometry::bvh_type bvh_type;
00028
00029 typename bvh_type::bv_ptr_container nodes;
00030 OpenTissue::bvh::get_leaf_nodes(aabb_tree.m_bvh,nodes);
00031
00032 typename bvh_type::bv_iterator node = nodes.begin();
00033 typename bvh_type::bv_iterator end = nodes.end();
00034 for (;node!= end;++node )
00035 node->volume().draw( GL_LINE_LOOP );
00036 }
00037
00038 }
00039 }
00040
00041
00042 #endif