~ubuntu-branches/ubuntu/wily/box2d/wily

« back to all changes in this revision

Viewing changes to Box2D/Testbed/Tests/Prismatic.h

  • Committer: Package Import Robot
  • Author(s): Markus Koschany
  • Date: 2014-05-30 18:42:02 UTC
  • mfrom: (1.1.2)
  • Revision ID: package-import@ubuntu.com-20140530184202-hosw11agojg02ac3
Tags: 2.3.1+ds-1
* Imported Upstream version 2.3.1+ds.
* Fix debian/watch to determine new releases by parsing
  the SVN tags of upstream's version control system.
* Update get-orig-source target for new release.
* dh_strip override: Replace $VER variable with 2.3.0 string.
* debian/copyright: Add new Public Domain and Apache 2.0 license.
* libbox2d-dev.install:
  - Install *.cmake files in /usr/lib/$(DEB_HOST_MULTIARCH)/cmake/Box2D.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
                }
69
69
        }
70
70
 
71
 
        void Keyboard(unsigned char key)
 
71
        void Keyboard(int key)
72
72
        {
73
73
                switch (key)
74
74
                {
75
 
                case 'l':
 
75
                case GLFW_KEY_L:
76
76
                        m_joint->EnableLimit(!m_joint->IsLimitEnabled());
77
77
                        break;
78
78
 
79
 
                case 'm':
 
79
                case GLFW_KEY_M:
80
80
                        m_joint->EnableMotor(!m_joint->IsMotorEnabled());
81
81
                        break;
82
82
 
83
 
                case 's':
 
83
                case GLFW_KEY_S:
84
84
                        m_joint->SetMotorSpeed(-m_joint->GetMotorSpeed());
85
85
                        break;
86
86
                }
89
89
        void Step(Settings* settings)
90
90
        {
91
91
                Test::Step(settings);
92
 
                m_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motors, (s) speed");
 
92
                g_debugDraw.DrawString(5, m_textLine, "Keys: (l) limits, (m) motors, (s) speed");
93
93
                m_textLine += DRAW_STRING_NEW_LINE;
94
94
                float32 force = m_joint->GetMotorForce(settings->hz);
95
 
                m_debugDraw.DrawString(5, m_textLine, "Motor Force = %4.0f", (float) force);
 
95
                g_debugDraw.DrawString(5, m_textLine, "Motor Force = %4.0f", (float) force);
96
96
                m_textLine += DRAW_STRING_NEW_LINE;
97
97
        }
98
98