本文整理汇总了C#中Loon.Core.Geom.Vector2f.AddLocal方法的典型用法代码示例。如果您正苦于以下问题:C# Vector2f.AddLocal方法的具体用法?C# Vector2f.AddLocal怎么用?C# Vector2f.AddLocal使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Loon.Core.Geom.Vector2f
的用法示例。
在下文中一共展示了Vector2f.AddLocal方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PDragJoint
public PDragJoint(PBody b_0, float px, float py) {
this.b = b_0;
dragPoint = new Vector2f(px, py);
localAnchor = new Vector2f(px - b_0.pos.x, py - b_0.pos.y);
b_0.mAng.Transpose().MulEqual(localAnchor);
anchor = b_0.mAng.Mul(localAnchor);
anchor.AddLocal(b_0.pos);
type = Physics.PJointType.DRAG_JOINT;
mass = new PTransformer();
}
示例2: PHingeJoint
public PHingeJoint(PBody b1_0, PBody b2_1, float rel1x, float rel1y,
float rel2x, float rel2y) {
this.b1 = b1_0;
this.b2 = b2_1;
localAngle = b2_1.ang - b1_0.ang;
localAnchor1 = new Vector2f(rel1x, rel1y);
localAnchor2 = new Vector2f(rel2x, rel2y);
b1_0.mAng.Transpose().MulEqual(localAnchor1);
b2_1.mAng.Transpose().MulEqual(localAnchor2);
anchor1 = b1_0.mAng.Mul(localAnchor1);
anchor1.AddLocal(b1_0.pos);
anchor2 = b2_1.mAng.Mul(localAnchor2);
anchor2.AddLocal(b2_1.pos);
type = Physics.PJointType.HINGE_JOINT;
mass = new PTransformer();
impulse = new Vector2f();
}