| 12 | namespace embree { namespace collide2 { |
| 13 | |
| 14 | void DistanceConstraint::initConstraint (ClothModel const & model, size_t p0ID, size_t p1ID) { |
| 15 | |
| 16 | bodyIDs_[0] = p0ID; |
| 17 | bodyIDs_[1] = p1ID; |
| 18 | |
| 19 | auto & x0 = model.x_0_[p0ID]; |
| 20 | auto & x1 = model.x_0_[p1ID]; |
| 21 | |
| 22 | rl_ = distance (x1, x0); |
| 23 | } |
| 24 | |
| 25 | void DistanceConstraint::solvePositionConstraint (ClothModel & model, float timeStep, size_t iter) { |
| 26 |
no test coverage detected