Go to the documentation of this file.00001 #ifndef OPENTISSUE_COLLISION_OBB_TREE_OBB_TREE_COLLISION_QUEURY_H
00002 #define OPENTISSUE_COLLISION_OBB_TREE_OBB_TREE_COLLISION_QUEURY_H
00003
00004
00005
00006
00007
00008
00009
00010 #include <OpenTissue/configuration.h>
00011
00012 #include <OpenTissue/collision/bvh/bvh_model_collision_query.h>
00013
00014 namespace OpenTissue
00015 {
00016
00017 namespace obb_tree
00018 {
00019
00020 template <typename collision_policy>
00021 class CollisionQuery
00022 : public OpenTissue::bvh::ModelCollisionQuery<collision_policy>
00023 {
00024 public:
00025 typedef OpenTissue::bvh::ModelCollisionQuery<collision_policy> base_type;
00026 public:
00027
00028 CollisionQuery()
00029 : OpenTissue::bvh::ModelCollisionQuery<collision_policy>()
00030 {}
00031
00032 public:
00033
00034 template<typename coordsys_type,typename bvh_type, typename results_container>
00035 void run( coordsys_type const & A2B, bvh_type const & bvh_A, bvh_type const & bvh_B, results_container & results )
00036 {
00037 this->m_query = this->get_next_time_stamp();
00038 if(bvh_A.size()<bvh_B.size())
00039 base_type::run(A2B,bvh_A,bvh_B,results);
00040 else
00041 {
00042 coordsys_type B2A = inverse(A2B);
00043 base_type::run(B2A,bvh_B,bvh_A,results);
00044 }
00045 }
00046 };
00047
00048 }
00049
00050 }
00051
00052
00053 #endif