Exemple #1
0
 /// <summary>
 /// Crosses the product.
 /// </summary>
 /// <param name="point">The point.</param>
 /// <returns>Point3D.</returns>
 public Point3D CrossProduct(Point3D point)
 {
     double[] matrix = VectorLibrary.CrossProduct(X, Y, Z, point.X, point.Y, point.Z);
     return(new Point3D(matrix[0], matrix[1], matrix[2]));
 }
Exemple #2
0
 /// <summary>
 /// Dots the product.
 /// </summary>
 /// <param name="point">The point.</param>
 /// <returns>System.Double.</returns>
 public double DotProduct(Point3D point)
 {
     return(VectorLibrary.DotProduct(X, Y, Z, point.X, point.Y, point.Z));
 }
Exemple #3
0
 /// <summary>
 /// Returns the angle [radians] between the two vectors.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns>System.Double.</returns>
 public double Angle(Vector vector)
 {
     return(VectorLibrary.Angle(this, vector));
 }
Exemple #4
0
 /// <summary>
 /// Returns the cross product/determinant of the points.
 /// x1*y2 - x2*y1
 /// </summary>
 /// <param name="point">The point.</param>
 /// <returns>System.Double.</returns>
 public double CrossProduct(Point point)
 {
     return(VectorLibrary.CrossProduct(X, Y, point.X, point.Y));
 }
Exemple #5
0
 /// <summary>
 /// Cross-product of two vectors.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns>System.Double.</returns>
 public double CrossProduct(Vector vector)
 {
     return(VectorLibrary.CrossProduct(Xcomponent, vector.Xcomponent, Ycomponent, vector.Ycomponent));
 }
Exemple #6
0
 /// <summary>
 /// Returns the angle [radians] of a vector from the origin axis (x, positive, +ccw).
 /// </summary>
 /// <returns>System.Double.</returns>
 public double Angle()
 {
     return(VectorLibrary.Angle(Ycomponent, Xcomponent));
 }
Exemple #7
0
 /// <summary>
 /// Returns a value indicating the concavity of the vectors.
 /// 1 = Pointing the same way.
 /// &gt; 0 = Concave.
 /// 0 = Orthogonal.
 /// &lt; 0 = Convex.
 /// -1 = Pointing the exact opposite way.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns>System.Double.</returns>
 public double ConcavityCollinearity(Vector vector)
 {
     return(VectorLibrary.ConcavityCollinearity(this, vector));
 }
Exemple #8
0
 /// <summary>
 /// True: The convex side of the vector is inside the shape.
 /// This is determined by the direction of the vector.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns><c>true</c> if XXXX, <c>false</c> otherwise.</returns>
 public bool IsConvexInside(Vector vector)
 {
     return(VectorLibrary.IsConvexInside(this, vector, Tolerance));
 }
Exemple #9
0
 /// <summary>
 /// True: Segments are parallel, on the same line, oriented in the opposite direction.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns><c>true</c> if [is collinear opposite direction] [the specified vector]; otherwise, <c>false</c>.</returns>
 public bool IsCollinearOppositeDirection(Vector vector)
 {
     return(VectorLibrary.IsCollinearOppositeDirection(this, vector, Tolerance));
 }
Exemple #10
0
 /// <summary>
 /// Vectors form a 90 degree angle.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns><c>true</c> if the specified vector is orthogonal; otherwise, <c>false</c>.</returns>
 public bool IsOrthogonal(Vector vector)
 {
     return(VectorLibrary.IsOrthogonal(this, vector, Tolerance));
 }
Exemple #11
0
 /// <summary>
 /// Vectors form a concave angle.
 /// </summary>
 /// <param name="vector">The vector.</param>
 /// <returns><c>true</c> if the specified vector is concave; otherwise, <c>false</c>.</returns>
 public bool IsConcave(Vector vector)
 {
     return(VectorLibrary.IsConcave(this, vector));
 }