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

Defines a vector with four components. More...

Inheritance diagram for VRageMath.Vector4:

Public Member Functions

 Vector4 (float x, float y, float z, float w)
 Initializes a new instance of Vector4. More...
 
 Vector4 (Vector2 value, float z, float w)
 Initializes a new instance of Vector4. More...
 
 Vector4 (Vector3 value, float w)
 Initializes a new instance of Vector4. More...
 
 Vector4 (float value)
 Creates a new instance of Vector4. More...
 
override string ToString ()
 Retrieves a string representation of the current object. More...
 
bool Equals (Vector4 other)
 Determines whether the specified Object is equal to the Vector4. 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 this object. More...
 
float Length ()
 Calculates the length of the vector. More...
 
float LengthSquared ()
 Calculates the length of the vector squared. More...
 
void Normalize ()
 Turns the current vector into a unit vector. More...
 

Static Public Member Functions

static Vector4 ()
 
static Vector4 operator- (Vector4 value)
 Returns a vector pointing in the opposite direction. More...
 
static bool operator== (Vector4 value1, Vector4 value2)
 Tests vectors for equality. More...
 
static bool operator!= (Vector4 value1, Vector4 value2)
 Tests vectors for inequality. More...
 
static Vector4 operator+ (Vector4 value1, Vector4 value2)
 Adds two vectors. More...
 
static Vector4 operator- (Vector4 value1, Vector4 value2)
 Subtracts a vector from a vector. More...
 
static Vector4 operator* (Vector4 value1, Vector4 value2)
 Multiplies the components of two vectors by each other. More...
 
static Vector4 operator* (Vector4 value1, float scaleFactor)
 Multiplies a vector by a scalar. More...
 
static Vector4 operator* (float scaleFactor, Vector4 value1)
 Multiplies a vector by a scalar. More...
 
static Vector4 operator/ (Vector4 value1, Vector4 value2)
 Divides the components of a vector by the components of another vector. More...
 
static Vector4 operator/ (Vector4 value1, float divider)
 Divides a vector by a scalar value. More...
 
static Vector4 operator/ (float lhs, Vector4 rhs)
 Divides a vector by a scalar value. More...
 
static Vector4 PackOrthoMatrix (Vector3 position, Vector3 forward, Vector3 up)
 
static Vector4 PackOrthoMatrix (ref Matrix matrix)
 
static Matrix UnpackOrthoMatrix (ref Vector4 packed)
 
static float Distance (Vector4 value1, Vector4 value2)
 Calculates the distance between two vectors. More...
 
static void Distance (ref Vector4 value1, ref Vector4 value2, out float result)
 Calculates the distance between two vectors. More...
 
static float DistanceSquared (Vector4 value1, Vector4 value2)
 Calculates the distance between two vectors squared. More...
 
static void DistanceSquared (ref Vector4 value1, ref Vector4 value2, out float result)
 Calculates the distance between two vectors squared. More...
 
static float Dot (Vector4 vector1, Vector4 vector2)
 Calculates the dot product of two vectors. More...
 
static void Dot (ref Vector4 vector1, ref Vector4 vector2, out float result)
 Calculates the dot product of two vectors. More...
 
static Vector4 Normalize (Vector4 vector)
 Creates a unit vector from the specified vector. More...
 
static void Normalize (ref Vector4 vector, out Vector4 result)
 Returns a normalized version of the specified vector. More...
 
static Vector4 Min (Vector4 value1, Vector4 value2)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static void Min (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static Vector4 Max (Vector4 value1, Vector4 value2)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static void Max (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static Vector4 Clamp (Vector4 value1, Vector4 min, Vector4 max)
 Restricts a value to be within a specified range. More...
 
static void Clamp (ref Vector4 value1, ref Vector4 min, ref Vector4 max, out Vector4 result)
 Restricts a value to be within a specified range. More...
 
static Vector4 Lerp (Vector4 value1, Vector4 value2, float amount)
 Performs a linear interpolation between two vectors. More...
 
static void Lerp (ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
 Performs a linear interpolation between two vectors. More...
 
static Vector4 Barycentric (Vector4 value1, Vector4 value2, Vector4 value3, float amount1, float amount2)
 Returns a Vector4 containing the 4D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 4D triangle. More...
 
static void Barycentric (ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, float amount1, float amount2, out Vector4 result)
 Returns a Vector4 containing the 4D Cartesian coordinates of a point specified in Barycentric (areal) coordinates relative to a 4D triangle. More...
 
static Vector4 SmoothStep (Vector4 value1, Vector4 value2, float amount)
 Interpolates between two values using a cubic equation. More...
 
static void SmoothStep (ref Vector4 value1, ref Vector4 value2, float amount, out Vector4 result)
 Interpolates between two values using a cubic equation. More...
 
static Vector4 CatmullRom (Vector4 value1, Vector4 value2, Vector4 value3, Vector4 value4, float amount)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static void CatmullRom (ref Vector4 value1, ref Vector4 value2, ref Vector4 value3, ref Vector4 value4, float amount, out Vector4 result)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static Vector4 Hermite (Vector4 value1, Vector4 tangent1, Vector4 value2, Vector4 tangent2, float amount)
 Performs a Hermite spline interpolation. More...
 
static void Hermite (ref Vector4 value1, ref Vector4 tangent1, ref Vector4 value2, ref Vector4 tangent2, float amount, out Vector4 result)
 Performs a Hermite spline interpolation. More...
 
static Vector4 Transform (Vector2 position, Matrix matrix)
 Transforms a Vector2 by the given Matrix. More...
 
static void Transform (ref Vector2 position, ref Matrix matrix, out Vector4 result)
 Transforms a Vector2 by the given Matrix. More...
 
static Vector4 Transform (Vector3 position, Matrix matrix)
 Transforms a Vector3 by the given Matrix. More...
 
static void Transform (ref Vector3 position, ref Matrix matrix, out Vector4 result)
 Transforms a Vector3 by the given Matrix. More...
 
static Vector4 Transform (Vector4 vector, Matrix matrix)
 Transforms a Vector4 by the specified Matrix. More...
 
static void Transform (ref Vector4 vector, ref Matrix matrix, out Vector4 result)
 Transforms a Vector4 by the given Matrix. More...
 
static Vector4 Transform (Vector2 value, Quaternion rotation)
 Transforms a Vector2 by a specified Quaternion into a Vector4. More...
 
static void Transform (ref Vector2 value, ref Quaternion rotation, out Vector4 result)
 Transforms a Vector2 by a specified Quaternion into a Vector4. More...
 
static Vector4 Transform (Vector3 value, Quaternion rotation)
 Transforms a Vector3 by a specified Quaternion into a Vector4. More...
 
static void Transform (ref Vector3 value, ref Quaternion rotation, out Vector4 result)
 Transforms a Vector3 by a specified Quaternion into a Vector4. More...
 
static Vector4 Transform (Vector4 value, Quaternion rotation)
 Transforms a Vector4 by a specified Quaternion. More...
 
static void Transform (ref Vector4 value, ref Quaternion rotation, out Vector4 result)
 Transforms a Vector4 by a specified Quaternion. More...
 
static void Transform (Vector4[] sourceArray, ref Matrix matrix, Vector4[] destinationArray)
 Transforms an array of Vector4s by a specified Matrix. More...
 
static void Transform (Vector4[] sourceArray, int sourceIndex, ref Matrix matrix, Vector4[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of Vector4s by a specified Matrix into a specified range in a destination array. More...
 
static void Transform (Vector4[] sourceArray, ref Quaternion rotation, Vector4[] destinationArray)
 Transforms an array of Vector4s by a specified Quaternion. More...
 
static void Transform (Vector4[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector4[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of Vector4s by a specified Quaternion into a specified range in a destination array. More...
 
static Vector4 Negate (Vector4 value)
 Returns a vector pointing in the opposite direction. More...
 
static void Negate (ref Vector4 value, out Vector4 result)
 Returns a vector pointing in the opposite direction. More...
 
static Vector4 Add (Vector4 value1, Vector4 value2)
 Adds two vectors. More...
 
static void Add (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Adds two vectors. More...
 
static Vector4 Subtract (Vector4 value1, Vector4 value2)
 Subtracts a vector from a vector. More...
 
static void Subtract (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Subtracts a vector from a vector. More...
 
static Vector4 Multiply (Vector4 value1, Vector4 value2)
 Multiplies the components of two vectors by each other. More...
 
static void Multiply (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Multiplies the components of two vectors by each other. More...
 
static Vector4 Multiply (Vector4 value1, float scaleFactor)
 Multiplies a vector by a scalar. More...
 
static void Multiply (ref Vector4 value1, float scaleFactor, out Vector4 result)
 Multiplies a vector by a scalar value. More...
 
static Vector4 Divide (Vector4 value1, Vector4 value2)
 Divides the components of a vector by the components of another vector. More...
 
static void Divide (ref Vector4 value1, ref Vector4 value2, out Vector4 result)
 Divides the components of a vector by the components of another vector. More...
 
static Vector4 Divide (Vector4 value1, float divider)
 Divides a vector by a scalar value. More...
 
static void Divide (ref Vector4 value1, float divider, out Vector4 result)
 Divides a vector by a scalar value. More...
 

Public Attributes

float X
 Gets or sets the x-component of the vector. More...
 
float Y
 Gets or sets the y-component of the vector. More...
 
float Z
 Gets or sets the z-component of the vector. More...
 
float W
 Gets or sets the w-component of the vector. More...
 

Static Public Attributes

static Vector4 Zero = new Vector4()
 
static Vector4 One = new Vector4(1f, 1f, 1f, 1f)
 
static Vector4 UnitX = new Vector4(1f, 0.0f, 0.0f, 0.0f)
 
static Vector4 UnitY = new Vector4(0.0f, 1f, 0.0f, 0.0f)
 
static Vector4 UnitZ = new Vector4(0.0f, 0.0f, 1f, 0.0f)
 
static Vector4 UnitW = new Vector4(0.0f, 0.0f, 0.0f, 1f)
 

Properties

float this[int index] [get, set]
 

Detailed Description

Defines a vector with four components.

Definition at line 15 of file Vector4.cs.

Constructor & Destructor Documentation

static VRageMath.Vector4.Vector4 ( )
inlinestatic

Definition at line 47 of file Vector4.cs.

VRageMath.Vector4.Vector4 ( float  x,
float  y,
float  z,
float  w 
)
inline

Initializes a new instance of Vector4.

Parameters
xInitial value for the x-component of the vector.
yInitial value for the y-component of the vector.
zInitial value for the z-component of the vector.
wInitial value for the w-component of the vector.

Definition at line 55 of file Vector4.cs.

VRageMath.Vector4.Vector4 ( Vector2  value,
float  z,
float  w 
)
inline

Initializes a new instance of Vector4.

Parameters
valueA vector containing the values to initialize x and y components with.
zInitial value for the z-component of the vector.
wInitial value for the w-component of the vector.

Definition at line 67 of file Vector4.cs.

VRageMath.Vector4.Vector4 ( Vector3  value,
float  w 
)
inline

Initializes a new instance of Vector4.

Parameters
valueA vector containing the values to initialize x, y, and z components with.
wInitial value for the w-component of the vector.

Definition at line 79 of file Vector4.cs.

VRageMath.Vector4.Vector4 ( float  value)
inline

Creates a new instance of Vector4.

Parameters
valueValue to initialize each component to.

Definition at line 91 of file Vector4.cs.

Member Function Documentation

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1110 of file Vector4.cs.

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

Adds two vectors.

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

Definition at line 1124 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Barycentric ( Vector4  value1,
Vector4  value2,
Vector4  value3,
float  amount1,
float  amount2 
)
inlinestatic

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

Parameters
value1A Vector4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.
value2A Vector4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.
value3A Vector4 containing the 4D 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 567 of file Vector4.cs.

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

Returns a Vector4 containing the 4D Cartesian coordinates of a point specified in Barycentric (areal) coordinates relative to a 4D triangle.

Parameters
value1A Vector4 containing the 4D Cartesian coordinates of vertex 1 of the triangle.
value2A Vector4 containing the 4D Cartesian coordinates of vertex 2 of the triangle.
value3A Vector4 containing the 4D 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 4D Cartesian coordinates of the specified point are placed in this Vector4 on exit.

Definition at line 581 of file Vector4.cs.

static Vector4 VRageMath.Vector4.CatmullRom ( Vector4  value1,
Vector4  value2,
Vector4  value3,
Vector4  value4,
float  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 623 of file Vector4.cs.

static void VRageMath.Vector4.CatmullRom ( ref Vector4  value1,
ref Vector4  value2,
ref Vector4  value3,
ref Vector4  value4,
float  amount,
out Vector4  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 639 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Clamp ( Vector4  value1,
Vector4  min,
Vector4  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 491 of file Vector4.cs.

static void VRageMath.Vector4.Clamp ( ref Vector4  value1,
ref Vector4  min,
ref Vector4  max,
out Vector4  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 517 of file Vector4.cs.

static float VRageMath.Vector4.Distance ( Vector4  value1,
Vector4  value2 
)
inlinestatic

Calculates the distance between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 328 of file Vector4.cs.

static void VRageMath.Vector4.Distance ( ref Vector4  value1,
ref Vector4  value2,
out float  result 
)
inlinestatic

Calculates the distance between two vectors.

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

Definition at line 341 of file Vector4.cs.

static float VRageMath.Vector4.DistanceSquared ( Vector4  value1,
Vector4  value2 
)
inlinestatic

Calculates the distance between two vectors squared.

Parameters
value1Source vector.
value2Source vector.

Definition at line 355 of file Vector4.cs.

static void VRageMath.Vector4.DistanceSquared ( ref Vector4  value1,
ref Vector4  value2,
out float  result 
)
inlinestatic

Calculates the distance between two vectors squared.

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

Definition at line 368 of file Vector4.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 1214 of file Vector4.cs.

static void VRageMath.Vector4.Divide ( ref Vector4  value1,
ref Vector4  value2,
out Vector4  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 1228 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Divide ( Vector4  value1,
float  divider 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 1240 of file Vector4.cs.

static void VRageMath.Vector4.Divide ( ref Vector4  value1,
float  divider,
out Vector4  result 
)
inlinestatic

Divides a vector by a scalar value.

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

Definition at line 1255 of file Vector4.cs.

static float VRageMath.Vector4.Dot ( Vector4  vector1,
Vector4  vector2 
)
inlinestatic

Calculates the dot product of two vectors.

Parameters
vector1Source vector.
vector2Source vector.

Definition at line 381 of file Vector4.cs.

static void VRageMath.Vector4.Dot ( ref Vector4  vector1,
ref Vector4  vector2,
out float  result 
)
inlinestatic

Calculates the dot product of two vectors.

Parameters
vector1Source vector.
vector2Source vector.
result[OutAttribute] The dot product of the two vectors.

Definition at line 390 of file Vector4.cs.

bool VRageMath.Vector4.Equals ( Vector4  other)
inline

Determines whether the specified Object is equal to the Vector4.

Parameters
otherThe Vector4 to compare with the current Vector4.

Definition at line 280 of file Vector4.cs.

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

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

Parameters
objObject with which to make the comparison.

Definition at line 292 of file Vector4.cs.

override int VRageMath.Vector4.GetHashCode ( )
inline

Gets the hash code of this object.

Definition at line 303 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Hermite ( Vector4  value1,
Vector4  tangent1,
Vector4  value2,
Vector4  tangent2,
float  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 653 of file Vector4.cs.

static void VRageMath.Vector4.Hermite ( ref Vector4  value1,
ref Vector4  tangent1,
ref Vector4  value2,
ref Vector4  tangent2,
float  amount,
out Vector4  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 673 of file Vector4.cs.

float VRageMath.Vector4.Length ( )
inline

Calculates the length of the vector.

Definition at line 311 of file Vector4.cs.

float VRageMath.Vector4.LengthSquared ( )
inline

Calculates the length of the vector squared.

Definition at line 319 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Lerp ( Vector4  value1,
Vector4  value2,
float  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 541 of file Vector4.cs.

static void VRageMath.Vector4.Lerp ( ref Vector4  value1,
ref Vector4  value2,
float  amount,
out Vector4  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 555 of file Vector4.cs.

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

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

Parameters
value1Source vector.
value2Source vector.

Definition at line 465 of file Vector4.cs.

static void VRageMath.Vector4.Max ( ref Vector4  value1,
ref Vector4  value2,
out Vector4  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 479 of file Vector4.cs.

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

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

Parameters
value1Source vector.
value2Source vector.

Definition at line 439 of file Vector4.cs.

static void VRageMath.Vector4.Min ( ref Vector4  value1,
ref Vector4  value2,
out Vector4  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 453 of file Vector4.cs.

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

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1162 of file Vector4.cs.

static void VRageMath.Vector4.Multiply ( ref Vector4  value1,
ref Vector4  value2,
out Vector4  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 1176 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Multiply ( Vector4  value1,
float  scaleFactor 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 1188 of file Vector4.cs.

static void VRageMath.Vector4.Multiply ( ref Vector4  value1,
float  scaleFactor,
out Vector4  result 
)
inlinestatic

Multiplies a vector by a scalar value.

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

Definition at line 1202 of file Vector4.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 1084 of file Vector4.cs.

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

Returns a vector pointing in the opposite direction.

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

Definition at line 1098 of file Vector4.cs.

void VRageMath.Vector4.Normalize ( )
inline

Turns the current vector into a unit vector.

Definition at line 398 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Normalize ( Vector4  vector)
inlinestatic

Creates a unit vector from the specified vector.

Parameters
vectorThe source Vector4.

Definition at line 411 of file Vector4.cs.

static void VRageMath.Vector4.Normalize ( ref Vector4  vector,
out Vector4  result 
)
inlinestatic

Returns a normalized version of the specified vector.

Parameters
vectorSource vector.
result[OutAttribute] The normalized vector.

Definition at line 426 of file Vector4.cs.

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

Tests vectors for inequality.

Parameters
value1Vector to compare.
value2Vector to compare.

Definition at line 126 of file Vector4.cs.

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

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 166 of file Vector4.cs.

static Vector4 VRageMath.Vector4.operator* ( Vector4  value1,
float  scaleFactor 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 180 of file Vector4.cs.

static Vector4 VRageMath.Vector4.operator* ( float  scaleFactor,
Vector4  value1 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
scaleFactorScalar value.
value1Source vector.

Definition at line 194 of file Vector4.cs.

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 138 of file Vector4.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 100 of file Vector4.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 152 of file Vector4.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 208 of file Vector4.cs.

static Vector4 VRageMath.Vector4.operator/ ( Vector4  value1,
float  divider 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 222 of file Vector4.cs.

static Vector4 VRageMath.Vector4.operator/ ( float  lhs,
Vector4  rhs 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 237 of file Vector4.cs.

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

Tests vectors for equality.

Parameters
value1Source vector.
value2Source vector.

Definition at line 114 of file Vector4.cs.

static Vector4 VRageMath.Vector4.PackOrthoMatrix ( Vector3  position,
Vector3  forward,
Vector3  up 
)
inlinestatic

Definition at line 247 of file Vector4.cs.

static Vector4 VRageMath.Vector4.PackOrthoMatrix ( ref Matrix  matrix)
inlinestatic

Definition at line 254 of file Vector4.cs.

static Vector4 VRageMath.Vector4.SmoothStep ( Vector4  value1,
Vector4  value2,
float  amount 
)
inlinestatic

Interpolates between two values using a cubic equation.

Parameters
value1Source value.
value2Source value.
amountWeighting value.

Definition at line 593 of file Vector4.cs.

static void VRageMath.Vector4.SmoothStep ( ref Vector4  value1,
ref Vector4  value2,
float  amount,
out Vector4  result 
)
inlinestatic

Interpolates between two values using a cubic equation.

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

Definition at line 609 of file Vector4.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1136 of file Vector4.cs.

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

Subtracts a vector from a vector.

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

Definition at line 1150 of file Vector4.cs.

override string VRageMath.Vector4.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 270 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Transform ( Vector2  position,
Matrix  matrix 
)
inlinestatic

Transforms a Vector2 by the given Matrix.

Parameters
positionThe source Vector2.
matrixThe transformation Matrix.

Definition at line 691 of file Vector4.cs.

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

Transforms a Vector2 by the given Matrix.

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

Definition at line 709 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Transform ( Vector3  position,
Matrix  matrix 
)
inlinestatic

Transforms a Vector3 by the given Matrix.

Parameters
positionThe source Vector3.
matrixThe transformation Matrix.

Definition at line 725 of file Vector4.cs.

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

Transforms a Vector3 by the given Matrix.

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

Definition at line 743 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Transform ( Vector4  vector,
Matrix  matrix 
)
inlinestatic

Transforms a Vector4 by the specified Matrix.

Parameters
vectorThe source Vector4.
matrixThe transformation Matrix.

Definition at line 759 of file Vector4.cs.

static void VRageMath.Vector4.Transform ( ref Vector4  vector,
ref Matrix  matrix,
out Vector4  result 
)
inlinestatic

Transforms a Vector4 by the given Matrix.

Parameters
vectorThe source Vector4.
matrixThe transformation Matrix.
result[OutAttribute] The Vector4 resulting from the transformation.

Definition at line 777 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Transform ( Vector2  value,
Quaternion  rotation 
)
inlinestatic

Transforms a Vector2 by a specified Quaternion into a Vector4.

Parameters
valueThe Vector2 to transform.
rotationThe Quaternion rotation to apply.

Definition at line 793 of file Vector4.cs.

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

Transforms a Vector2 by a specified Quaternion into a Vector4.

Parameters
valueThe Vector2 to transform.
rotationThe Quaternion rotation to apply.
result[OutAttribute] The Vector4 resulting from the transformation.

Definition at line 822 of file Vector4.cs.

static Vector4 VRageMath.Vector4.Transform ( Vector3  value,
Quaternion  rotation 
)
inlinestatic

Transforms a Vector3 by a specified Quaternion into a Vector4.

Parameters
valueThe Vector3 to transform.
rotationThe Quaternion rotation to apply.

Definition at line 849 of file Vector4.cs.

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

Transforms a Vector3 by a specified Quaternion into a Vector4.

Parameters
valueThe Vector3 to transform.
rotationThe Quaternion rotation to apply.
result[OutAttribute] The Vector4 resulting from the transformation.

Definition at line 878 of file Vector4.cs.

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

Transforms a Vector4 by a specified Quaternion.

Parameters
valueThe Vector4 to transform.
rotationThe Quaternion rotation to apply.

Definition at line 905 of file Vector4.cs.

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

Transforms a Vector4 by a specified Quaternion.

Parameters
valueThe Vector4 to transform.
rotationThe Quaternion rotation to apply.
result[OutAttribute] The Vector4 resulting from the transformation.

Definition at line 934 of file Vector4.cs.

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

Transforms an array of Vector4s by a specified Matrix.

Parameters
sourceArrayThe array of Vector4s to transform.
matrixThe transform Matrix to apply.
destinationArrayThe existing destination array into which the transformed Vector4s are written.

Definition at line 961 of file Vector4.cs.

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

Transforms a specified range in an array of Vector4s by a specified Matrix into a specified range in a destination array.

Parameters
sourceArrayThe array of Vector4s containing the range to transform.
sourceIndexThe index in the source array of the first Vector4 to transform.
matrixThe transform Matrix to apply.
destinationArrayThe existing destination array of Vector4s into which to write the results.
destinationIndexThe index in the destination array of the first result Vector4 to write.
lengthThe number of Vector4s to transform.

Definition at line 980 of file Vector4.cs.

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

Transforms an array of Vector4s by a specified Quaternion.

Parameters
sourceArrayThe array of Vector4s to transform.
rotationThe Quaternion rotation to apply.
destinationArrayThe existing destination array into which the transformed Vector4s are written.

Definition at line 1001 of file Vector4.cs.

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

Transforms a specified range in an array of Vector4s by a specified Quaternion into a specified range in a destination array.

Parameters
sourceArrayThe array of Vector4s containing the range to transform.
sourceIndexThe index in the source array of the first Vector4 to transform.
rotationThe Quaternion rotation to apply.
destinationArrayThe existing destination array of Vector4s into which to write the results.
destinationIndexThe index in the destination array of the first result Vector4 to write.
lengthThe number of Vector4s to transform.

Definition at line 1041 of file Vector4.cs.

static Matrix VRageMath.Vector4.UnpackOrthoMatrix ( ref Vector4  packed)
inlinestatic

Definition at line 261 of file Vector4.cs.

Member Data Documentation

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

Definition at line 21 of file Vector4.cs.

Vector4 VRageMath.Vector4.UnitW = new Vector4(0.0f, 0.0f, 0.0f, 1f)
static

Definition at line 25 of file Vector4.cs.

Vector4 VRageMath.Vector4.UnitX = new Vector4(1f, 0.0f, 0.0f, 0.0f)
static

Definition at line 22 of file Vector4.cs.

Vector4 VRageMath.Vector4.UnitY = new Vector4(0.0f, 1f, 0.0f, 0.0f)
static

Definition at line 23 of file Vector4.cs.

Vector4 VRageMath.Vector4.UnitZ = new Vector4(0.0f, 0.0f, 1f, 0.0f)
static

Definition at line 24 of file Vector4.cs.

float VRageMath.Vector4.W

Gets or sets the w-component of the vector.

Definition at line 45 of file Vector4.cs.

float VRageMath.Vector4.X

Gets or sets the x-component of the vector.

Definition at line 30 of file Vector4.cs.

float VRageMath.Vector4.Y

Gets or sets the y-component of the vector.

Definition at line 35 of file Vector4.cs.

float VRageMath.Vector4.Z

Gets or sets the z-component of the vector.

Definition at line 40 of file Vector4.cs.

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

Definition at line 20 of file Vector4.cs.

Property Documentation

float VRageMath.Vector4.this[int index]
getset

Definition at line 1265 of file Vector4.cs.


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