Vector2

struct Vector2 : System.ValueType, System.IEquatable<Vector2>

Describes a 2D-vector.

float X

The x coordinate of this T:Microsoft.Xna.Framework.Vector2.

float Y

The y coordinate of this T:Microsoft.Xna.Framework.Vector2.

readonly Vector2 Zero

Returns a T:Microsoft.Xna.Framework.Vector2 with components 0, 0.

readonly Vector2 One

Returns a T:Microsoft.Xna.Framework.Vector2 with components 1, 1.

readonly Vector2 UnitX

Returns a T:Microsoft.Xna.Framework.Vector2 with components 1, 0.

readonly Vector2 UnitY

Returns a T:Microsoft.Xna.Framework.Vector2 with components 0, 1.

string get_DebugDisplayString()
Vector2 op_UnaryNegation(Vector2 value)

Inverts values in the specified T:Microsoft.Xna.Framework.Vector2.

Parameters:
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the right of the sub sign.
Returns:

Result of the inversion.

Vector2 op_Addition(Vector2 value1, Vector2 value2)

Adds two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the add sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the right of the add sign.
Returns:

Sum of the vectors.

Vector2 op_Subtraction(Vector2 value1, Vector2 value2)

Subtracts a T:Microsoft.Xna.Framework.Vector2 from a T:Microsoft.Xna.Framework.Vector2.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the sub sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the right of the sub sign.
Returns:

Result of the vector subtraction.

Vector2 op_Multiply(Vector2 value1, Vector2 value2)

Multiplies the components of two vectors by each other.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the mul sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the right of the mul sign.
Returns:

Result of the vector multiplication.

Vector2 op_Multiply(Vector2 value, float scaleFactor)

Multiplies the components of vector by a scalar.

Parameters:
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the mul sign.
  • scaleFactor (float) – Scalar value on the right of the mul sign.
Returns:

Result of the vector multiplication with a scalar.

Vector2 op_Multiply(float scaleFactor, Vector2 value)

Multiplies the components of vector by a scalar.

Parameters:
  • scaleFactor (float) – Scalar value on the left of the mul sign.
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the right of the mul sign.
Returns:

Result of the vector multiplication with a scalar.

Vector2 op_Division(Vector2 value1, Vector2 value2)

Divides the components of a T:Microsoft.Xna.Framework.Vector2 by the components of another T:Microsoft.Xna.Framework.Vector2.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the div sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – Divisor T:Microsoft.Xna.Framework.Vector2 on the right of the div sign.
Returns:

The result of dividing the vectors.

Vector2 op_Division(Vector2 value1, float divider)

Divides the components of a T:Microsoft.Xna.Framework.Vector2 by a scalar.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 on the left of the div sign.
  • divider (float) – Divisor scalar on the right of the div sign.
Returns:

The result of dividing a vector by a scalar.

bool op_Equality(Vector2 value1, Vector2 value2)

Compares whether two T:Microsoft.Xna.Framework.Vector2 instances are equal.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – T:Microsoft.Xna.Framework.Vector2 instance on the left of the equal sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – T:Microsoft.Xna.Framework.Vector2 instance on the right of the equal sign.
Returns:

true if the instances are equal; false otherwise.

bool op_Inequality(Vector2 value1, Vector2 value2)

Compares whether two T:Microsoft.Xna.Framework.Vector2 instances are not equal.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – T:Microsoft.Xna.Framework.Vector2 instance on the left of the not equal sign.
  • value2 (Microsoft.Xna.Framework.Vector2) – T:Microsoft.Xna.Framework.Vector2 instance on the right of the not equal sign.
Returns:

true if the instances are not equal; false otherwise.

Vector2 Add(Vector2 value1, Vector2 value2)

Performs vector addition on and .

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector to add.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector to add.
Returns:

The result of the vector addition.

void Add(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Barycentric(Vector2 value1, Vector2 value2, Vector2 value3, float amount1, float amount2)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector of 2d-triangle.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector of 2d-triangle.
  • value3 (Microsoft.Xna.Framework.Vector2) – The third vector of 2d-triangle.
  • amount1 (float) – Barycentric scalar b2 which represents a weighting factor towards second vector of 2d-triangle.
  • amount2 (float) – Barycentric scalar b3 which represents a weighting factor towards third vector of 2d-triangle.
Returns:

The cartesian translation of barycentric coordinates.

void Barycentric(ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, float amount1, float amount2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value3 (Microsoft.Xna.Framework.Vector2) –
  • amount1 (float) –
  • amount2 (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 CatmullRom(Vector2 value1, Vector2 value2, Vector2 value3, Vector2 value4, float amount)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains CatmullRom interpolation of the specified vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector in interpolation.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector in interpolation.
  • value3 (Microsoft.Xna.Framework.Vector2) – The third vector in interpolation.
  • value4 (Microsoft.Xna.Framework.Vector2) – The fourth vector in interpolation.
  • amount (float) – Weighting factor.
Returns:

The result of CatmullRom interpolation.

void CatmullRom(ref Vector2 value1, ref Vector2 value2, ref Vector2 value3, ref Vector2 value4, float amount, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value3 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value4 (Microsoft.Xna.Framework.Vector2) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Clamp(Vector2 value1, Vector2 min, Vector2 max)

Clamps the specified value within a range.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The value to clamp.
  • min (Microsoft.Xna.Framework.Vector2) – The min value.
  • max (Microsoft.Xna.Framework.Vector2) – The max value.
Returns:

The clamped value.

void Clamp(ref Vector2 value1, ref Vector2 min, ref Vector2 max, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) min (Microsoft.Xna.Framework.Vector2) –
  • (ref) max (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
float Distance(Vector2 value1, Vector2 value2)

Returns the distance between two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
Returns:

The distance between two vectors.

void Distance(ref Vector2 value1, ref Vector2 value2, ref float result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (float) –
float DistanceSquared(Vector2 value1, Vector2 value2)

Returns the squared distance between two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
Returns:

The squared distance between two vectors.

void DistanceSquared(ref Vector2 value1, ref Vector2 value2, ref float result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (float) –
Vector2 Divide(Vector2 value1, Vector2 value2)

Divides the components of a T:Microsoft.Xna.Framework.Vector2 by the components of another T:Microsoft.Xna.Framework.Vector2.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • value2 (Microsoft.Xna.Framework.Vector2) – Divisor T:Microsoft.Xna.Framework.Vector2.
Returns:

The result of dividing the vectors.

void Divide(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Divide(Vector2 value1, float divider)

Divides the components of a T:Microsoft.Xna.Framework.Vector2 by a scalar.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • divider (float) – Divisor scalar.
Returns:

The result of dividing a vector by a scalar.

void Divide(ref Vector2 value1, float divider, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • divider (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
float Dot(Vector2 value1, Vector2 value2)

Returns a dot product of two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
Returns:

The dot product of two vectors.

void Dot(ref Vector2 value1, ref Vector2 value2, ref float result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (float) –
bool Equals(System.Object obj)

Compares whether current instance is equal to specified T:System.Object.

Parameters:
  • obj (System.Object) – The T:System.Object to compare.
Returns:

true if the instances are equal; false otherwise.

bool Equals(Vector2 other)

Compares whether current instance is equal to specified T:Microsoft.Xna.Framework.Vector2.

Parameters:
  • other (Microsoft.Xna.Framework.Vector2) – The T:Microsoft.Xna.Framework.Vector2 to compare.
Returns:

true if the instances are equal; false otherwise.

int GetHashCode()

Gets the hash code of this T:Microsoft.Xna.Framework.Vector2.

Returns:Hash code of this T:Microsoft.Xna.Framework.Vector2.
Vector2 Hermite(Vector2 value1, Vector2 tangent1, Vector2 value2, Vector2 tangent2, float amount)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains hermite spline interpolation.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first position vector.
  • tangent1 (Microsoft.Xna.Framework.Vector2) – The first tangent vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second position vector.
  • tangent2 (Microsoft.Xna.Framework.Vector2) – The second tangent vector.
  • amount (float) – Weighting factor.
Returns:

The hermite spline interpolation vector.

void Hermite(ref Vector2 value1, ref Vector2 tangent1, ref Vector2 value2, ref Vector2 tangent2, float amount, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) tangent1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) tangent2 (Microsoft.Xna.Framework.Vector2) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
float Length()

Returns the length of this T:Microsoft.Xna.Framework.Vector2.

Returns:The length of this T:Microsoft.Xna.Framework.Vector2.
float LengthSquared()

Returns the squared length of this T:Microsoft.Xna.Framework.Vector2.

Returns:The squared length of this T:Microsoft.Xna.Framework.Vector2.
Vector2 Lerp(Vector2 value1, Vector2 value2, float amount)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains linear interpolation of the specified vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
  • amount (float) – Weighting value(between 0.0 and 1.0).
Returns:

The result of linear interpolation of the specified vectors.

void Lerp(ref Vector2 value1, ref Vector2 value2, float amount, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 LerpPrecise(Vector2 value1, Vector2 value2, float amount)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains linear interpolation of the specified vectors. Uses M:Microsoft.Xna.Framework.MathHelper.LerpPrecise(System.Single,System.Single,System.Single) on MathHelper for the interpolation. Less efficient but more precise compared to M:Microsoft.Xna.Framework.Vector2.Lerp(Microsoft.Xna.Framework.Vector2,Microsoft.Xna.Framework.Vector2,System.Single). See remarks section of M:Microsoft.Xna.Framework.MathHelper.LerpPrecise(System.Single,System.Single,System.Single) on MathHelper for more info.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
  • amount (float) – Weighting value(between 0.0 and 1.0).
Returns:

The result of linear interpolation of the specified vectors.

void LerpPrecise(ref Vector2 value1, ref Vector2 value2, float amount, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Max(Vector2 value1, Vector2 value2)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a maximal values from the two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
Returns:

The T:Microsoft.Xna.Framework.Vector2 with maximal values from the two vectors.

void Max(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Min(Vector2 value1, Vector2 value2)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a minimal values from the two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – The first vector.
  • value2 (Microsoft.Xna.Framework.Vector2) – The second vector.
Returns:

The T:Microsoft.Xna.Framework.Vector2 with minimal values from the two vectors.

void Min(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Multiply(Vector2 value1, Vector2 value2)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a multiplication of two vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
Returns:

The result of the vector multiplication.

void Multiply(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Multiply(Vector2 value1, float scaleFactor)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a multiplication of T:Microsoft.Xna.Framework.Vector2 and a scalar.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • scaleFactor (float) – Scalar value.
Returns:

The result of the vector multiplication with a scalar.

void Multiply(ref Vector2 value1, float scaleFactor, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • scaleFactor (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Negate(Vector2 value)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains the specified vector inversion.

Parameters:
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
Returns:

The result of the vector inversion.

void Negate(ref Vector2 value, ref Vector2 result)
Parameters:
  • (ref) value (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
void Normalize()

Turns this T:Microsoft.Xna.Framework.Vector2 to a unit vector with the same direction.

Vector2 Normalize(Vector2 value)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a normalized values from another vector.

Parameters:
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
Returns:

Unit vector.

void Normalize(ref Vector2 value, ref Vector2 result)
Parameters:
  • (ref) value (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Reflect(Vector2 vector, Vector2 normal)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains reflect vector of the given vector and normal.

Parameters:
  • vector (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • normal (Microsoft.Xna.Framework.Vector2) – Reflection normal.
Returns:

Reflected vector.

void Reflect(ref Vector2 vector, ref Vector2 normal, ref Vector2 result)
Parameters:
  • (ref) vector (Microsoft.Xna.Framework.Vector2) –
  • (ref) normal (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 SmoothStep(Vector2 value1, Vector2 value2, float amount)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains cubic interpolation of the specified vectors.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • amount (float) – Weighting value.
Returns:

Cubic interpolation of the specified vectors.

void SmoothStep(ref Vector2 value1, ref Vector2 value2, float amount, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • amount (float) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Subtract(Vector2 value1, Vector2 value2)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains subtraction of on T:Microsoft.Xna.Framework.Vector2 from a another.

Parameters:
  • value1 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • value2 (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
Returns:

The result of the vector subtraction.

void Subtract(ref Vector2 value1, ref Vector2 value2, ref Vector2 result)
Parameters:
  • (ref) value1 (Microsoft.Xna.Framework.Vector2) –
  • (ref) value2 (Microsoft.Xna.Framework.Vector2) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
string ToString()

Returns a T:System.String representation of this T:Microsoft.Xna.Framework.Vector2 in the format: {X:[F:Microsoft.Xna.Framework.Vector2.X] Y:[F:Microsoft.Xna.Framework.Vector2.Y]}

Returns:A T:System.String representation of this T:Microsoft.Xna.Framework.Vector2.
Point ToPoint()

Gets a T:Microsoft.Xna.Framework.Point representation for this object.

Returns:A T:Microsoft.Xna.Framework.Point representation for this object.
Vector2 Transform(Vector2 position, Matrix matrix)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a transformation of 2d-vector by the specified T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • position (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • matrix (Microsoft.Xna.Framework.Matrix) – The transformation T:Microsoft.Xna.Framework.Matrix.
Returns:

Transformed T:Microsoft.Xna.Framework.Vector2.

void Transform(ref Vector2 position, ref Matrix matrix, ref Vector2 result)
Parameters:
  • (ref) position (Microsoft.Xna.Framework.Vector2) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
Vector2 Transform(Vector2 value, Quaternion rotation)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a transformation of 2d-vector by the specified T:Microsoft.Xna.Framework.Quaternion, representing the rotation.

Parameters:
  • value (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2.
  • rotation (Microsoft.Xna.Framework.Quaternion) – The T:Microsoft.Xna.Framework.Quaternion which contains rotation transformation.
Returns:

Transformed T:Microsoft.Xna.Framework.Vector2.

void Transform(ref Vector2 value, ref Quaternion rotation, ref Vector2 result)
Parameters:
  • (ref) value (Microsoft.Xna.Framework.Vector2) –
  • (ref) rotation (Microsoft.Xna.Framework.Quaternion) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
void Transform(Microsoft.Xna.Framework.Vector2[] sourceArray, int sourceIndex, ref Matrix matrix, Microsoft.Xna.Framework.Vector2[] destinationArray, int destinationIndex, int length)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • sourceIndex (int) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –
  • destinationIndex (int) –
  • length (int) –
void Transform(Microsoft.Xna.Framework.Vector2[] sourceArray, int sourceIndex, ref Quaternion rotation, Microsoft.Xna.Framework.Vector2[] destinationArray, int destinationIndex, int length)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • sourceIndex (int) –
  • (ref) rotation (Microsoft.Xna.Framework.Quaternion) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –
  • destinationIndex (int) –
  • length (int) –
void Transform(Microsoft.Xna.Framework.Vector2[] sourceArray, ref Matrix matrix, Microsoft.Xna.Framework.Vector2[] destinationArray)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –
void Transform(Microsoft.Xna.Framework.Vector2[] sourceArray, ref Quaternion rotation, Microsoft.Xna.Framework.Vector2[] destinationArray)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • (ref) rotation (Microsoft.Xna.Framework.Quaternion) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –
Vector2 TransformNormal(Vector2 normal, Matrix matrix)

Creates a new T:Microsoft.Xna.Framework.Vector2 that contains a transformation of the specified normal by the specified T:Microsoft.Xna.Framework.Matrix.

Parameters:
  • normal (Microsoft.Xna.Framework.Vector2) – Source T:Microsoft.Xna.Framework.Vector2 which represents a normal vector.
  • matrix (Microsoft.Xna.Framework.Matrix) – The transformation T:Microsoft.Xna.Framework.Matrix.
Returns:

Transformed normal.

void TransformNormal(ref Vector2 normal, ref Matrix matrix, ref Vector2 result)
Parameters:
  • (ref) normal (Microsoft.Xna.Framework.Vector2) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • (ref) result (Microsoft.Xna.Framework.Vector2) –
void TransformNormal(Microsoft.Xna.Framework.Vector2[] sourceArray, int sourceIndex, ref Matrix matrix, Microsoft.Xna.Framework.Vector2[] destinationArray, int destinationIndex, int length)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • sourceIndex (int) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –
  • destinationIndex (int) –
  • length (int) –
void TransformNormal(Microsoft.Xna.Framework.Vector2[] sourceArray, ref Matrix matrix, Microsoft.Xna.Framework.Vector2[] destinationArray)
Parameters:
  • sourceArray (Microsoft.Xna.Framework.Vector2[]) –
  • (ref) matrix (Microsoft.Xna.Framework.Matrix) –
  • destinationArray (Microsoft.Xna.Framework.Vector2[]) –