本文整理汇总了C#中SharpDX.Intersects方法的典型用法代码示例。如果您正苦于以下问题:C# SharpDX.Intersects方法的具体用法?C# SharpDX.Intersects怎么用?C# SharpDX.Intersects使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SharpDX
的用法示例。
在下文中一共展示了SharpDX.Intersects方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Intersects
public bool Intersects(SharpDX.RectangleF rect)
{
var testRect = new SharpDX.RectangleF(Owner.Transform.Translation.X - OriginX, Owner.Transform.Translation.Y - OriginY, BaseWidth, BaseHeight);
bool contains = false;
rect.Contains(ref testRect, out contains);
bool intersects = rect.Intersects(testRect);
return contains || intersects;
}
示例2: Test
public static bool Test(SharpDX.Plane plane, Vector3 a, Vector3 b, Vector3 c)
{
var p1 = plane.Intersects(ref a);
var p2 = plane.Intersects(ref b);
var p3 = plane.Intersects(ref c);
// if all three points are on same side and none of them are on the plane then there is no intersection
return !(p1 == p2 && p2 == p3 && p1 != PlaneIntersectionType.Intersecting);
}