示例#1
0
        public ChLinkEngine()
        {
            mot_rot              = 0;
            mot_rot_dt           = 0;
            mot_rot_dtdt         = 0;
            mot_rerot            = 0;
            mot_rerot_dt         = 0;
            mot_rerot_dtdt       = 0;
            mot_torque           = 0;
            mot_retorque         = 0;
            last_r3mot_rot       = 0;
            last_r3mot_rot_dt    = 0;
            last_r3relm_rot      = ChQuaternion.QUNIT;
            last_r3relm_rot_dt   = ChQuaternion.QNULL;
            last_r3time          = 0;
            keyed_polar_rotation = ChQuaternion.QNULL;
            impose_reducer       = false;
            mot_tau              = 1;
            mot_eta              = 1;
            mot_inertia          = 0;
            torque_react2        = 0;
            eng_mode             = eCh_eng_mode.ENG_MODE_ROTATION;
            learn     = false;
            rot_funct = new ChFunction_Const(0);
            spe_funct = new ChFunction_Const(0);
            tor_funct = new ChFunction_Const(0);
            torque_w  = new ChFunction_Const(1);

            rot_funct_x = new ChFunction_Const(0);
            rot_funct_y = new ChFunction_Const(0);

            // Mask: initialize our LinkMaskLF (lock formulation mask)
            // to E3 only.
            ChLinkMaskLF masklf = new ChLinkMaskLF();

            mask = masklf;
            ((ChLinkMaskLF)mask).SetLockMask(true, false, false, false, false, false, true);
            ChangedLinkMask();

            // Mask: initialize remaining LinkMaskLF (lock formulation mask) for the engine.
            // All shaft modes at least are setting the lock on E3 (z-rotation) coordinate.
            Set_shaft_mode(eCh_shaft_mode.ENG_SHAFT_LOCK);
        }
示例#2
0
 public ChLinkMaskLF(ChLinkMaskLF other) : base(other)
 {
 }