当前位置: 首页>>代码示例>>C#>>正文


C# b2Vec2.NegUnitCross方法代码示例

本文整理汇总了C#中Box2D.Common.b2Vec2.NegUnitCross方法的典型用法代码示例。如果您正苦于以下问题:C# b2Vec2.NegUnitCross方法的具体用法?C# b2Vec2.NegUnitCross怎么用?C# b2Vec2.NegUnitCross使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Box2D.Common.b2Vec2的用法示例。


在下文中一共展示了b2Vec2.NegUnitCross方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: b2PrismaticJoint

        public b2PrismaticJoint(b2PrismaticJointDef def)
            : base(def)
        {
            m_localAnchorA = def.localAnchorA;
            m_localAnchorB = def.localAnchorB;
            m_localXAxisA = def.localAxisA;
            m_localXAxisA.Normalize();
            m_localYAxisA = m_localXAxisA.NegUnitCross(); //  b2Math.b2Cross(1.0f, m_localXAxisA);
            m_referenceAngle = def.referenceAngle;

            m_impulse.SetZero();
            m_motorMass = 0.0f;
            m_motorImpulse = 0.0f;

            m_lowerTranslation = def.lowerTranslation;
            m_upperTranslation = def.upperTranslation;
            m_maxMotorForce = def.maxMotorForce;
            m_motorSpeed = def.motorSpeed;
            m_enableLimit = def.enableLimit;
            m_enableMotor = def.enableMotor;
            m_limitState = b2LimitState.e_inactiveLimit;

            m_axis.SetZero();
            m_perp.SetZero();
        }
开发者ID:p07r0457,项目名称:cocos2d-xna,代码行数:25,代码来源:b2PrismaticJoint.cs

示例2: b2WheelJoint

        public b2WheelJoint(b2WheelJointDef def)
            : base(def)
        {
            m_localAnchorA = def.localAnchorA;
            m_localAnchorB = def.localAnchorB;
            m_localXAxisA = def.localAxisA;
            m_localYAxisA = m_localXAxisA.NegUnitCross();
//            m_localYAxisA = b2Math.b2Cross(1.0f, m_localXAxisA);

            m_mass = 0.0f;
            m_impulse = 0.0f;
            m_motorMass = 0.0f;
            m_motorImpulse = 0.0f;
            m_springMass = 0.0f;
            m_springImpulse = 0.0f;

            m_maxMotorTorque = def.maxMotorTorque;
            m_motorSpeed = def.motorSpeed;
            m_enableMotor = def.enableMotor;

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

            m_bias = 0.0f;
            m_gamma = 0.0f;

            m_ax.SetZero();
            m_ay.SetZero();
        }
开发者ID:Ratel13,项目名称:cocos2d-xna,代码行数:29,代码来源:b2WheelJoint.cs


注:本文中的Box2D.Common.b2Vec2.NegUnitCross方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。