The collision detection is usually one of the most costly stages of physical simulation, especially when dealing with deformable bodies, in which the topological changes require constant updates data structures.

Ground Collision

The floor of the scene is defined as the plane y = 0, therefore, to determine if one particle of the system across the floor, we test the y component of its position. If this component is less than zero means that the particle must have its position corrected as follows:
• Its y component is reseted and
• Its speed is recalculated.

Tool Collision

The implemented tool is so simple that the collision test has a very low cost, so we didn’t use any special structure for this, the tests are made for all particles.
The tool interaction has been implemented to represent a virtual shovel with which the user can interact with the 3D models, obtaining force feedback.
In the same way it is done in a collision with the ground, collisions with the tool are also addressed with the normal of the plane representing the surface of the blade. Thus, the position of the particle after the collision is the point where it is projected on the plane, and the penetration distance defines the force intensity.
The test that defines the rectangular region that corresponds to the surface of the tool is done by creating four vectors starting from each of the four corners of the tool toward the point projected on the surface of the plane. These vectors are normalized and tested against the edges of the tool. If any of the angles is greater than 90 degrees there is no collision.

Last edited Mar 4, 2010 at 3:32 PM by Lenna, version 3


No comments yet.