Collision detection and response of deformable objects with tetrahedral meshes were implemented for surgery simulation. Collision detection used spatial hashing to detect vertex - tetrahedron collision pairs. Consistent penetration depth and direction for each collided vertex were calculates with collision responses. Constraint plane for each vertex was then derived from penetration depth and direction. Deformation calculation used constraint planes to calculate penalty forces acting on collided vertices. Collision detection was accelerated using multi - threading technique. Deformation calculation was run in a separate thread. Transition buffers were used to transfer calculation results between collision processing and deformation calculation. Simulation results of several test scenes were given and computational efficiencies were analyzed and compared.%实现了针对手术仿真使用的柔性体碰撞检测和碰撞响应.柔性体使用四面体网格模型.碰撞检测使用空间散列表检测顶点-四面体碰撞对.碰撞响应计算发生碰撞顶点的一致性侵入深度和方向,并由此计算顶点的约束平面.变形计算使用约束平面对顶点施加惩罚力.碰撞检测使用多线程加速.变形计算单独运行在一个线程中,与碰撞处理之间使用过渡缓冲区传递运算结果.最后给出了若干测试仿真场景的运行效果,并对计算效率进行了分析和比较.
展开▼