// Create a new point at (1,2,3) IPoint3D point1 = new Point3D(1, 2, 3); // Create another point at (4,5,6) IPoint3D point2 = new Point3D(4, 5, 6); // Calculate the distance between the two points double distance = point1.DistanceTo(point2);
// Create a new vector with components (1,2,3) IPoint3D vector1 = new Point3D(1, 2, 3); // Create another vector with components (4,5,6) IPoint3D vector2 = new Point3D(4, 5, 6); // Add the two vectors together IPoint3D sum = vector1 + vector2;These examples use the IPoint3D interface and Point3D class from the Microsoft.Xna.Framework package library.