Go to the documentation of this file.00001 #ifndef OPENTISSUE_COLLISION_COLLISION_OBB_TREE_OBB_TREE_H
00002 #define OPENTISSUE_COLLISION_COLLISION_OBB_TREE_OBB_TREE_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/collision/obb_tree/obb_tree_types.h>
00013
00014 namespace OpenTissue
00015 {
00016 namespace collision
00017 {
00018
00019 template<typename obb_tree_types>
00020 bool obb_tree_obb_tree(
00021 typename obb_tree_types::coordsys_type const & Awcs
00022 , typename obb_tree_types::bvh_type const & A
00023 , typename obb_tree_types::coordsys_type const & Bwcs
00024 , typename obb_tree_types::bvh_type const & B
00025 , typename obb_tree_types::result_type & results
00026 )
00027 {
00028 typedef typename obb_tree_types::construtor_type contructor_type;
00029 typedef typename obb_tree_types::coordsys_type coordsys_type;
00030 typedef typename obb_tree_types::collision_query_type query_type;
00031
00032 coordsys_type A2B = OpenTissue::math::model_update(Awcs,Bwcs);
00033 query_type query;
00034 query.run(A2B,A,B,results);
00035 return (results.size()>0);
00036
00037 }
00038
00039 }
00040
00041 }
00042
00043
00044 #endif