本文整理汇总了C#中System.Windows.Media.Media3D.Point3D结构体的典型用法代码示例。如果您正苦于以下问题:C# Point3D结构体的具体用法?C# Point3D怎么用?C# Point3D使用的例子?那么恭喜您, 这里精选的结构体代码示例或许可以为您提供帮助。
Point3D结构体属于System.Windows.Media.Media3D命名空间,在下文中一共展示了Point3D结构体的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Point3D
// instantiate variables
Point3D point1 = new Point3D();
Point3D point2 = new Point3D(15, 40, 60);
Vector3D vector1 = new Vector3D(20, 30, 40);
Point3D pointResult1 = new Point3D();
Point3D pointResult2 = new Point3D();
Vector3D vectorResult1 = new Vector3D();
Vector3D vectorResult2 = new Vector3D();
// defining x,y,z of point1
point1.X = 10;
point1.Y = 5;
point1.Z = 1;
vectorResult1 = Point3D.Subtract(point1, point2);
// vectorResult1 is equal to (-5, -35, -59)
vectorResult2 = point2 - point1;
// vectorResult2 is equal to (5, 35, 59)
pointResult1 = Point3D.Subtract(point1, vector1);
// pointResult1 is equal to (-10, -25, -39)
pointResult2 = vector1 - point1;
// pointResult2 is equal to (10, 25, 39)