forked from StudioInfinity/dyna3
Update the realization when a constraint is activated
Sycamore probably has a better way to do this, but this way works for now.
This commit is contained in:
parent
a37c71153d
commit
e5f4d523f9
2 changed files with 16 additions and 6 deletions
|
@ -97,7 +97,7 @@ impl Assembly {
|
|||
self.elements.update(|elts| {
|
||||
elts[args.0].constraints.insert(key);
|
||||
elts[args.1].constraints.insert(key);
|
||||
})
|
||||
});
|
||||
}
|
||||
|
||||
// --- realization ---
|
||||
|
@ -116,10 +116,12 @@ impl Assembly {
|
|||
let mut gram_to_be = PartialMatrix::new();
|
||||
self.constraints.with_untracked(|csts| {
|
||||
for (_, cst) in csts {
|
||||
let args = cst.args;
|
||||
let row = elts[args.0].index;
|
||||
let col = elts[args.1].index;
|
||||
gram_to_be.push_sym(row, col, cst.rep);
|
||||
if cst.active.get_untracked() {
|
||||
let args = cst.args;
|
||||
let row = elts[args.0].index;
|
||||
let col = elts[args.1].index;
|
||||
gram_to_be.push_sym(row, col, cst.rep);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue