GCS: Support for solver constraints to store driven/driving status

This commit is contained in:
Abdullah Tahiri
2018-03-04 16:23:15 +01:00
committed by wmayer
parent ce4503ae40
commit d531e98eac
2 changed files with 5 additions and 1 deletions

View File

@@ -37,7 +37,7 @@ namespace GCS
///////////////////////////////////////
Constraint::Constraint()
: origpvec(0), pvec(0), scale(1.), tag(0), pvecChangedFlag(true)
: origpvec(0), pvec(0), scale(1.), tag(0), pvecChangedFlag(true), driving(true)
{
}

View File

@@ -99,6 +99,7 @@ namespace GCS
double scale;
int tag;
bool pvecChangedFlag; //indicates that pvec has changed and saved pointers must be reconstructed (currently used only in AngleViaPoint)
bool driving;
public:
Constraint();
virtual ~Constraint(){}
@@ -109,6 +110,9 @@ namespace GCS
void revertParams();
void setTag(int tagId) { tag = tagId; }
int getTag() { return tag; }
void setDriving(bool isdriving) { driving = isdriving; }
bool isDriving() { return driving; }
virtual ConstraintType getTypeId();
virtual void rescale(double coef=1.);