Pulley joint definition. This requires two ground anchors, two dynamic body anchor points, and a pulley ratio.
Inheritance: JointDef
Esempio n. 1
0
        /// <param name="argWorldPool"></param>
        /// <param name="def"></param>
        public PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def)
            : base(argWorldPool, def)
        {
            m_groundAnchorA.set_Renamed(def.groundAnchorA);
            m_groundAnchorB.set_Renamed(def.groundAnchorB);
            m_localAnchorA.set_Renamed(def.localAnchorA);
            m_localAnchorB.set_Renamed(def.localAnchorB);

            Debug.Assert(def.ratio != 0.0f);
            m_ratio = def.ratio;

            m_lengthA = def.lengthA;
            m_LengthB = def.lengthB;

            m_constant = def.lengthA + m_ratio * def.lengthB;
            m_impulse = 0.0f;
        }
Esempio n. 2
0
        /// <param name="argWorldPool"></param>
        /// <param name="def"></param>
        public PulleyJoint(IWorldPool argWorldPool, PulleyJointDef def)
            : base(argWorldPool, def)
        {
            m_groundAnchorA.Set(def.GroundAnchorA);
            m_groundAnchorB.Set(def.GroundAnchorB);
            LocalAnchorA.Set(def.LocalAnchorA);
            LocalAnchorB.Set(def.LocalAnchorB);

            Debug.Assert(def.Ratio != 0.0f);
            m_ratio = def.Ratio;

            m_lengthA = def.LengthA;
            m_LengthB = def.LengthB;

            m_constant = def.LengthA + m_ratio * def.LengthB;
            m_impulse  = 0.0f;
        }