MCPcopy Create free account
hub / github.com/RenderKit/embree / initConstraint

Method initConstraint

tutorials/collide/constraints.cpp:14–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12namespace embree { namespace collide2 {
13
14void 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
25void DistanceConstraint::solvePositionConstraint (ClothModel & model, float timeStep, size_t iter) {
26

Callers 2

createClothSheetFunction · 0.80
makeCollisionConstraintFunction · 0.80

Calls 1

distanceFunction · 0.50

Tested by

no test coverage detected