本文整理汇总了C#中IPoint.copy方法的典型用法代码示例。如果您正苦于以下问题:C# IPoint.copy方法的具体用法?C# IPoint.copy怎么用?C# IPoint.copy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IPoint
的用法示例。
在下文中一共展示了IPoint.copy方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: createTileArray
public static Tile[,] createTileArray(IPoint leftBottomCorner, int width, int height, Common.planeOrientation orientation,
float[] color, double tileSize)
{
Tile[,] newTiles = new Tile[width, height];
IPoint currentTileOrigin = leftBottomCorner.copy(), currentTileEnd;
#region CREATE_TILES_FOR_WALL
switch (orientation)
{
case Common.planeOrientation.X: //Perpendicular to X axis
{
currentTileEnd = new pointObj(currentTileOrigin.X,
currentTileOrigin.Y + tileSize, currentTileOrigin.Z + tileSize);
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
currentTileOrigin.Z = currentTileOrigin.Z + tileSize;
currentTileEnd.Z = currentTileEnd.Z + tileSize;
newTiles[i, j] = new Tile(currentTileOrigin, currentTileEnd) { MyColor = color, MyOutlineColor = Common.colorBlack, TileSize = tileSize };
}
currentTileOrigin.Y = currentTileOrigin.Y + tileSize;
currentTileEnd.Y = currentTileEnd.Y + tileSize;
currentTileOrigin.Z = leftBottomCorner.Z;
currentTileEnd.Z = currentTileOrigin.Z + tileSize;
}
break;
}
case Common.planeOrientation.Y: //Perpendicular to Y axis
{
currentTileEnd = new pointObj(currentTileOrigin.X + tileSize,
currentTileOrigin.Y, currentTileOrigin.Z + tileSize);
for (int i = 0; i < height; i++)
{
for (int j = 0; j < width; j++)
{
currentTileOrigin.X = currentTileOrigin.X + tileSize;
currentTileEnd.X = currentTileEnd.X + tileSize;
newTiles[i, j] = new Tile(currentTileOrigin, currentTileEnd) { MyColor = color, MyOutlineColor = Common.colorBlack, TileSize = tileSize };
}
currentTileOrigin.Z = currentTileOrigin.Z + tileSize;
currentTileEnd.Z = currentTileEnd.Z + tileSize;
currentTileOrigin.X = leftBottomCorner.X;
currentTileEnd.X = currentTileOrigin.X + tileSize;
}
break;
}
case Common.planeOrientation.Z: //Perpendicular to Z axis
{
currentTileEnd = new pointObj(currentTileOrigin.X + tileSize,
currentTileOrigin.Y + tileSize, currentTileOrigin.Z);
for (int i = 0; i < width; i++)
{
for (int j = 0; j < height; j++)
{
newTiles[i, j] = new Tile(currentTileOrigin, currentTileEnd) { MyColor = color, MyOutlineColor = Common.colorBlack, TileSize = tileSize };
currentTileOrigin.X = currentTileOrigin.X + tileSize;
currentTileEnd.X = currentTileEnd.X + tileSize;
}
currentTileOrigin.Y = currentTileOrigin.Y + tileSize;
currentTileEnd.Y = currentTileEnd.Y + tileSize;
currentTileOrigin.X = leftBottomCorner.X;
currentTileEnd.X = currentTileOrigin.X + tileSize;
}
break;
}
}
#endregion
return newTiles;
}