本文整理匯總了C#中Server.Point3D.SetAll方法的典型用法代碼示例。如果您正苦於以下問題:C# Point3D.SetAll方法的具體用法?C# Point3D.SetAll怎麽用?C# Point3D.SetAll使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Server.Point3D
的用法示例。
在下文中一共展示了Point3D.SetAll方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: GetLine3D
/// <summary>
/// Gets a Point3D collection representing all locations between 'start' and 'end', including 'start' and 'end', on the given 'map'.
/// </summary>
public static Point3D[] GetLine3D(this IPoint3D start, IPoint3D end, Map map, bool avgZ = true)
{
var path2d = GetLine2D(start, end, map);
var path3d = new Point3D[path2d.Length];
if (avgZ)
{
path3d.SetAll(i => path2d[i].ToPoint3D(map.GetAverageZ(path2d[i].X, path2d[i].Y)));
}
else
{
path3d.SetAll(i => path2d[i].ToPoint3D(start.Z + (int)Math.Floor((end.Z - start.Z) * (i / (double)path2d.Length))));
}
return path3d;
}