|
CG
Version 25
|


Go to the source code of this file.
Functions | |
| int | detectCollisions (real t, GridCollection &gc, int numberOfRigidBodies, RigidBodyMotion **body, const BodyDefinition &bodyDefinition, const real minimumSeparation=2.5) |
| Detect collisions. | |
| int detectCollisions | ( | real | t, |
| GridCollection & | gc, | ||
| int | numberOfRigidBodies, | ||
| RigidBodyMotion ** | body, | ||
| const BodyDefinition & | bodyDefinition, | ||
| const real | minimumSeparation | ||
| ) |
Detect collisions.
detectCollisions
Currently This routine only works in some special cases: 2D cylinders and spheres.
| t | (input) : current time. |
| gc | (input) : grid collection |
| numberOfRigidBodies | (input) : number of rigid bodies to check for collisions. |
| body | (input) : array of rigid bodies |
| bodyDefinition | (input) : defines the bodies. |
| minimumSeparation | (input) : minimum allowable separation (in grid lines). |
References all, assert(), axis, c, d, dx, getGhostIndex(), RigidBodyMotion::getMass(), RigidBodyMotion::getPosition(), RigidBodyMotion::getVelocity(), grid, includeGhost, m1, m2, mg, RigidBodyMotion::momentumTransfer(), ok, printF(), side, x, and xab.
Referenced by main().
1.8.3