Skip to content
Snippets Groups Projects
Commit 8108ce6a authored by Joseph Mirabel's avatar Joseph Mirabel Committed by Joseph Mirabel
Browse files

Update LevelSetEdge::applyConstraints to NumericalConstraint class

parent 9baeed85
No related branches found
No related tags found
No related merge requests found
......@@ -341,26 +341,17 @@ namespace hpp {
ConstraintSetPtr_t cs = extraConfigConstraint ();
const ConfigProjectorPtr_t cp = cs->configProjector ();
assert (cp);
vector_t offset = cp->rightHandSideFromConfig (q_offset);
size_t row = 0, nbRows = 0;
cp->rightHandSideFromConfig (q_offset);
for (NumericalConstraints_t::const_iterator it =
extraNumericalConstraints_.begin ();
it != extraNumericalConstraints_.end (); ++it) {
const core::DifferentiableFunction& f = (*it)->function ();
nbRows = f.outputSize ();
vector_t value = vector_t::Zero (nbRows);
// TODO: fix this function
if (!(*it)->comparisonType ()->constantRightHandSide ()) {
f (value, levelsetTarget);
offset.segment (row, nbRows) = value;
row += nbRows;
}
}
cp->rightHandSide (offset);
(*it)->rightHandSideFromConfig (levelsetTarget);
}
for (LockedJoints_t::const_iterator it = extraLockedJoints_.begin ();
it != extraLockedJoints_.end (); ++it) {
(*it)->rightHandSideFromConfig (levelsetTarget);
}
cp->updateRightHandSide ();
// Eventually, do the projection.
if (cs->apply (q))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment