Vector2 Structure

RAGE Plugin Hook Documentation

[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

[SerializableAttribute]
public struct Vector2 : IEquatable<Vector2>

The Vector2 type exposes the following members.

Constructors

  NameDescription
Public methodVector2(Single)
Initializes a new instance of the Vector2 class.
Public methodVector2(Single, Single)
Initializes a new instance of the Vector2 class.
Top
Properties

  NameDescription
Public propertyItem
Public propertyStatic memberSizeInBytes
Gets the size of the Vector2 type, in bytes.
Public propertyStatic memberUnitX
Gets the X unit Vector2 (1, 0).
Public propertyStatic memberUnitY
Gets the Y unit Vector2 (0, 1).
Public propertyStatic memberZero
Gets a Vector2 with all of its components set to zero.
Top
Methods

  NameDescription
Public methodStatic memberAdd(Vector2, Vector2)
Adds two vectors.
Public methodStatic memberAdd(Vector2, Vector2, Vector2)
Adds two vectors.
Public methodStatic memberBarycentric(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.
Public methodStatic memberBarycentric(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.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Single)
Performs a Catmull-Rom interpolation using the specified positions.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Single, Vector2)
Performs a Catmull-Rom interpolation using the specified positions.
Public methodStatic memberClamp(Vector2, Vector2, Vector2)
Restricts a value to be within a specified range.
Public methodStatic memberClamp(Vector2, Vector2, Vector2, Vector2)
Restricts a value to be within a specified range.
Public methodStatic memberDistance
Calculates the distance between two vectors.
Public methodStatic memberDistanceSquared
Calculates the squared distance between two vectors.
Public methodDistanceTo
Public methodStatic memberDivide(Vector2, Single)
Scales a vector by the given value.
Public methodStatic memberDivide(Vector2, Single, Vector2)
Scales a vector by the given value.
Public methodStatic memberDot
Calculates the dot product of two vectors.
Public methodEquals(Object)
Returns a value that indicates whether the current instance is equal to a specified object.
(Overrides ValueTypeEquals(Object).)
Public methodEquals(Vector2)
Returns a value that indicates whether the current instance is equal to the specified object.
Public methodStatic memberEquals(Vector2, Vector2)
Determines whether the specified object instances are considered equal.
Public methodGetHashCode
Returns the hash code for this instance.
(Overrides ValueTypeGetHashCode.)
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Single)
Performs a Hermite spline interpolation.
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Single, Vector2)
Performs a Hermite spline interpolation.
Public methodLength
Calculates the length of the vector.
Public methodLengthSquared
Calculates the squared length of the vector.
Public methodStatic memberLerp(Vector2, Vector2, Single)
Performs a linear interpolation between two vectors.
Public methodStatic memberLerp(Vector2, Vector2, Single, Vector2)
Performs a linear interpolation between two vectors.
Public methodStatic memberMaximize(Vector2, Vector2)
Returns a vector containing the largest components of the specified vectors.
Public methodStatic memberMaximize(Vector2, Vector2, Vector2)
Returns a vector containing the smallest components of the specified vectors.
Public methodStatic memberMinimize(Vector2, Vector2)
Returns a vector containing the smallest components of the specified vectors.
Public methodStatic memberMinimize(Vector2, Vector2, Vector2)
Returns a vector containing the smallest components of the specified vectors.
Public methodStatic memberModulate(Vector2, Vector2)
Modulates a vector by another.
Public methodStatic memberModulate(Vector2, Vector2, Vector2)
Modulates a vector by another.
Public methodStatic memberMultiply(Vector2, Single)
Scales a vector by the given value.
Public methodStatic memberMultiply(Vector2, Single, Vector2)
Scales a vector by the given value.
Public methodStatic memberNegate(Vector2)
Reverses the direction of a given vector.
Public methodStatic memberNegate(Vector2, Vector2)
Reverses the direction of a given vector.
Public methodNormalize
Converts the vector into a unit vector.
Public methodStatic memberNormalize(Vector2)
Converts the vector into a unit vector.
Public methodStatic memberNormalize(Vector2, Vector2)
Converts the vector into a unit vector.
Public methodProjectOnTo
Public methodStatic memberSmoothStep(Vector2, Vector2, Single)
Performs a cubic interpolation between two vectors.
Public methodStatic memberSmoothStep(Vector2, Vector2, Single, Vector2)
Performs a cubic interpolation between two vectors.
Public methodStatic memberSubtract(Vector2, Vector2)
Subtracts two vectors.
Public methodStatic memberSubtract(Vector2, Vector2, Vector2)
Subtracts two vectors.
Public methodToString
Converts the value of the object to its equivalent string representation.
(Overrides ValueTypeToString.)
Public methodStatic memberTransform(Vector2, Matrix)
Transforms a 2D vector by the given Matrix.
Public methodStatic memberTransform(Vector2, Quaternion)
Transforms a 2D vector by the given Quaternion rotation.
Public methodStatic memberTransform(Vector2, Matrix)
Transforms an array of 2D vectors by the given Matrix.
Public methodStatic memberTransform(Vector2, Quaternion)
Transforms an array of 2D vectors by the given Quaternion rotation.
Public methodStatic memberTransform(Vector2, Matrix, Vector4)
Transforms a 2D vector by the given Matrix.
Public methodStatic memberTransform(Vector2, Quaternion, Vector4)
Transforms a 2D vector by the given Quaternion rotation.
Public methodStatic memberTransformCoordinate(Vector2, Matrix)
Performs a coordinate transformation using the given Matrix.
Public methodStatic memberTransformCoordinate(Vector2, Matrix)
Performs a coordinate transformation using the given Matrix.
Public methodStatic memberTransformCoordinate(Vector2, Matrix, Vector2)
Performs a coordinate transformation using the given Matrix.
Public methodStatic memberTransformNormal(Vector2, Matrix)
Performs a normal transformation using the given Matrix.
Public methodStatic memberTransformNormal(Vector2, Matrix)
Performs a normal transformation using the given Matrix.
Public methodStatic memberTransformNormal(Vector2, Matrix, Vector2)
Performs a normal transformation using the given Matrix.
Top
Operators

  NameDescription
Public operatorStatic memberAddition
Adds two vectors.
Public operatorStatic memberDivision
Scales a vector by the given value.
Public operatorStatic memberEquality
Tests for equality between two objects.
Public operatorStatic memberInequality
Tests for inequality between two objects.
Public operatorStatic memberMultiply(Single, Vector2)
Scales a vector by the given value.
Public operatorStatic memberMultiply(Vector2, Single)
Scales a vector by the given value.
Public operatorStatic memberSubtraction
Subtracts two vectors.
Public operatorStatic memberUnaryNegation
Reverses the direction of a given vector.
Top
Fields

  NameDescription
Public fieldX
Gets or sets the X component of the vector.
Public fieldY
Gets or sets the Y component of the vector.
Top
See Also

Reference