SlimDX Documentation
Vector2 Structure
NamespacesSlimDXVector2
Defines a two component vector.

Unmanaged counterpart: D3DXVECTOR2

Declaration Syntax
C#
[SerializableAttribute]
public struct Vector2 : IEquatable<Vector2>
Members
All Members Constructors Methods Properties Fields



Icon Member Description
Vector2(Single, Single)
Initializes a new instance of the Vector2 class.

Vector2(Single)
Initializes a new instance of the Vector2 class.

Add(Vector2%, Vector2%, Vector2%)
Adds two vectors.

Add(Vector2, Vector2)
Adds two vectors.

Addition(Vector2, Vector2)
Adds two vectors.

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.

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.

CatmullRom(Vector2%, Vector2%, Vector2%, Vector2%, Single, Vector2%)
Performs a Catmull-Rom interpolation using the specified positions.

CatmullRom(Vector2, Vector2, Vector2, Vector2, Single)
Performs a Catmull-Rom interpolation using the specified positions.

Clamp(Vector2%, Vector2%, Vector2%, Vector2%)
Restricts a value to be within a specified range.

Clamp(Vector2, Vector2, Vector2)
Restricts a value to be within a specified range.

Distance(Vector2, Vector2)
Calculates the distance between two vectors.

DistanceSquared(Vector2, Vector2)
Calculates the squared distance between two vectors.

Divide(Vector2%, Single, Vector2%)
Scales a vector by the given value.

Divide(Vector2, Single)
Scales a vector by the given value.

Division(Vector2, Single)
Scales a vector by the given value.

Dot(Vector2, Vector2)
Calculates the dot product of two vectors.

Equality(Vector2, Vector2)
Tests for equality between two objects.

Equals(Vector2%, Vector2%)
Determines whether the specified object instances are considered equal.

Equals(Vector2)
Returns a value that indicates whether the current instance is equal to the specified object.

Equals(Object)
Returns a value that indicates whether the current instance is equal to a specified object.
(Overrides ValueType.Equals(Object).)
Finalize()()()()
Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
(Inherited from Object.)
GetHashCode()()()()
Returns the hash code for this instance.
(Overrides ValueType.GetHashCode()()()().)
GetType()()()()
Gets the Type of the current instance.
(Inherited from Object.)
Hermite(Vector2%, Vector2%, Vector2%, Vector2%, Single, Vector2%)
Performs a Hermite spline interpolation.

Hermite(Vector2, Vector2, Vector2, Vector2, Single)
Performs a Hermite spline interpolation.

Inequality(Vector2, Vector2)
Tests for inequality between two objects.

Item[([( Int32])])
Length()()()()
Calculates the length of the vector.

LengthSquared()()()()
Calculates the squared length of the vector.

Lerp(Vector2%, Vector2%, Single, Vector2%)
Performs a linear interpolation between two vectors.

Lerp(Vector2, Vector2, Single)
Performs a linear interpolation between two vectors.

Maximize(Vector2%, Vector2%, Vector2%)
Returns a vector containing the smallest components of the specified vectors.

Maximize(Vector2, Vector2)
Returns a vector containing the largest components of the specified vectors.

MemberwiseClone()()()()
Creates a shallow copy of the current Object.
(Inherited from Object.)
Minimize(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.

Modulate(Vector2%, Vector2%, Vector2%)
Modulates a vector by another.

Modulate(Vector2, Vector2)
Modulates a vector by another.

Multiply(Vector2%, Single, Vector2%)
Scales a vector by the given value.

Multiply(Vector2, Single)
Scales a vector by the given value.

Multiply(Single, Vector2)
Scales a vector by the given value.

Multiply(Vector2, Single)
Scales a vector by the given value.

Negate(Vector2%, Vector2%)
Reverses the direction of a given vector.

Negate(Vector2)
Reverses the direction of a given vector.

Normalize(Vector2%, Vector2%)
Converts the vector into a unit vector.

Normalize(Vector2)
Converts the vector into a unit vector.

Normalize()()()()
Converts the vector into a unit vector.

SizeInBytes
Gets the size of the Vector2 type, in bytes.

SmoothStep(Vector2%, Vector2%, Single, Vector2%)
Performs a cubic interpolation between two vectors.

SmoothStep(Vector2, Vector2, Single)
Performs a cubic interpolation between two vectors.

Subtract(Vector2%, Vector2%, Vector2%)
Subtracts two vectors.

Subtract(Vector2, Vector2)
Subtracts two vectors.

Subtraction(Vector2, Vector2)
Subtracts two vectors.

ToString()()()()
Converts the value of the object to its equivalent string representation.
(Overrides ValueType.ToString()()()().)
Transform(array<Vector2>[]()[][], Quaternion%)
Transforms an array of 2D vectors by the given Quaternion rotation.

Transform(Vector2%, Quaternion%, Vector4%)
Transforms a 2D vector by the given Quaternion rotation.

Transform(Vector2, Quaternion)
Transforms a 2D vector by the given Quaternion rotation.

Transform(array<Vector2>[]()[][], Matrix%)
Transforms an array of 2D vectors by the given Matrix.

Transform(Vector2%, Matrix%, Vector4%)
Transforms a 2D vector by the given Matrix.

Transform(Vector2, Matrix)
Transforms a 2D vector by the given Matrix.

TransformCoordinate(array<Vector2>[]()[][], Matrix%)
Performs a coordinate transformation using the given Matrix.

TransformCoordinate(Vector2%, Matrix%, Vector2%)
Performs a coordinate transformation using the given Matrix.

TransformCoordinate(Vector2, Matrix)
Performs a coordinate transformation using the given Matrix.

TransformNormal(array<Vector2>[]()[][], Matrix%)
Performs a normal transformation using the given Matrix.

TransformNormal(Vector2%, Matrix%, Vector2%)
Performs a normal transformation using the given Matrix.

TransformNormal(Vector2, Matrix)
Performs a normal transformation using the given Matrix.

UnaryNegation(Vector2)
Reverses the direction of a given vector.

UnitX
Gets the X unit Vector2 (1, 0).

UnitY
Gets the Y unit Vector2 (0, 1).

X
Gets or sets the X component of the vector.

Y
Gets or sets the Y component of the vector.

Zero
Gets a Vector2 with all of its components set to zero.

Assembly: SlimDX (Module: SlimDX) Version: 2.0.11.43