本文整理汇总了C#中FarseerPhysics.Dynamics.Fixture.TestPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Fixture.TestPoint方法的具体用法?C# Fixture.TestPoint怎么用?C# Fixture.TestPoint使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FarseerPhysics.Dynamics.Fixture
的用法示例。
在下文中一共展示了Fixture.TestPoint方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestPointCallback
private bool TestPointCallback(Fixture fixture)
{
bool inside = fixture.TestPoint(ref _point1);
if (inside)
{
_myFixture = fixture;
return false;
}
// Continue the query.
return true;
}
示例2: TestPointAllCallback
private bool TestPointAllCallback(Fixture fixture)
{
bool inside = fixture.TestPoint(ref _point2);
if (inside)
_testPointAllFixtures.Add(fixture);
// Continue the query.
return true;
}
示例3: transferJoints
private static void transferJoints(Body oldBody, List<Joint> joints, Body lb, Fixture glommed)
{
if (oldBody == lb) return;
for (int i = joints.Count - 1; i >= 0; i--)
{
Joint j = joints[i];
if (j.BodyA == oldBody)
{
Vector2 testPoint = new Vector2(j.WorldAnchorA.X, j.WorldAnchorA.Y);
if (glommed == null || glommed.TestPoint(ref testPoint))
{
oldBody.JointList.Remove(j);
j.BodyA = lb;
lb.JointList.Add(j);
//joints.RemoveAt(i);
}
}
else
{
Vector2 testPoint = new Vector2(j.WorldAnchorB.X, j.WorldAnchorB.Y);
if (glommed == null || glommed.TestPoint(ref testPoint))
{
oldBody.JointList.Remove(j);
j.BodyB = lb;
lb.JointList.Add(j);
//joints.RemoveAt(i);
}
}
}
}