diff --git a/include/hpp/manipulation/graph/graph-component.hh b/include/hpp/manipulation/graph/graph-component.hh index 409286ba0749932a1d8b700762cbea89d11de730..502c8093d2aba6b831415406821b77951cbc5612 100644 --- a/include/hpp/manipulation/graph/graph-component.hh +++ b/include/hpp/manipulation/graph/graph-component.hh @@ -73,10 +73,16 @@ namespace hpp { (const DifferentiableFunctionPtr_t& function, const ComparisonTypePtr_t& ineq) HPP_MANIPULATION_DEPRECATED; + /// Reset the numerical constraints stored in the component. + virtual void resetNumericalConstraints (); + /// Add core::LockedJoint constraint to the component. virtual void addLockedJointConstraint (const LockedJointPtr_t& constraint); + /// Reset the locked joint in the component. + virtual void resetLockedJoints (); + /// Insert the numerical constraints in a ConfigProjector /// \return true is at least one NumericalConstraintPtr_t was inserted. bool insertNumericalConstraints (ConfigProjectorPtr_t& proj) const; diff --git a/src/graph/graph-component.cc b/src/graph/graph-component.cc index cadd90580c1b2e901d760880882064c59497cc6a..79a5c29d68efebd5c5f7032d6a74155855eafc13 100644 --- a/src/graph/graph-component.cc +++ b/src/graph/graph-component.cc @@ -75,12 +75,22 @@ namespace hpp { addNumericalConstraint (NumericalConstraint::create (function,ineq)); } + void GraphComponent::resetNumericalConstraints () + { + numericalConstraints_.clear(); + } + void GraphComponent::addLockedJointConstraint (const LockedJointPtr_t& constraint) { lockedJoints_.push_back (constraint); } + void GraphComponent::resetLockedJoints () + { + lockedJoints_.clear(); + } + bool GraphComponent::insertNumericalConstraints (ConfigProjectorPtr_t& proj) const { IntervalsContainer_t::const_iterator itpdof = passiveDofs_.begin ();