本文整理汇总了C#中Corner.GetPoint方法的典型用法代码示例。如果您正苦于以下问题:C# Corner.GetPoint方法的具体用法?C# Corner.GetPoint怎么用?C# Corner.GetPoint使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Corner
的用法示例。
在下文中一共展示了Corner.GetPoint方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FloatConstructor
public void FloatConstructor(float x, float y)
{
//Arrange
//Act
Corner corner = new Corner(1, x, y);
//Assert
Assert.IsNotNull(corner);
Assert.IsInstanceOf(typeof(Corner), corner);
Assert.AreEqual(1, corner.GetID());
Assert.AreEqual(x, corner.GetPoint().X);
Assert.AreEqual(y, corner.GetPoint().Y);
}
示例2: GetOutline
/**
* This method is a recurisve method to find the outline of a room through connecting corners.
* The output can be found in the points param.
*/
private void GetOutline(List<PointF> points, Corner corner, List<Wall> excludes = null)
{
if(excludes == null) excludes = new List<Wall>();
points.Add(corner.GetPoint());
foreach(Wall wall in corner.GetWalls()) {
Corner nextCorner = (wall.Left == corner ? wall.Right : wall.Left);
if(!excludes.Contains(wall) && this._corners.Contains(nextCorner)) {
excludes.Add(wall);
GetOutline(points, nextCorner, excludes);
}
}
}