00001 #ifndef OPENTISSUE_DYNAMICS_MULIBODY_CD_MBD_SETUP_DEFAULT_GEOMETRY_DISPATCHER_H 00002 #define OPENTISSUE_DYNAMICS_MULIBODY_CD_MBD_SETUP_DEFAULT_GEOMETRY_DISPATCHER_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/dynamics/mbd/collision_detection/collision_handlers/mbd_box_box_handler.h> 00013 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sdf_sphere_handler.h> 00014 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_box_plane_handler.h> 00015 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sphere_box_handler.h> 00016 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sphere_plane_handler.h> 00017 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sdf_plane_handler.h> 00018 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sphere_sphere_handler.h> 00019 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_sdf_sdf_handler.h> 00020 #include <OpenTissue/dynamics/mbd/collision_detection/collision_handlers/mbd_inverted_box_sphere_handler.h> 00021 00022 namespace OpenTissue 00023 { 00024 namespace mbd 00025 { 00026 00033 template<typename simulator_type> 00034 inline void setup_default_geometry_dispatcher( simulator_type & simulator) 00035 { 00036 typedef typename simulator_type::types mbd_types; 00037 00038 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::BoxBoxHandler<mbd_types>::test ); 00039 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SDFSDFHandler<mbd_types>::test ); 00040 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SDFSphereHandler<mbd_types>::test ); 00041 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SDFSphereHandler<mbd_types>::mirrowed_test ); 00042 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SphereSphereHandler<mbd_types>::test ); 00043 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SDFPlaneHandler<mbd_types>::test ); 00044 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SDFPlaneHandler<mbd_types>::mirrowed_test ); 00045 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SpherePlaneHandler<mbd_types>::test ); 00046 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SpherePlaneHandler<mbd_types>::mirrowed_test ); 00047 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SphereBoxHandler<mbd_types>::test ); 00048 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::SphereBoxHandler<mbd_types>::mirrowed_test ); 00049 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::BoxPlaneHandler<mbd_types>::test ); 00050 simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::BoxPlaneHandler<mbd_types>::mirrowed_test ); 00051 //simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::InvertedBoxSphereHandler<mbd_types>::test ); 00052 //simulator.get_collision_detection()->get_narrow_phase()->bind( &OpenTissue::mbd::collision_detection::InvertedBoxSphereHandler<mbd_types>::mirrowed_test ); 00053 } 00054 00055 } // namespace mbd 00056 } // namespace OpenTissue 00057 00058 // OPENTISSUE_DYNAMICS_MULIBODY_CD_MBD_SETUP_DEFAULT_GEOMETRY_DISPATCHER_H 00059 #endif