示例#1
0
        public override void OnRender()
        {
            DrawString("Keys: F toggle friction, M toggle motor");
            var torque = _joint1.GetMotorTorque(1 / TestSettings.Dt);

            DrawString($"Motor Torque = {torque}");
            DrawString($"Friction: {_joint2.IsMotorEnabled()}");
            DrawString($"Motor: {_joint1.IsMotorEnabled()}");
        }
示例#2
0
        public override void Update(GameSettings settings, GameTime gameTime)
        {
            base.Update(settings, gameTime);
            DrawString("Keys: (f) toggle friction, (m) toggle motor");

            float torque = _joint1.GetMotorTorque(settings.Hz);

            DrawString("Motor Torque = " + torque);
        }
示例#3
0
        /// <inheritdoc />
        protected override void PreLateUpdate()
        {
            DrawString("Keys: F toggle friction, M toggle motor");
            var torque = _joint1.GetMotorTorque(TestSettings.Frequency);

            DrawString($"Motor Torque = {torque}");
            DrawString($"Friction: {_joint2.IsMotorEnabled()}");
            DrawString($"Motor: {_joint1.IsMotorEnabled()}");
        }
示例#4
0
        public override void Update(FarseerPhysicsGameSettings settings)
        {
            base.Update(settings);
            DrawString("Keys: (f) toggle friction, (m) toggle motor");

            double torque = _joint1.GetMotorTorque(settings.Hz);

            DrawString("Motor Torque = " + torque);
        }
示例#5
0
        public override void Step(Framework.Settings settings)
        {
            base.Step(settings);
            _debugDraw.DrawString(50, _textLine, "Keys: (f) toggle friction, (m) toggle motor");
            _textLine += 15;
            double torque = _joint1.GetMotorTorque();

            _debugDraw.DrawString(50, _textLine, "Motor Torque = {0:n}", (double)torque);
            _textLine += 15;
        }
示例#6
0
        public override void Update(GameSettings settings, GameTime gameTime)
        {
            base.Update(settings, gameTime);
            DebugView.DrawString(50, TextLine, "Keys: (f) toggle friction, (m) toggle motor");
            TextLine += 15;
            float torque = _joint1.GetMotorTorque(settings.Hz);

            DebugView.DrawString(50, TextLine, "Motor Torque = {0:n}", torque);
            TextLine += 15;
        }
示例#7
0
        /// <inheritdoc />
        protected override void PreStep()
        {
            var torque1 = Joint1.GetMotorTorque(TestSettings.Hertz);

            DrawString($"Motor Torque 1= {torque1}");

            var torque2 = Joint2.GetMotorTorque(TestSettings.Hertz);

            DrawString($"Motor Torque 2= {torque2}");
        }
        //void UpdateUI()
        //{
        //	ImGui::SetNextWindowPos(ImVec2(10.0f, 100.0f));
        //	ImGui::SetNextWindowSize(ImVec2(200.0f, 100.0f));
        //	ImGui::Begin("Joint Controls", nullptr, ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoResize);

        //	if (ImGui::Checkbox("Limit", _enableLimit))
        //	{
        //		_joint1.EnableLimit(_enableLimit);
        //	}

        //	if (ImGui::Checkbox("Motor", _enableMotor))
        //	{
        //		_joint1.EnableMotor(_enableMotor);
        //	}

        //	if (ImGui::SliderFloat("Speed", _motorSpeed, -20.0f, 20.0f, "%.0f"))
        //	{
        //		_joint1.SetMotorSpeed(_motorSpeed);
        //	}

        //	ImGui::End();
        //}

        public override void Update(GameSettings settings, GameTime gameTime)
        {
            base.Update(settings, gameTime);

            float torque1 = _joint1.GetMotorTorque(settings.Hz);

            DrawString("Motor Torque 1= " + torque1);

            float torque2 = _joint2.GetMotorTorque(settings.Hz);

            DrawString("Motor Torque 2= " + torque2);
        }