[This is preliminary documentation and is subject to change.]
Defines a two component vector.
Namespace: Rage
Assembly: RagePluginHook (in RagePluginHook.dll) Version: 0.0.0.0 (0.56.1131.11510)
Syntax
The Vector2 type exposes the following members.
Constructors
Name | Description | |
---|---|---|
![]() | Vector2(Single) |
Initializes a new instance of the Vector2 class.
|
![]() | Vector2(Single, Single) |
Initializes a new instance of the Vector2 class.
|
Properties
Name | Description | |
---|---|---|
![]() | Item | |
![]() ![]() | SizeInBytes |
Gets the size of the Vector2 type, in bytes.
|
![]() ![]() | UnitX |
Gets the X unit Vector2 (1, 0).
|
![]() ![]() | UnitY |
Gets the Y unit Vector2 (0, 1).
|
![]() ![]() | Zero |
Gets a Vector2 with all of its components set to zero.
|
Methods
Name | Description | |
---|---|---|
![]() ![]() | Add(Vector2, Vector2) |
Adds two vectors.
|
![]() ![]() | Add(Vector2, Vector2, Vector2) |
Adds two vectors.
|
![]() ![]() | Barycentric(Vector2, Vector2, Vector2, Single, Single) |
Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 2D triangle.
|
![]() ![]() | Barycentric(Vector2, Vector2, Vector2, Single, Single, Vector2) |
Returns a Vector2 containing the 2D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 2D triangle.
|
![]() ![]() | CatmullRom(Vector2, Vector2, Vector2, Vector2, Single) |
Performs a Catmull-Rom interpolation using the specified positions.
|
![]() ![]() | CatmullRom(Vector2, Vector2, Vector2, Vector2, Single, Vector2) |
Performs a Catmull-Rom interpolation using the specified positions.
|
![]() ![]() | Clamp(Vector2, Vector2, Vector2) |
Restricts a value to be within a specified range.
|
![]() ![]() | Clamp(Vector2, Vector2, Vector2, Vector2) |
Restricts a value to be within a specified range.
|
![]() ![]() | Distance |
Calculates the distance between two vectors.
|
![]() ![]() | DistanceSquared |
Calculates the squared distance between two vectors.
|
![]() | DistanceTo | |
![]() ![]() | Divide(Vector2, Single) |
Scales a vector by the given value.
|
![]() ![]() | Divide(Vector2, Single, Vector2) |
Scales a vector by the given value.
|
![]() ![]() | Dot |
Calculates the dot product of two vectors.
|
![]() | Equals(Object) |
Returns a value that indicates whether the current instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).) |
![]() | Equals(Vector2) |
Returns a value that indicates whether the current instance is equal to the specified object.
|
![]() ![]() | Equals(Vector2, Vector2) |
Determines whether the specified object instances are considered equal.
|
![]() | GetHashCode |
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.) |
![]() ![]() | Hermite(Vector2, Vector2, Vector2, Vector2, Single) |
Performs a Hermite spline interpolation.
|
![]() ![]() | Hermite(Vector2, Vector2, Vector2, Vector2, Single, Vector2) |
Performs a Hermite spline interpolation.
|
![]() | Length |
Calculates the length of the vector.
|
![]() | LengthSquared |
Calculates the squared length of the vector.
|
![]() ![]() | Lerp(Vector2, Vector2, Single) |
Performs a linear interpolation between two vectors.
|
![]() ![]() | Lerp(Vector2, Vector2, Single, Vector2) |
Performs a linear interpolation between two vectors.
|
![]() ![]() | Maximize(Vector2, Vector2) |
Returns a vector containing the largest components of the specified vectors.
|
![]() ![]() | Maximize(Vector2, Vector2, Vector2) |
Returns a vector containing the smallest components of the specified vectors.
|
![]() ![]() | Minimize(Vector2, Vector2) |
Returns a vector containing the smallest components of the specified vectors.
|
![]() ![]() | Minimize(Vector2, Vector2, Vector2) |
Returns a vector containing the smallest components of the specified vectors.
|
![]() ![]() | Modulate(Vector2, Vector2) |
Modulates a vector by another.
|
![]() ![]() | Modulate(Vector2, Vector2, Vector2) |
Modulates a vector by another.
|
![]() ![]() | Multiply(Vector2, Single) |
Scales a vector by the given value.
|
![]() ![]() | Multiply(Vector2, Single, Vector2) |
Scales a vector by the given value.
|
![]() ![]() | Negate(Vector2) |
Reverses the direction of a given vector.
|
![]() ![]() | Negate(Vector2, Vector2) |
Reverses the direction of a given vector.
|
![]() | Normalize |
Converts the vector into a unit vector.
|
![]() ![]() | Normalize(Vector2) |
Converts the vector into a unit vector.
|
![]() ![]() | Normalize(Vector2, Vector2) |
Converts the vector into a unit vector.
|
![]() | ProjectOnTo | |
![]() ![]() | SmoothStep(Vector2, Vector2, Single) |
Performs a cubic interpolation between two vectors.
|
![]() ![]() | SmoothStep(Vector2, Vector2, Single, Vector2) |
Performs a cubic interpolation between two vectors.
|
![]() ![]() | Subtract(Vector2, Vector2) |
Subtracts two vectors.
|
![]() ![]() | Subtract(Vector2, Vector2, Vector2) |
Subtracts two vectors.
|
![]() | ToString |
Converts the value of the object to its equivalent string representation.
(Overrides ValueTypeToString.) |
![]() ![]() | Transform(Vector2, Matrix) |
Transforms a 2D vector by the given Matrix.
|
![]() ![]() | Transform(Vector2, Quaternion) |
Transforms a 2D vector by the given Quaternion rotation.
|
![]() ![]() | Transform(Vector2, Matrix) |
Transforms an array of 2D vectors by the given Matrix.
|
![]() ![]() | Transform(Vector2, Quaternion) |
Transforms an array of 2D vectors by the given Quaternion rotation.
|
![]() ![]() | Transform(Vector2, Matrix, Vector4) |
Transforms a 2D vector by the given Matrix.
|
![]() ![]() | Transform(Vector2, Quaternion, Vector4) |
Transforms a 2D vector by the given Quaternion rotation.
|
![]() ![]() | TransformCoordinate(Vector2, Matrix) |
Performs a coordinate transformation using the given Matrix.
|
![]() ![]() | TransformCoordinate(Vector2, Matrix) |
Performs a coordinate transformation using the given Matrix.
|
![]() ![]() | TransformCoordinate(Vector2, Matrix, Vector2) |
Performs a coordinate transformation using the given Matrix.
|
![]() ![]() | TransformNormal(Vector2, Matrix) |
Performs a normal transformation using the given Matrix.
|
![]() ![]() | TransformNormal(Vector2, Matrix) |
Performs a normal transformation using the given Matrix.
|
![]() ![]() | TransformNormal(Vector2, Matrix, Vector2) |
Performs a normal transformation using the given Matrix.
|
Operators
Name | Description | |
---|---|---|
![]() ![]() | Addition |
Adds two vectors.
|
![]() ![]() | Division |
Scales a vector by the given value.
|
![]() ![]() | Equality |
Tests for equality between two objects.
|
![]() ![]() | Inequality |
Tests for inequality between two objects.
|
![]() ![]() | Multiply(Single, Vector2) |
Scales a vector by the given value.
|
![]() ![]() | Multiply(Vector2, Single) |
Scales a vector by the given value.
|
![]() ![]() | Subtraction |
Subtracts two vectors.
|
![]() ![]() | UnaryNegation |
Reverses the direction of a given vector.
|
Fields
Name | Description | |
---|---|---|
![]() | X |
Gets or sets the X component of the vector.
|
![]() | Y |
Gets or sets the Y component of the vector.
|
See Also