Mouse joint definition. This requires a world target point, tuning parameters, and the time step.
Inheritance: JointDef
コード例 #1
0
ファイル: MouseJoint.cs プロジェクト: prepare/gerich_box2dnet
        protected internal MouseJoint(IWorldPool argWorld, MouseJointDef def)
            : base(argWorld, def)
        {
            Debug.Assert(def.Target.Valid);
            Debug.Assert(def.MaxForce >= 0);
            Debug.Assert(def.FrequencyHz >= 0);
            Debug.Assert(def.DampingRatio >= 0);

            m_targetA.Set(def.Target);
            Transform.MulTransToOutUnsafe(BodyB.GetTransform(), m_targetA, m_localAnchorB);

            m_maxForce = def.MaxForce;
            m_impulse.SetZero();

            Frequency    = def.FrequencyHz;
            DampingRatio = def.DampingRatio;

            m_beta  = 0;
            m_gamma = 0;
        }
コード例 #2
0
ファイル: MouseJoint.cs プロジェクト: thdtjsdn/box2dnet
        protected internal MouseJoint(IWorldPool argWorld, MouseJointDef def)
            : base(argWorld, def)
        {
            Debug.Assert(def.target.Valid);
            Debug.Assert(def.maxForce >= 0);
            Debug.Assert(def.frequencyHz >= 0);
            Debug.Assert(def.dampingRatio >= 0);

            m_targetA.set_Renamed(def.target);
            Transform.mulTransToOutUnsafe(m_bodyB.getTransform(), m_targetA, m_localAnchorB);

            m_maxForce = def.maxForce;
            m_impulse.setZero();

            m_frequencyHz = def.frequencyHz;
            m_dampingRatio = def.dampingRatio;

            m_beta = 0;
            m_gamma = 0;
        }
コード例 #3
0
ファイル: MouseJoint.cs プロジェクト: gerich-home/box2dnet
        protected internal MouseJoint(IWorldPool argWorld, MouseJointDef def)
            : base(argWorld, def)
        {
            Debug.Assert(def.Target.Valid);
            Debug.Assert(def.MaxForce >= 0);
            Debug.Assert(def.FrequencyHz >= 0);
            Debug.Assert(def.DampingRatio >= 0);

            m_targetA.Set(def.Target);
            Transform.MulTransToOutUnsafe(BodyB.GetTransform(), m_targetA, m_localAnchorB);

            m_maxForce = def.MaxForce;
            m_impulse.SetZero();

            Frequency = def.FrequencyHz;
            DampingRatio = def.DampingRatio;

            m_beta = 0;
            m_gamma = 0;
        }