本文整理汇总了C#中Path.AddPointToSequence方法的典型用法代码示例。如果您正苦于以下问题:C# Path.AddPointToSequence方法的具体用法?C# Path.AddPointToSequence怎么用?C# Path.AddPointToSequence使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Path
的用法示例。
在下文中一共展示了Path.AddPointToSequence方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: PathLoad
static public List<Path> PathLoad()
{
string line;
Path sequence = new Path();
List<Path> paths = new List<Path>();
Point3D point = new Point3D();
StreamReader reader = new StreamReader(@".../.../loadpath.txt");
using (reader)
{
while ((line = reader.ReadLine()) != null)
{
if (line != "-")
{
string[] chars = line.Split(',');
point.X = double.Parse(chars[0]);
point.Y = double.Parse(chars[1]);
point.Z = double.Parse(chars[2]);
sequence.AddPointToSequence(point);
}
else
{
paths.Add(sequence);
}
}
return paths;
}
}
示例2: Main
static void Main()
{
Point3D point1 = new Point3D(2, 3, 8);
Console.WriteLine(point1);
Console.WriteLine(Point3D.Point0);
double distance = TwoPointsDistance.CalcTwoPointsDistance(new Point3D(-7,5,2), new Point3D(5,-12,6));
Console.WriteLine(distance);
Path sequence = new Path();
sequence.AddPointToSequence(point1);
List<Path> paths = PathStorage.PathLoad();
foreach (var item in paths)
{
PathStorage.PathSave(item);
}
}