Example #1
0
        public virtual void Draw(b2Draw draw)
        {
            b2Color c = new b2Color(0.4f, 0.5f, 0.7f);

            for (int i = 0; i < m_count - 1; ++i)
            {
                draw.DrawSegment(m_ps[i], m_ps[i + 1], c);
            }
        }
Example #2
0
        public b2World(b2Vec2 gravity)
        {
            m_destructionListener = null;
            m_debugDraw = null;

            m_bodyList = null;
            m_jointList = null;

            m_bodyCount = 0;
            m_jointCount = 0;

            m_warmStarting = true;
            m_continuousPhysics = true;
            m_subStepping = false;

            m_stepComplete = true;

            m_allowSleep = true;
            m_gravity = gravity;

            m_flags = b2WorldFlags.e_clearForces;

            m_inv_dt0 = 0.0f;

            // setup up our default Contact Manager
            m_contactManager = new b2ContactManager();
        }
Example #3
0
 public void SetDebugDraw(b2Draw debugDraw)
 {
     m_debugDraw = debugDraw;
 }