public void Set_shaft_mode(eCh_shaft_mode mset) { shaft_mode = mset; eChConstraintMode curr_mode_z = ((ChLinkMaskLF)mask).Constr_E3().GetMode(); switch (shaft_mode) { case eCh_shaft_mode.ENG_SHAFT_PRISM: ((ChLinkMaskLF)mask).SetLockMask(true, true, false, false, true, true, true); break; case eCh_shaft_mode.ENG_SHAFT_UNIVERSAL: ((ChLinkMaskLF)mask).SetLockMask(true, true, true, false, false, false, true); break; case eCh_shaft_mode.ENG_SHAFT_CARDANO: ((ChLinkMaskLF)mask).SetLockMask(false, false, false, false, false, false, true); break; case eCh_shaft_mode.ENG_SHAFT_OLDHAM: ((ChLinkMaskLF)mask).SetLockMask(false, false, false, false, true, true, true); break; case eCh_shaft_mode.ENG_SHAFT_LOCK: default: ((ChLinkMaskLF)mask).SetLockMask(true, true, true, false, true, true, true); break; } ((ChLinkMaskLF)mask).Constr_E3().SetMode(curr_mode_z); // change data ChangedLinkMask(); }
/// Copy ructor public ChConstraint(ChConstraint other) { c_i = other.c_i; g_i = other.g_i; b_i = other.b_i; l_i = other.l_i; cfm_i = other.cfm_i; valid = other.valid; disabled = other.disabled; redundant = other.redundant; broken = other.broken; mode = other.mode; }
protected int offset; //< offset in global "l" state vector (needed by some solvers) /// Default ructor public ChConstraint() { c_i = 0; g_i = 0; b_i = 0; l_i = 0; cfm_i = 0; valid = false; disabled = false; redundant = false; broken = false; _active = true; mode = eChConstraintMode.CONSTRAINT_LOCK; }
/// Sets the mode of the raint: free / lock / complementary public void SetMode(eChConstraintMode mmode) { mode = mmode; UpdateActiveFlag(); }