Along with the rapid development of computer software, hardware and network technology, people desperately need authentic simulation for the real world to solve practical problems. Collision detection is an important issue in the field of computer animation, physical simulation, computational geometry, robotics, computer games. In a virtual environment, collision detection is the foundation of interaction between objects.First, Analyses and compares the advantages and disadvantages of current common collision detection algorithms respectively, optimizes and combines AABB (Aligned Axis Bounding Box) and BSP (Binary Space Partitioning) algorithms by adopting their advantages, and applies the two algorithms in preliminary detection phase and detailed detection phase respectively, so the efficiency of collision detection is improved. Meanwhile, a parallel processing method is put forward, which uses multithreading technology on multiprocessor machine to implement the algorithm. According to the complexity of virtual environment, the parallel strategy divides the whole collision detection problem into some similar sub-problems which are assigned to different threads. Finally, use master-slave process mode to control correspondence. The strategy can make full use of hardware resources and greatly improve collision detection efficiency, so as to enhance the reliability and authenticity of virtual environment.In the 3D real-time display and alarm module of General Security Monitoring and Evaluation Platform, relevant test cases for the 3D collision detection parallel algorithm based on BSP and AABB are designed. Then, it is compared with basic collision detection algorithm and serial collision detection algorithm from the theory of time complexity and practical operation time. Finally, test results show that the system frame rate is increased significantly and running more smoothly by using the 3D collision detection parallel algorithm based on BSP and AABB. |