本文整理匯總了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)