00001 #ifndef OPENTISSUE_COLLISION_COLLISION_AABB_TREE_AGAINST_ITSELF_H 00002 #define OPENTISSUE_COLLISION_COLLISION_AABB_TREE_AGAINST_ITSELF_H 00003 // 00004 // OpenTissue Template Library 00005 // - A generic toolbox for physics-based modeling and simulation. 00006 // Copyright (C) 2008 Department of Computer Science, University of Copenhagen. 00007 // 00008 // OTTL is licensed under zlib: http://opensource.org/licenses/zlib-license.php 00009 // 00010 #include <OpenTissue/configuration.h> 00011 00012 #include <OpenTissue/collision/aabb_tree/policies/aabb_tree_self_collision_policy.h> 00013 #include <OpenTissue/collision/bvh/bvh_self_collision_query.h> 00014 00015 namespace OpenTissue 00016 { 00017 namespace collision 00018 { 00019 00028 template< typename aabb_tree_geometry, typename contact_point_container> 00029 void aabb_tree_against_itself( aabb_tree_geometry const & aabb_tree, contact_point_container & contacts) 00030 { 00031 typedef typename aabb_tree_geometry::bvh_type bvh_type; 00032 00033 typedef OpenTissue::bvh::SelfCollisionQuery< OpenTissue::aabb_tree::SelfCollisionPolicy<aabb_tree_geometry> > collision_query; 00034 00035 collision_query query; 00036 00037 query.run(aabb_tree.m_bvh,contacts); 00038 } 00039 00040 } // namespace collision 00041 00042 } // namespace OpenTissue 00043 00044 // OPENTISSUE_COLLISION_COLLISION_AABB_TREE_AGAINST_ITSELF_H 00045 #endif