VectorExtensionMethods
Extension methods for Eto.Drawing.SizeF, Vector2d and Vector3d.
Methods
Compute the clockwise and anti-clockwise angles between two vectors.
Measure the angle from the plane x-axis to the projection of the xyz point.
Compute the average of a collection of points.
Returns: Average point.
Compute the average of a collection of points.
Returns: Average point.
Gets the parameter on a semi-finite ray which best approximates a 3D point.
Create a vector perpendicular to the input vector using custom primary and secondary axes. The length of the perpendicular vector will be identical to the length of the secondary axis, not the input vector.
Create a vector perpendicular to the input vector using default primary and secondary axes. The length of the perpendicular vector will be 1.0
Gets the smallest distance from a semi-finite ray to a 3D point.
Attempt to find a field scalar value along a finite line segment using binary-like searching.
Returns: True if the target magnitude was found on the axis interior, false if otherwise.
Flip a vector if the flipped direction better aligns with a guide vector.
Returns: Flipped vector (or not).
Flip a vector if the flipped direction better aligns with a guide vector.
Returns: Flipped vector (or not).
Intersect a plane with a finite line segment.
Returns: True if intersection happened.
Test whether a matrix has a specific size.
Returns: True if matrix is this exact size.
Test whether a matrix has a specific size.
Returns: True if matrix is this exact size.
Get the domain on a line segment which perpendicularly spans an entire box.
Get the domain on a line segment which perpendicularly spans an entire box.
Get the domain on a line segment which perpendicularly spans an entire box.
Get the domain on a line segment which perpendicularly spans an entire box.
Evaluate the plane at a given coordinate.
Evaluate the plane at a given coordinate.
Rewrite a point in world coordinates in two-dimensional uv coordinates.
Returns: Point in plane UV coordinates.
Rewrite a point in world coordinates in two-dimensional uv coordinates.
Returns: Point in plane UV coordinates.
Perform slerp interpolation on two vectors.
Convert a SizeF into a Point2d.
Returns: Vector.
Convert a Vector3d into a Vector2d.
Returns: Vector.
Convert a SizeF into a Vector3d.
Returns: Vector.
Convert a Vector2d into a Vector3d.
Returns: Vector.
Convert a Vector3d into a Vector2d.
Returns: Vector.
Convert a column or row matrix with two cells into a complex number.
Returns: Complex number.
Convert a RhinoCommon matrix into a MathNet matrix.
public static Matrix ToMathNetMatrix()
this Matrix
matrix
Convert a column or row matrix with three cells into a point.
Returns: Point.
Convert a MathNet matrix into a RhinoCommon matrix.
Convert a SizeF into a Size.
public static Size ToSize()
this SizeF
point
Size to convert.
Returns: Size.
Convert a Vector2d to a SizeF.
Returns: XY projection of vector.
Convert a Vector3d to a SizeF.
Returns: XY projection of vector.
Convert a 3×3, or 4×3, or 4×4 matrix into a transformation.
Returns: Transformation.
Convert a column or row matrix with three cells into a vector.
Returns: Vector.
Transform a vector spatially. This is needed when transforming vectors using shear or taper matrices. This method differs from the standard Vector3d.Transform method in that it retains perpendicularity through taper and shear deformations. This method does not guarantee that the magnitude of the result is anywhere near correct, it is only concerned with the direction.
Returns: Transformed vector.