Space Engineers
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Properties | List of all members
VRageMath.Vector2D Struct Reference

Defines a vector with two components. More...

Inheritance diagram for VRageMath.Vector2D:

Public Member Functions

 Vector2D (double x, double y)
 Initializes a new instance of Vector2D. More...
 
 Vector2D (double value)
 Creates a new instance of Vector2D. More...
 
override string ToString ()
 Retrieves a string representation of the current object. More...
 
bool Equals (Vector2D other)
 Determines whether the specified Object is equal to the Vector2D. More...
 
override bool Equals (object obj)
 Returns a value that indicates whether the current instance is equal to a specified object. More...
 
override int GetHashCode ()
 Gets the hash code of the vector object. More...
 
bool IsValid ()
 
void AssertIsValid ()
 
double Length ()
 Calculates the length of the vector. More...
 
double LengthSquared ()
 Calculates the length of the vector squared. More...
 
void Normalize ()
 Turns the current vector into a unit vector. The result is a vector one unit in length pointing in the same direction as the original vector. More...
 
bool Between (ref Vector2D start, ref Vector2D end)
 
void Rotate (double angle)
 

Static Public Member Functions

static Vector2D ()
 
static operator Vector2I (Vector2D vector)
 
static Vector2D operator- (Vector2D value)
 Returns a vector pointing in the opposite direction. More...
 
static bool operator== (Vector2D value1, Vector2D value2)
 Tests vectors for equality. More...
 
static bool operator!= (Vector2D value1, Vector2D value2)
 Tests vectors for inequality. More...
 
static Vector2D operator+ (Vector2D value1, Vector2D value2)
 Adds two vectors. More...
 
static Vector2D operator+ (Vector2D value1, double value2)
 Adds double to each component of a vector. More...
 
static Vector2D operator- (Vector2D value1, Vector2D value2)
 Subtracts a vector from a vector. More...
 
static Vector2D operator- (Vector2D value1, double value2)
 Subtracts a vector from a vector. More...
 
static Vector2D operator* (Vector2D value1, Vector2D value2)
 Multiplies the components of two vectors by each other. More...
 
static Vector2D operator* (Vector2D value, double scaleFactor)
 Multiplies a vector by a scalar value. More...
 
static Vector2D operator* (double scaleFactor, Vector2D value)
 Multiplies a vector by a scalar value. More...
 
static Vector2D operator/ (Vector2D value1, Vector2D value2)
 Divides the components of a vector by the components of another vector. More...
 
static Vector2D operator/ (Vector2D value1, double divider)
 Divides a vector by a scalar value. More...
 
static Vector2D operator/ (double value1, Vector2D value2)
 Divides a scalar value by a vector. More...
 
static double Distance (Vector2D value1, Vector2D value2)
 Calculates the distance between two vectors. More...
 
static void Distance (ref Vector2D value1, ref Vector2D value2, out double result)
 Calculates the distance between two vectors. More...
 
static double DistanceSquared (Vector2D value1, Vector2D value2)
 Calculates the distance between two vectors squared. More...
 
static void DistanceSquared (ref Vector2D value1, ref Vector2D value2, out double result)
 Calculates the distance between two vectors squared. More...
 
static double Dot (Vector2D value1, Vector2D value2)
 Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them. More...
 
static void Dot (ref Vector2D value1, ref Vector2D value2, out double result)
 Calculates the dot product of two vectors and writes the result to a user-specified variable. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them. More...
 
static Vector2D Normalize (Vector2D value)
 Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector. More...
 
static void Normalize (ref Vector2D value, out Vector2D result)
 Creates a unit vector from the specified vector, writing the result to a user-specified variable. The result is a vector one unit in length pointing in the same direction as the original vector. More...
 
static Vector2D Reflect (Vector2D vector, Vector2D normal)
 Determines the reflect vector of the given vector and normal. More...
 
static void Reflect (ref Vector2D vector, ref Vector2D normal, out Vector2D result)
 Determines the reflect vector of the given vector and normal. More...
 
static Vector2D Min (Vector2D value1, Vector2D value2)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static void Min (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static Vector2D Max (Vector2D value1, Vector2D value2)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static void Max (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static Vector2D Clamp (Vector2D value1, Vector2D min, Vector2D max)
 Restricts a value to be within a specified range. More...
 
static void Clamp (ref Vector2D value1, ref Vector2D min, ref Vector2D max, out Vector2D result)
 Restricts a value to be within a specified range. More...
 
static Vector2D ClampToSphere (Vector2D vector, double radius)
 
static void ClampToSphere (ref Vector2D vector, double radius)
 
static Vector2D Lerp (Vector2D value1, Vector2D value2, double amount)
 Performs a linear interpolation between two vectors. More...
 
static void Lerp (ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
 Performs a linear interpolation between two vectors. More...
 
static Vector2D Barycentric (Vector2D value1, Vector2D value2, Vector2D value3, double amount1, double amount2)
 Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle. More...
 
static void Barycentric (ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, double amount1, double amount2, out Vector2D result)
 Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle. More...
 
static Vector2D SmoothStep (Vector2D value1, Vector2D value2, double amount)
 Interpolates between two values using a cubic equation. More...
 
static void SmoothStep (ref Vector2D value1, ref Vector2D value2, double amount, out Vector2D result)
 Interpolates between two values using a cubic equation. More...
 
static Vector2D CatmullRom (Vector2D value1, Vector2D value2, Vector2D value3, Vector2D value4, double amount)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static void CatmullRom (ref Vector2D value1, ref Vector2D value2, ref Vector2D value3, ref Vector2D value4, double amount, out Vector2D result)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static Vector2D Hermite (Vector2D value1, Vector2D tangent1, Vector2D value2, Vector2D tangent2, double amount)
 Performs a Hermite spline interpolation. More...
 
static void Hermite (ref Vector2D value1, ref Vector2D tangent1, ref Vector2D value2, ref Vector2D tangent2, double amount, out Vector2D result)
 Performs a Hermite spline interpolation. More...
 
static Vector2D Transform (Vector2D position, Matrix matrix)
 Transforms the vector (x, y, 0, 1) by the specified matrix. More...
 
static void Transform (ref Vector2D position, ref Matrix matrix, out Vector2D result)
 Transforms a Vector2D by the given Matrix. More...
 
static Vector2D TransformNormal (Vector2D normal, Matrix matrix)
 Transforms a 2D vector normal by a matrix. More...
 
static void TransformNormal (ref Vector2D normal, ref Matrix matrix, out Vector2D result)
 Transforms a vector normal by a matrix. More...
 
static Vector2D Transform (Vector2D value, Quaternion rotation)
 Transforms a single Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation. More...
 
static void Transform (ref Vector2D value, ref Quaternion rotation, out Vector2D result)
 Transforms a Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation. More...
 
static void Transform (Vector2D[] sourceArray, ref Matrix matrix, Vector2D[] destinationArray)
 Transforms an array of Vector2s by a specified Matrix. More...
 
static void Transform (Vector2D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector2D[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of Vector2s by a specified Matrix and places the results in a specified range in a destination array. More...
 
static void TransformNormal (Vector2D[] sourceArray, ref Matrix matrix, Vector2D[] destinationArray)
 Transforms an array of Vector2D vector normals by a specified Matrix. More...
 
static void TransformNormal (Vector2D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector2D[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of Vector2D vector normals by a specified Matrix and places the results in a specified range in a destination array. More...
 
static void Transform (Vector2D[] sourceArray, ref Quaternion rotation, Vector2D[] destinationArray)
 Transforms an array of Vector2s by a specified Quaternion. More...
 
static void Transform (Vector2D[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector2D[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of Vector2s by a specified Quaternion and places the results in a specified range in a destination array. More...
 
static Vector2D Negate (Vector2D value)
 Returns a vector pointing in the opposite direction. More...
 
static void Negate (ref Vector2D value, out Vector2D result)
 Returns a vector pointing in the opposite direction. More...
 
static Vector2D Add (Vector2D value1, Vector2D value2)
 Adds two vectors. More...
 
static void Add (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Adds two vectors. More...
 
static Vector2D Subtract (Vector2D value1, Vector2D value2)
 Subtracts a vector from a vector. More...
 
static void Subtract (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Subtracts a vector from a vector. More...
 
static Vector2D Multiply (Vector2D value1, Vector2D value2)
 Multiplies the components of two vectors by each other. More...
 
static void Multiply (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Multiplies the components of two vectors by each other. More...
 
static Vector2D Multiply (Vector2D value1, double scaleFactor)
 Multiplies a vector by a scalar value. More...
 
static void Multiply (ref Vector2D value1, double scaleFactor, out Vector2D result)
 Multiplies a vector by a scalar value. More...
 
static Vector2D Divide (Vector2D value1, Vector2D value2)
 Divides the components of a vector by the components of another vector. More...
 
static void Divide (ref Vector2D value1, ref Vector2D value2, out Vector2D result)
 Divides the components of a vector by the components of another vector. More...
 
static Vector2D Divide (Vector2D value1, double divider)
 Divides a vector by a scalar value. More...
 
static void Divide (ref Vector2D value1, double divider, out Vector2D result)
 Divides a vector by a scalar value. More...
 
static Vector2D Floor (Vector2D position)
 

Public Attributes

double X
 Gets or sets the x-component of the vector. More...
 
double Y
 Gets or sets the y-component of the vector. More...
 

Static Public Attributes

static Vector2D Zero = new Vector2D()
 
static Vector2D One = new Vector2D(1f, 1f)
 
static Vector2D UnitX = new Vector2D(1f, 0f)
 
static Vector2D UnitY = new Vector2D(0f, 1f)
 
static Vector2D PositiveInfinity = One * double.PositiveInfinity
 

Properties

double this[int index] [get, set]
 

Detailed Description

Defines a vector with two components.

Definition at line 11 of file Vector2D.cs.

Constructor & Destructor Documentation

static VRageMath.Vector2D.Vector2D ( )
inlinestatic

Definition at line 30 of file Vector2D.cs.

VRageMath.Vector2D.Vector2D ( double  x,
double  y 
)
inline

Initializes a new instance of Vector2D.

Parameters
xInitial value for the x-component of the vector.
yInitial value for the y-component of the vector.

Definition at line 38 of file Vector2D.cs.

VRageMath.Vector2D.Vector2D ( double  value)
inline

Creates a new instance of Vector2D.

Parameters
valueValue to initialize both components to.

Definition at line 48 of file Vector2D.cs.

Member Function Documentation

static Vector2D VRageMath.Vector2D.Add ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 893 of file Vector2D.cs.

static void VRageMath.Vector2D.Add ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] Sum of the source vectors.

Definition at line 905 of file Vector2D.cs.

void VRageMath.Vector2D.AssertIsValid ( )
inline

Definition at line 282 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Barycentric ( Vector2D  value1,
Vector2D  value2,
Vector2D  value3,
double  amount1,
double  amount2 
)
inlinestatic

Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.

Parameters
value1A Vector2D containing the 2D Cartesian coordinates of vertex 1 of the triangle.
value2A Vector2D containing the 2D Cartesian coordinates of vertex 2 of the triangle.
value3A Vector2D containing the 2D Cartesian coordinates of vertex 3 of the triangle.
amount1Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).
amount2Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).

Definition at line 549 of file Vector2D.cs.

static void VRageMath.Vector2D.Barycentric ( ref Vector2D  value1,
ref Vector2D  value2,
ref Vector2D  value3,
double  amount1,
double  amount2,
out Vector2D  result 
)
inlinestatic

Returns a Vector2D containing the 2D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 2D triangle.

Parameters
value1A Vector2D containing the 2D Cartesian coordinates of vertex 1 of the triangle.
value2A Vector2D containing the 2D Cartesian coordinates of vertex 2 of the triangle.
value3A Vector2D containing the 2D Cartesian coordinates of vertex 3 of the triangle.
amount1Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2).
amount2Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3).
result[OutAttribute] The 2D Cartesian coordinates of the specified point are placed in this Vector2D on exit.

Definition at line 561 of file Vector2D.cs.

bool VRageMath.Vector2D.Between ( ref Vector2D  start,
ref Vector2D  end 
)
inline

Definition at line 1023 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.CatmullRom ( Vector2D  value1,
Vector2D  value2,
Vector2D  value3,
Vector2D  value4,
double  amount 
)
inlinestatic

Performs a Catmull-Rom interpolation using the specified positions.

Parameters
value1The first position in the interpolation.
value2The second position in the interpolation.
value3The third position in the interpolation.
value4The fourth position in the interpolation.
amountWeighting factor.

Definition at line 597 of file Vector2D.cs.

static void VRageMath.Vector2D.CatmullRom ( ref Vector2D  value1,
ref Vector2D  value2,
ref Vector2D  value3,
ref Vector2D  value4,
double  amount,
out Vector2D  result 
)
inlinestatic

Performs a Catmull-Rom interpolation using the specified positions.

Parameters
value1The first position in the interpolation.
value2The second position in the interpolation.
value3The third position in the interpolation.
value4The fourth position in the interpolation.
amountWeighting factor.
result[OutAttribute] A vector that is the result of the Catmull-Rom interpolation.

Definition at line 611 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Clamp ( Vector2D  value1,
Vector2D  min,
Vector2D  max 
)
inlinestatic

Restricts a value to be within a specified range.

Parameters
value1The value to clamp.
minThe minimum value.
maxThe maximum value.

Definition at line 472 of file Vector2D.cs.

static void VRageMath.Vector2D.Clamp ( ref Vector2D  value1,
ref Vector2D  min,
ref Vector2D  max,
out Vector2D  result 
)
inlinestatic

Restricts a value to be within a specified range.

Parameters
value1The value to clamp.
minThe minimum value.
maxThe maximum value.
result[OutAttribute] The clamped value.

Definition at line 490 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.ClampToSphere ( Vector2D  vector,
double  radius 
)
inlinestatic

Definition at line 502 of file Vector2D.cs.

static void VRageMath.Vector2D.ClampToSphere ( ref Vector2D  vector,
double  radius 
)
inlinestatic

Definition at line 513 of file Vector2D.cs.

static double VRageMath.Vector2D.Distance ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Calculates the distance between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 307 of file Vector2D.cs.

static void VRageMath.Vector2D.Distance ( ref Vector2D  value1,
ref Vector2D  value2,
out double  result 
)
inlinestatic

Calculates the distance between two vectors.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The distance between the vectors.

Definition at line 318 of file Vector2D.cs.

static double VRageMath.Vector2D.DistanceSquared ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Calculates the distance between two vectors squared.

Parameters
value1Source vector.
value2Source vector.

Definition at line 330 of file Vector2D.cs.

static void VRageMath.Vector2D.DistanceSquared ( ref Vector2D  value1,
ref Vector2D  value2,
out double  result 
)
inlinestatic

Calculates the distance between two vectors squared.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The distance between the vectors squared.

Definition at line 341 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Divide ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Divides the components of a vector by the components of another vector.

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 981 of file Vector2D.cs.

static void VRageMath.Vector2D.Divide ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Divides the components of a vector by the components of another vector.

Parameters
value1Source vector.
value2The divisor.
result[OutAttribute] The result of the division.

Definition at line 993 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Divide ( Vector2D  value1,
double  divider 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 1003 of file Vector2D.cs.

static void VRageMath.Vector2D.Divide ( ref Vector2D  value1,
double  divider,
out Vector2D  result 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.
result[OutAttribute] The result of the division.

Definition at line 1016 of file Vector2D.cs.

static double VRageMath.Vector2D.Dot ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.

Parameters
value1Source vector.
value2Source vector.

Definition at line 352 of file Vector2D.cs.

static void VRageMath.Vector2D.Dot ( ref Vector2D  value1,
ref Vector2D  value2,
out double  result 
)
inlinestatic

Calculates the dot product of two vectors and writes the result to a user-specified variable. If the two vectors are unit vectors, the dot product returns a doubleing point value between -1 and 1 that can be used to determine some properties of the angle between two vectors. For example, it can show whether the vectors are orthogonal, parallel, or have an acute or obtuse angle between them.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The dot product of the two vectors.

Definition at line 361 of file Vector2D.cs.

bool VRageMath.Vector2D.Equals ( Vector2D  other)
inline

Determines whether the specified Object is equal to the Vector2D.

Parameters
otherThe Object to compare with the current Vector2D.

Definition at line 247 of file Vector2D.cs.

override bool VRageMath.Vector2D.Equals ( object  obj)
inline

Returns a value that indicates whether the current instance is equal to a specified object.

Parameters
objObject to make the comparison with.

Definition at line 259 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Floor ( Vector2D  position)
inlinestatic

Definition at line 1028 of file Vector2D.cs.

override int VRageMath.Vector2D.GetHashCode ( )
inline

Gets the hash code of the vector object.

Definition at line 270 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Hermite ( Vector2D  value1,
Vector2D  tangent1,
Vector2D  value2,
Vector2D  tangent2,
double  amount 
)
inlinestatic

Performs a Hermite spline interpolation.

Parameters
value1Source position vector.
tangent1Source tangent vector.
value2Source position vector.
tangent2Source tangent vector.
amountWeighting factor.

Definition at line 623 of file Vector2D.cs.

static void VRageMath.Vector2D.Hermite ( ref Vector2D  value1,
ref Vector2D  tangent1,
ref Vector2D  value2,
ref Vector2D  tangent2,
double  amount,
out Vector2D  result 
)
inlinestatic

Performs a Hermite spline interpolation.

Parameters
value1Source position vector.
tangent1Source tangent vector.
value2Source position vector.
tangent2Source tangent vector.
amountWeighting factor.
result[OutAttribute] The result of the Hermite spline interpolation.

Definition at line 641 of file Vector2D.cs.

bool VRageMath.Vector2D.IsValid ( )
inline

Definition at line 275 of file Vector2D.cs.

double VRageMath.Vector2D.Length ( )
inline

Calculates the length of the vector.

Definition at line 290 of file Vector2D.cs.

double VRageMath.Vector2D.LengthSquared ( )
inline

Calculates the length of the vector squared.

Definition at line 298 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Lerp ( Vector2D  value1,
Vector2D  value2,
double  amount 
)
inlinestatic

Performs a linear interpolation between two vectors.

Parameters
value1Source vector.
value2Source vector.
amountValue between 0 and 1 indicating the weight of value2.

Definition at line 527 of file Vector2D.cs.

static void VRageMath.Vector2D.Lerp ( ref Vector2D  value1,
ref Vector2D  value2,
double  amount,
out Vector2D  result 
)
inlinestatic

Performs a linear interpolation between two vectors.

Parameters
value1Source vector.
value2Source vector.
amountValue between 0 and 1 indicating the weight of value2.
result[OutAttribute] The result of the interpolation.

Definition at line 539 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Max ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Returns a vector that contains the highest value from each matching pair of components.

Parameters
value1Source vector.
value2Source vector.

Definition at line 450 of file Vector2D.cs.

static void VRageMath.Vector2D.Max ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Returns a vector that contains the highest value from each matching pair of components.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The maximized vector.

Definition at line 462 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Min ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Returns a vector that contains the lowest value from each matching pair of components.

Parameters
value1Source vector.
value2Source vector.

Definition at line 428 of file Vector2D.cs.

static void VRageMath.Vector2D.Min ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Returns a vector that contains the lowest value from each matching pair of components.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The minimized vector.

Definition at line 440 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Multiply ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 937 of file Vector2D.cs.

static void VRageMath.Vector2D.Multiply ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The result of the multiplication.

Definition at line 949 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Multiply ( Vector2D  value1,
double  scaleFactor 
)
inlinestatic

Multiplies a vector by a scalar value.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 959 of file Vector2D.cs.

static void VRageMath.Vector2D.Multiply ( ref Vector2D  value1,
double  scaleFactor,
out Vector2D  result 
)
inlinestatic

Multiplies a vector by a scalar value.

Parameters
value1Source vector.
scaleFactorScalar value.
result[OutAttribute] The result of the multiplication.

Definition at line 971 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Negate ( Vector2D  value)
inlinestatic

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 871 of file Vector2D.cs.

static void VRageMath.Vector2D.Negate ( ref Vector2D  value,
out Vector2D  result 
)
inlinestatic

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.
result[OutAttribute] Vector pointing in the opposite direction.

Definition at line 883 of file Vector2D.cs.

void VRageMath.Vector2D.Normalize ( )
inline

Turns the current vector into a unit vector. The result is a vector one unit in length pointing in the same direction as the original vector.

Definition at line 369 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Normalize ( Vector2D  value)
inlinestatic

Creates a unit vector from the specified vector. The result is a vector one unit in length pointing in the same direction as the original vector.

Parameters
valueSource Vector2D.

Definition at line 380 of file Vector2D.cs.

static void VRageMath.Vector2D.Normalize ( ref Vector2D  value,
out Vector2D  result 
)
inlinestatic

Creates a unit vector from the specified vector, writing the result to a user-specified variable. The result is a vector one unit in length pointing in the same direction as the original vector.

Parameters
valueSource vector.
result[OutAttribute] Normalized vector.

Definition at line 393 of file Vector2D.cs.

static VRageMath.Vector2D.operator Vector2I ( Vector2D  vector)
inlineexplicitstatic

Definition at line 69 of file Vector2D.cs.

static bool VRageMath.Vector2D.operator!= ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Tests vectors for inequality.

Parameters
value1Vector to compare.
value2Vector to compare.

Definition at line 102 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator* ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 162 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator* ( Vector2D  value,
double  scaleFactor 
)
inlinestatic

Multiplies a vector by a scalar value.

Parameters
valueSource vector.
scaleFactorScalar value.

Definition at line 174 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator* ( double  scaleFactor,
Vector2D  value 
)
inlinestatic

Multiplies a vector by a scalar value.

Parameters
scaleFactorScalar value.
valueSource vector.

Definition at line 186 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator+ ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 114 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator+ ( Vector2D  value1,
double  value2 
)
inlinestatic

Adds double to each component of a vector.

Parameters
value1Source vector.
value2Source double.

Definition at line 126 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator- ( Vector2D  value)
inlinestatic

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 78 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator- ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2source vector.

Definition at line 138 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator- ( Vector2D  value1,
double  value2 
)
inlinestatic

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2source vector.

Definition at line 150 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator/ ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Divides the components of a vector by the components of another vector.

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 198 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator/ ( Vector2D  value1,
double  divider 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 210 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.operator/ ( double  value1,
Vector2D  value2 
)
inlinestatic

Divides a scalar value by a vector.

Definition at line 222 of file Vector2D.cs.

static bool VRageMath.Vector2D.operator== ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Tests vectors for equality.

Parameters
value1Source vector.
value2Source vector.

Definition at line 90 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Reflect ( Vector2D  vector,
Vector2D  normal 
)
inlinestatic

Determines the reflect vector of the given vector and normal.

Parameters
vectorSource vector.
normalNormal of vector.

Definition at line 404 of file Vector2D.cs.

static void VRageMath.Vector2D.Reflect ( ref Vector2D  vector,
ref Vector2D  normal,
out Vector2D  result 
)
inlinestatic

Determines the reflect vector of the given vector and normal.

Parameters
vectorSource vector.
normalNormal of vector.
result[OutAttribute] The created reflect vector.

Definition at line 417 of file Vector2D.cs.

void VRageMath.Vector2D.Rotate ( double  angle)
inline

Definition at line 1033 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.SmoothStep ( Vector2D  value1,
Vector2D  value2,
double  amount 
)
inlinestatic

Interpolates between two values using a cubic equation.

Parameters
value1Source value.
value2Source value.
amountWeighting value.

Definition at line 571 of file Vector2D.cs.

static void VRageMath.Vector2D.SmoothStep ( ref Vector2D  value1,
ref Vector2D  value2,
double  amount,
out Vector2D  result 
)
inlinestatic

Interpolates between two values using a cubic equation.

Parameters
value1Source value.
value2Source value.
amountWeighting value.
result[OutAttribute] The interpolated value.

Definition at line 585 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Subtract ( Vector2D  value1,
Vector2D  value2 
)
inlinestatic

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 915 of file Vector2D.cs.

static void VRageMath.Vector2D.Subtract ( ref Vector2D  value1,
ref Vector2D  value2,
out Vector2D  result 
)
inlinestatic

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.
result[OutAttribute] The result of the subtraction.

Definition at line 927 of file Vector2D.cs.

override string VRageMath.Vector2D.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 233 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Transform ( Vector2D  position,
Matrix  matrix 
)
inlinestatic

Transforms the vector (x, y, 0, 1) by the specified matrix.

Parameters
positionThe source vector.
matrixThe transformation matrix.

Definition at line 657 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( ref Vector2D  position,
ref Matrix  matrix,
out Vector2D  result 
)
inlinestatic

Transforms a Vector2D by the given Matrix.

Parameters
positionThe source Vector2D.
matrixThe transformation Matrix.
result[OutAttribute] The Vector2D resulting from the transformation.

Definition at line 671 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.Transform ( Vector2D  value,
Quaternion  rotation 
)
inlinestatic

Transforms a single Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.

Parameters
valueThe vector to rotate.
rotationThe Quaternion rotation to apply.

Definition at line 709 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( ref Vector2D  value,
ref Quaternion  rotation,
out Vector2D  result 
)
inlinestatic

Transforms a Vector2D, or the vector normal (x, y, 0, 0), by a specified Quaternion rotation.

Parameters
valueThe vector to rotate.
rotationThe Quaternion rotation to apply.
result[OutAttribute] An existing Vector2D filled in with the result of the rotation.

Definition at line 731 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( Vector2D[]  sourceArray,
ref Matrix  matrix,
Vector2D[]  destinationArray 
)
inlinestatic

Transforms an array of Vector2s by a specified Matrix.

Parameters
sourceArrayThe array of Vector2s to transform.
matrixThe transform Matrix to apply.
destinationArrayAn existing array into which the transformed Vector2s are written.

Definition at line 751 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( Vector2D[]  sourceArray,
int  sourceIndex,
ref Matrix  matrix,
Vector2D[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Transforms a specified range in an array of Vector2s by a specified Matrix and places the results in a specified range in a destination array.

Parameters
sourceArrayThe source array.
sourceIndexThe index of the first Vector2D to transform in the source array.
matrixThe Matrix to transform by.
destinationArrayThe destination array into which the resulting Vector2s will be written.
destinationIndexThe index of the position in the destination array where the first result Vector2D should be written.
lengthThe number of Vector2s to be transformed.

Definition at line 766 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( Vector2D[]  sourceArray,
ref Quaternion  rotation,
Vector2D[]  destinationArray 
)
inlinestatic

Transforms an array of Vector2s by a specified Quaternion.

Parameters
sourceArrayThe array of Vector2s to transform.
rotationThe transform Matrix to use.
destinationArrayAn existing array into which the transformed Vector2s are written.

Definition at line 815 of file Vector2D.cs.

static void VRageMath.Vector2D.Transform ( Vector2D[]  sourceArray,
int  sourceIndex,
ref Quaternion  rotation,
Vector2D[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Transforms a specified range in an array of Vector2s by a specified Quaternion and places the results in a specified range in a destination array.

Parameters
sourceArrayThe source array.
sourceIndexThe index of the first Vector2D to transform in the source array.
rotationThe Quaternion rotation to apply.
destinationArrayThe destination array into which the resulting Vector2s are written.
destinationIndexThe index of the position in the destination array where the first result Vector2D should be written.
lengthThe number of Vector2s to be transformed.

Definition at line 842 of file Vector2D.cs.

static Vector2D VRageMath.Vector2D.TransformNormal ( Vector2D  normal,
Matrix  matrix 
)
inlinestatic

Transforms a 2D vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation matrix.

Definition at line 683 of file Vector2D.cs.

static void VRageMath.Vector2D.TransformNormal ( ref Vector2D  normal,
ref Matrix  matrix,
out Vector2D  result 
)
inlinestatic

Transforms a vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation matrix.
result[OutAttribute] The Vector2D resulting from the transformation.

Definition at line 697 of file Vector2D.cs.

static void VRageMath.Vector2D.TransformNormal ( Vector2D[]  sourceArray,
ref Matrix  matrix,
Vector2D[]  destinationArray 
)
inlinestatic

Transforms an array of Vector2D vector normals by a specified Matrix.

Parameters
sourceArrayThe array of vector normals to transform.
matrixThe transform Matrix to apply.
destinationArrayAn existing array into which the transformed vector normals are written.

Definition at line 783 of file Vector2D.cs.

static void VRageMath.Vector2D.TransformNormal ( Vector2D[]  sourceArray,
int  sourceIndex,
ref Matrix  matrix,
Vector2D[]  destinationArray,
int  destinationIndex,
int  length 
)
inlinestatic

Transforms a specified range in an array of Vector2D vector normals by a specified Matrix and places the results in a specified range in a destination array.

Parameters
sourceArrayThe source array.
sourceIndexThe index of the first Vector2D to transform in the source array.
matrixThe Matrix to apply.
destinationArrayThe destination array into which the resulting Vector2s are written.
destinationIndexThe index of the position in the destination array where the first result Vector2D should be written.
lengthThe number of vector normals to be transformed.

Definition at line 798 of file Vector2D.cs.

Member Data Documentation

Vector2D VRageMath.Vector2D.One = new Vector2D(1f, 1f)
static

Definition at line 14 of file Vector2D.cs.

Vector2D VRageMath.Vector2D.PositiveInfinity = One * double.PositiveInfinity
static

Definition at line 17 of file Vector2D.cs.

Vector2D VRageMath.Vector2D.UnitX = new Vector2D(1f, 0f)
static

Definition at line 15 of file Vector2D.cs.

Vector2D VRageMath.Vector2D.UnitY = new Vector2D(0f, 1f)
static

Definition at line 16 of file Vector2D.cs.

double VRageMath.Vector2D.X

Gets or sets the x-component of the vector.

Definition at line 23 of file Vector2D.cs.

double VRageMath.Vector2D.Y

Gets or sets the y-component of the vector.

Definition at line 28 of file Vector2D.cs.

Vector2D VRageMath.Vector2D.Zero = new Vector2D()
static

Definition at line 13 of file Vector2D.cs.

Property Documentation

double VRageMath.Vector2D.this[int index]
getset

Definition at line 54 of file Vector2D.cs.


The documentation for this struct was generated from the following file: