Vector2f Structure |
Namespace: Rhino.Geometry
The Vector2f type exposes the following members.
Name | Description | |
---|---|---|
![]() | IsUnitVector |
Gets a value indicating whether or not this is a unit vector.
A unit vector has length 1.
|
![]() | IsValid |
Returns an indication regarding the validity of this vector.
|
![]() | IsZero |
Gets a value indicating whether the X, Y, and Z values are all equal to 0.0.
|
![]() | Length |
Computes the length (or magnitude, or size) of this vector.
This is an application of Pythagoras' theorem.
If this vector is invalid, its length is considered 0.
|
![]() | SquareLength |
Returns the square of the length of this vector.
This method does not check for the validity of its inputs.
|
![]() ![]() | Unset |
Gets the value of the vector with each component set to RhinoMath.UnsetValue.
|
![]() | X |
Gets or sets the X (first) component of this vector.
|
![]() ![]() | XAxis |
Gets the value of the vector with components 1,0.
|
![]() | Y |
Gets or sets the Y (second) component of this vector.
|
![]() ![]() | YAxis |
Gets the value of the vector with components 0,1.
|
![]() ![]() | Zero |
Gets the value of the vector with components 0,0.
|
Name | Description | |
---|---|---|
![]() ![]() | Add(Point2f, Vector2f) |
Sums up a point and a vector, and returns a new point.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise) |
![]() ![]() | Add(Vector2f, Vector2f) |
Sums up two vectors.
(Provided for languages that do not support operator overloading. You can use the + operator otherwise) |
![]() | CompareTo |
Compares this Vector2f with another Vector2f.
Components evaluation priority is first X, then Y. |
![]() | EpsilonEquals |
Check that all values in other are within epsilon of the values in this
|
![]() | Equals(Object) |
Determines whether the specified System.Object is a Vector2f and has the same values as the present vector.
(Overrides ValueTypeEquals(Object).) |
![]() | Equals(Vector2f) |
Determines whether the specified vector has the same values as the present vector.
|
![]() | GetHashCode |
Computes a hash number that represents the current vector.
(Overrides ValueTypeGetHashCode.) |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() ![]() | Multiply |
Multiplies two Vector2f together, returning the dot (internal) product of the two.
(Provided for languages that do not support operator overloading. You can use the * operator otherwise) |
![]() ![]() | Negate |
Computes the reversed vector.
(Provided for languages that do not support operator overloading. You can use the - unary operator otherwise) |
![]() | PerpendicularTo |
Sets this vector to be perpendicular to another vector.
Result is not unitized.
|
![]() | Reverse |
Reverses this vector in place (reverses the direction).
If this vector contains RhinoMath.UnsetValue, the reverse will also be invalid and false will be returned. |
![]() ![]() | Subtract |
Subtracts the second vector from the first one.
(Provided for languages that do not support operator overloading. You can use the - operator otherwise) |
![]() | ToString |
Constructs the string representation of the current vector.
(Overrides ValueTypeToString.) |
![]() | ToString(String, IFormatProvider) | Formats the value of the current instance using the specified format. |
![]() | Unitize |
Unitizes the vector in place. A unit vector has length 1 unit.
An invalid or zero length vector cannot be unitized. |
Name | Description | |
---|---|---|
![]() ![]() | Addition(Point2f, Vector2f) |
Sums up a point and a vector, and returns a new point.
|
![]() ![]() | Addition(Vector2f, Vector2f) |
Computes the sum between two vectors.
|
![]() ![]() | Equality |
Determines whether two vectors have equal values.
|
![]() ![]() | GreaterThan |
Determines whether the first specified vector comes after (has superior sorting value than) the second vector.
Components have decreasing evaluation priority: first X, then Y. |
![]() ![]() | GreaterThanOrEqual |
Determines whether the first specified vector comes after
(has superior sorting value than) the second vector, or it is equal to it.
Components have decreasing evaluation priority: first X, then Y. |
![]() ![]() | Inequality |
Determines whether two vectors have different values.
|
![]() ![]() | LessThan |
Determines whether the first specified vector comes before
(has inferior sorting value than) the second vector.
Components have decreasing evaluation priority: first X, then Y. |
![]() ![]() | LessThanOrEqual |
Determines whether the first specified vector comes before
(has inferior sorting value than) the second vector, or it is equal to it.
Components have decreasing evaluation priority: first X, then Y. |
![]() ![]() | Multiply |
Multiplies two Vector2f together, returning the dot (internal) product of the two.
|
![]() ![]() | Subtraction |
Computes the difference between two vectors.
|
![]() ![]() | UnaryNegation |
Computes the opposite vector.
|