Click or drag to resize

Vector2 Structure

Describes a 2D-vector.
Inheritance Hierarchy
SystemObject
  SystemValueType
    CFX.Structures.GeometryVector2

Namespace: CFX.Structures.Geometry
Assembly: CFX (in CFX.dll) Version: 1.7.3
Syntax
[SerializableAttribute]
public struct Vector2 : IEquatable<Vector2>

The Vector2 type exposes the following members.

Constructors
 NameDescription
Public methodVector2(Double) Constructs a 2d vector with X and Y set to the same value.
Public methodVector2(Double, Double) Constructs a 2d vector with X and Y from two values.
Top
Properties
 NameDescription
Public propertyStatic memberOne Returns a Vector2 with components 1, 1.
Public propertyStatic memberUnitX Returns a Vector2 with components 1, 0.
Public propertyStatic memberUnitY Returns a Vector2 with components 0, 1.
Public propertyStatic memberZero Returns a Vector2 with components 0, 0.
Top
Methods
 NameDescription
Public methodStatic memberAdd(Vector2, Vector2) Performs vector addition on value1 and value2.
Public methodStatic memberAdd(Vector2, Vector2, Vector2) Performs vector addition on value1 and value2, storing the result of the addition in result.
Public methodStatic memberBarycentric(Vector2, Vector2, Vector2, Double, Double) Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.
Public methodStatic memberBarycentric(Vector2, Vector2, Vector2, Double, Double, Vector2) Creates a new Vector2 that contains the cartesian coordinates of a vector specified in barycentric coordinates and relative to 2d-triangle.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Double) Creates a new Vector2 that contains CatmullRom interpolation of the specified vectors.
Public methodStatic memberCatmullRom(Vector2, Vector2, Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains CatmullRom interpolation of the specified vectors.
Public methodStatic memberClamp(Vector2, Vector2, Vector2) Clamps the specified value within a range.
Public methodStatic memberClamp(Vector2, Vector2, Vector2, Vector2) Clamps the specified value within a range.
Public methodStatic memberDistance(Vector2, Vector2) Returns the distance between two vectors.
Public methodStatic memberDistance(Vector2, Vector2, Double) Returns the distance between two vectors.
Public methodStatic memberDistanceSquared(Vector2, Vector2) Returns the squared distance between two vectors.
Public methodStatic memberDistanceSquared(Vector2, Vector2, Double) Returns the squared distance between two vectors.
Public methodStatic memberDivide(Vector2, Vector2) Divides the components of a Vector2 by the components of another Vector2.
Public methodStatic memberDivide(Vector2, Double) Divides the components of a Vector2 by a scalar.
Public methodStatic memberDivide(Vector2, Vector2, Vector2) Divides the components of a Vector2 by the components of another Vector2.
Public methodStatic memberDivide(Vector2, Double, Vector2) Divides the components of a Vector2 by a scalar.
Public methodStatic memberDot(Vector2, Vector2) Returns a dot product of two vectors.
Public methodStatic memberDot(Vector2, Vector2, Double) Returns a dot product of two vectors.
Public methodEquals(Object) Compares whether current instance is equal to specified Object.
(Overrides ValueTypeEquals(Object))
Public methodEquals(Vector2) Compares whether current instance is equal to specified Vector2.
Public methodGetHashCode Gets the hash code of this Vector2.
(Overrides ValueTypeGetHashCode)
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Double) Creates a new Vector2 that contains hermite spline interpolation.
Public methodStatic memberHermite(Vector2, Vector2, Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains hermite spline interpolation.
Public methodLength Returns the length of this Vector2.
Public methodLengthSquared Returns the squared length of this Vector2.
Public methodStatic memberLerp(Vector2, Vector2, Double) Creates a new Vector2 that contains linear interpolation of the specified vectors.
Public methodStatic memberLerp(Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains linear interpolation of the specified vectors.
Public methodStatic memberMax(Vector2, Vector2) Creates a new Vector2 that contains a maximal values from the two vectors.
Public methodStatic memberMax(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a maximal values from the two vectors.
Public methodStatic memberMin(Vector2, Vector2) Creates a new Vector2 that contains a minimal values from the two vectors.
Public methodStatic memberMin(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a minimal values from the two vectors.
Public methodStatic memberMultiply(Vector2, Vector2) Creates a new Vector2 that contains a multiplication of two vectors.
Public methodStatic memberMultiply(Vector2, Double) Creates a new Vector2 that contains a multiplication of Vector2 and a scalar.
Public methodStatic memberMultiply(Vector2, Vector2, Vector2) Creates a new Vector2 that contains a multiplication of two vectors.
Public methodStatic memberMultiply(Vector2, Double, Vector2) Creates a new Vector2 that contains a multiplication of Vector2 and a scalar.
Public methodStatic memberNegate(Vector2) Creates a new Vector2 that contains the specified vector inversion. direction of value.
Public methodStatic memberNegate(Vector2, Vector2) Creates a new Vector2 that contains the specified vector inversion. direction of value in result.
Public methodNormalize Turns this Vector2 to a unit vector with the same direction.
Public methodStatic memberNormalize(Vector2) Creates a new Vector2 that contains a normalized values from another vector.
Public methodStatic memberNormalize(Vector2, Vector2) Creates a new Vector2 that contains a normalized values from another vector.
Public methodStatic memberReflect(Vector2, Vector2) Creates a new Vector2 that contains reflect vector of the given vector and normal.
Public methodStatic memberReflect(Vector2, Vector2, Vector2) Creates a new Vector2 that contains reflect vector of the given vector and normal.
Public methodStatic memberSmoothStep(Vector2, Vector2, Double) Creates a new Vector2 that contains cubic interpolation of the specified vectors.
Public methodStatic memberSmoothStep(Vector2, Vector2, Double, Vector2) Creates a new Vector2 that contains cubic interpolation of the specified vectors.
Public methodStatic memberSubtract(Vector2, Vector2) Creates a new Vector2 that contains subtraction of on Vector2 from a another.
Public methodStatic memberSubtract(Vector2, Vector2, Vector2) Creates a new Vector2 that contains subtraction of on Vector2 from a another.
Public methodToString Returns a String representation of this Vector2 in the format: {X:[X] Y:[Y]}
(Overrides ValueTypeToString)
Public methodStatic memberTransform(Vector2, Matrix44) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Matrix44.
Public methodStatic memberTransform(Vector2, Quaternion) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Quaternion, representing the rotation.
Public methodStatic memberTransform(Vector2, Matrix44, Vector2) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Matrix44.
Public methodStatic memberTransform(Vector2, Quaternion, Vector2) Creates a new Vector2 that contains a transformation of 2d-vector by the specified Quaternion, representing the rotation.
Public methodStatic memberTransform(Vector2, Matrix44, Vector2) Apply transformation on all vectors within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransform(Vector2, Quaternion, Vector2) Apply transformation on all vectors within array of Vector2 by the specified Quaternion and places the results in an another array.
Public methodStatic memberTransform(Vector2, Int32, Matrix44, Vector2, Int32, Int32) Apply transformation on vectors within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransform(Vector2, Int32, Quaternion, Vector2, Int32, Int32) Apply transformation on vectors within array of Vector2 by the specified Quaternion and places the results in an another array.
Public methodStatic memberTransformNormal(Vector2, Matrix44) Creates a new Vector2 that contains a transformation of the specified normal by the specified Matrix44.
Public methodStatic memberTransformNormal(Vector2, Matrix44, Vector2) Creates a new Vector2 that contains a transformation of the specified normal by the specified Matrix44.
Public methodStatic memberTransformNormal(Vector2, Matrix44, Vector2) Apply transformation on all normals within array of Vector2 by the specified Matrix44 and places the results in an another array.
Public methodStatic memberTransformNormal(Vector2, Int32, Matrix44, Vector2, Int32, Int32) Apply transformation on normals within array of Vector2 by the specified Matrix44 and places the results in an another array.
Top
Operators
 NameDescription
Public operatorStatic memberAddition(Vector2, Vector2) Adds two vectors.
Public operatorStatic memberDivision(Vector2, Vector2) Divides the components of a Vector2 by the components of another Vector2.
Public operatorStatic memberDivision(Vector2, Double) Divides the components of a Vector2 by a scalar.
Public operatorStatic memberEquality(Vector2, Vector2) Compares whether two Vector2 instances are equal.
Public operatorStatic memberInequality(Vector2, Vector2) Compares whether two Vector2 instances are equal.
Public operatorStatic memberMultiply(Double, Vector2) Multiplies the components of vector by a scalar.
Public operatorStatic memberMultiply(Vector2, Vector2) Multiplies the components of two vectors by each other.
Public operatorStatic memberMultiply(Vector2, Double) Multiplies the components of vector by a scalar.
Public operatorStatic memberSubtraction(Vector2, Vector2) Subtracts a Vector2 from a Vector2.
Public operatorStatic memberUnaryNegation(Vector2) Inverts values in the specified Vector2.
Top
Fields
 NameDescription
Public fieldX The x coordinate of this Vector2.
Public fieldY The y coordinate of this Vector2.
Top
See Also