本文整理汇总了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();
}
示例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();
}