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

Defines a vector with four components. More...

Inheritance diagram for VRageMath.Vector4D:

Public Member Functions

 Vector4D (double x, double y, double z, double w)
 Initializes a new instance of Vector4. More...
 
 Vector4D (Vector2 value, double z, double w)
 Initializes a new instance of Vector4. More...
 
 Vector4D (Vector3D value, double w)
 Initializes a new instance of Vector4. More...
 
 Vector4D (double 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...
 
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. More...
 

Static Public Member Functions

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

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...
 
double Z
 Gets or sets the z-component of the vector. More...
 
double W
 Gets or sets the w-component of the vector. More...
 

Static Public Attributes

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

Detailed Description

Defines a vector with four components.

Definition at line 10 of file Vector4D.cs.

Constructor & Destructor Documentation

static VRageMath.Vector4D.Vector4D ( )
inlinestatic

Definition at line 39 of file Vector4D.cs.

VRageMath.Vector4D.Vector4D ( double  x,
double  y,
double  z,
double  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 47 of file Vector4D.cs.

VRageMath.Vector4D.Vector4D ( Vector2  value,
double  z,
double  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 59 of file Vector4D.cs.

VRageMath.Vector4D.Vector4D ( Vector3D  value,
double  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 71 of file Vector4D.cs.

VRageMath.Vector4D.Vector4D ( double  value)
inline

Creates a new instance of Vector4.

Parameters
valueValue to initialize each component to.

Definition at line 83 of file Vector4D.cs.

Member Function Documentation

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1102 of file Vector4D.cs.

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

Adds two vectors.

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

Definition at line 1116 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Barycentric ( Vector4D  value1,
Vector4D  value2,
Vector4D  value3,
double  amount1,
double  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 559 of file Vector4D.cs.

static void VRageMath.Vector4D.Barycentric ( ref Vector4D  value1,
ref Vector4D  value2,
ref Vector4D  value3,
double  amount1,
double  amount2,
out Vector4D  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 573 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.CatmullRom ( Vector4D  value1,
Vector4D  value2,
Vector4D  value3,
Vector4D  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 615 of file Vector4D.cs.

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

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

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

static double VRageMath.Vector4D.Distance ( Vector4  value1,
Vector4  value2 
)
inlinestatic

Calculates the distance between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 320 of file Vector4D.cs.

static void VRageMath.Vector4D.Distance ( ref Vector4  value1,
ref Vector4  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 333 of file Vector4D.cs.

static double VRageMath.Vector4D.DistanceSquared ( Vector4  value1,
Vector4  value2 
)
inlinestatic

Calculates the distance between two vectors squared.

Parameters
value1Source vector.
value2Source vector.

Definition at line 347 of file Vector4D.cs.

static void VRageMath.Vector4D.DistanceSquared ( ref Vector4  value1,
ref Vector4  value2,
out double  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 360 of file Vector4D.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 1206 of file Vector4D.cs.

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

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

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 1232 of file Vector4D.cs.

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

Divides a vector by a scalar value.

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

Definition at line 1247 of file Vector4D.cs.

static double VRageMath.Vector4D.Dot ( Vector4  vector1,
Vector4  vector2 
)
inlinestatic

Calculates the dot product of two vectors.

Parameters
vector1Source vector.
vector2Source vector.

Definition at line 373 of file Vector4D.cs.

static void VRageMath.Vector4D.Dot ( ref Vector4  vector1,
ref Vector4  vector2,
out double  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 382 of file Vector4D.cs.

bool VRageMath.Vector4D.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 272 of file Vector4D.cs.

override bool VRageMath.Vector4D.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 284 of file Vector4D.cs.

override int VRageMath.Vector4D.GetHashCode ( )
inline

Gets the hash code of this object.

Definition at line 295 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Hermite ( Vector4D  value1,
Vector4D  tangent1,
Vector4D  value2,
Vector4D  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 645 of file Vector4D.cs.

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

double VRageMath.Vector4D.Length ( )
inline

Calculates the length of the vector.

Definition at line 303 of file Vector4D.cs.

double VRageMath.Vector4D.LengthSquared ( )
inline

Calculates the length of the vector squared.

Definition at line 311 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Lerp ( Vector4D  value1,
Vector4D  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 533 of file Vector4D.cs.

static void VRageMath.Vector4D.Lerp ( ref Vector4D  value1,
ref Vector4D  value2,
double  amount,
out Vector4D  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 547 of file Vector4D.cs.

static Vector4 VRageMath.Vector4D.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 457 of file Vector4D.cs.

static void VRageMath.Vector4D.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 471 of file Vector4D.cs.

static Vector4 VRageMath.Vector4D.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 431 of file Vector4D.cs.

static void VRageMath.Vector4D.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 445 of file Vector4D.cs.

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

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1154 of file Vector4D.cs.

static void VRageMath.Vector4D.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 1168 of file Vector4D.cs.

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

Multiplies a vector by a scalar.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 1180 of file Vector4D.cs.

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

Multiplies a vector by a scalar value.

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

Definition at line 1194 of file Vector4D.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 1076 of file Vector4D.cs.

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

Returns a vector pointing in the opposite direction.

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

Definition at line 1090 of file Vector4D.cs.

void VRageMath.Vector4D.Normalize ( )
inline

Turns the current vector into a unit vector.

Definition at line 390 of file Vector4D.cs.

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

Creates a unit vector from the specified vector.

Parameters
vectorThe source Vector4.

Definition at line 403 of file Vector4D.cs.

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

Returns a normalized version of the specified vector.

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

Definition at line 418 of file Vector4D.cs.

static implicit VRageMath.Vector4D.operator Vector4 ( Vector4D  v)
inlinestatic

Definition at line 1256 of file Vector4D.cs.

static implicit VRageMath.Vector4D.operator Vector4D ( Vector4  v)
inlinestatic

Definition at line 1261 of file Vector4D.cs.

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

Tests vectors for inequality.

Parameters
value1Vector to compare.
value2Vector to compare.

Definition at line 118 of file Vector4D.cs.

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

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 158 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.operator* ( Vector4D  value1,
double  scaleFactor 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 172 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.operator* ( double  scaleFactor,
Vector4D  value1 
)
inlinestatic

Multiplies a vector by a scalar.

Parameters
scaleFactorScalar value.
value1Source vector.

Definition at line 186 of file Vector4D.cs.

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 130 of file Vector4D.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 92 of file Vector4D.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 144 of file Vector4D.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 200 of file Vector4D.cs.

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

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 214 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.operator/ ( double  lhs,
Vector4D  rhs 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
dividerThe divisor.

Definition at line 229 of file Vector4D.cs.

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

Tests vectors for equality.

Parameters
value1Source vector.
value2Source vector.

Definition at line 106 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.PackOrthoMatrix ( Vector3D  position,
Vector3D  forward,
Vector3D  up 
)
inlinestatic

Definition at line 239 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.PackOrthoMatrix ( ref MatrixD  matrix)
inlinestatic

Definition at line 246 of file Vector4D.cs.

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

Interpolates between two values using a cubic equation.

Parameters
value1Source value.
value2Source value.
amountWeighting value.

Definition at line 585 of file Vector4D.cs.

static void VRageMath.Vector4D.SmoothStep ( ref Vector4D  value1,
ref Vector4D  value2,
double  amount,
out Vector4D  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 601 of file Vector4D.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1128 of file Vector4D.cs.

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

Subtracts a vector from a vector.

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

Definition at line 1142 of file Vector4D.cs.

override string VRageMath.Vector4D.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 262 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Transform ( Vector2  position,
MatrixD  matrix 
)
inlinestatic

Transforms a Vector2 by the given Matrix.

Parameters
positionThe source Vector2.
matrixThe transformation Matrix.

Definition at line 683 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector2  position,
ref MatrixD  matrix,
out Vector4D  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 701 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Transform ( Vector3D  position,
MatrixD  matrix 
)
inlinestatic

Transforms a Vector3 by the given Matrix.

Parameters
positionThe source Vector3.
matrixThe transformation Matrix.

Definition at line 717 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector3D  position,
ref MatrixD  matrix,
out Vector4D  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 735 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Transform ( Vector4D  vector,
MatrixD  matrix 
)
inlinestatic

Transforms a Vector4 by the specified Matrix.

Parameters
vectorThe source Vector4.
matrixThe transformation Matrix.

Definition at line 751 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector4D  vector,
ref MatrixD  matrix,
out Vector4D  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 769 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.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 785 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector2  value,
ref Quaternion  rotation,
out Vector4D  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 814 of file Vector4D.cs.

static Vector4D VRageMath.Vector4D.Transform ( Vector3D  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 841 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector3D  value,
ref Quaternion  rotation,
out Vector4D  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 870 of file Vector4D.cs.

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

Transforms a Vector4 by a specified Quaternion.

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

Definition at line 897 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( ref Vector4D  value,
ref Quaternion  rotation,
out Vector4D  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 926 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( Vector4D[]  sourceArray,
ref MatrixD  matrix,
Vector4D[]  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 953 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( Vector4D[]  sourceArray,
int  sourceIndex,
ref MatrixD  matrix,
Vector4D[]  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 972 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( Vector4D[]  sourceArray,
ref Quaternion  rotation,
Vector4D[]  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 993 of file Vector4D.cs.

static void VRageMath.Vector4D.Transform ( Vector4D[]  sourceArray,
int  sourceIndex,
ref Quaternion  rotation,
Vector4D[]  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 1033 of file Vector4D.cs.

static MatrixD VRageMath.Vector4D.UnpackOrthoMatrix ( ref Vector4D  packed)
inlinestatic

Definition at line 253 of file Vector4D.cs.

Member Data Documentation

Vector4D VRageMath.Vector4D.One = new Vector4D(1, 1, 1, 1)
static

Definition at line 13 of file Vector4D.cs.

Vector4D VRageMath.Vector4D.UnitW = new Vector4D(0.0, 0.0, 0.0, 1)
static

Definition at line 17 of file Vector4D.cs.

Vector4D VRageMath.Vector4D.UnitX = new Vector4D(1, 0.0, 0.0, 0.0)
static

Definition at line 14 of file Vector4D.cs.

Vector4D VRageMath.Vector4D.UnitY = new Vector4D(0.0, 1, 0.0, 0.0)
static

Definition at line 15 of file Vector4D.cs.

Vector4D VRageMath.Vector4D.UnitZ = new Vector4D(0.0, 0.0, 1, 0.0)
static

Definition at line 16 of file Vector4D.cs.

double VRageMath.Vector4D.W

Gets or sets the w-component of the vector.

Definition at line 37 of file Vector4D.cs.

double VRageMath.Vector4D.X

Gets or sets the x-component of the vector.

Definition at line 22 of file Vector4D.cs.

double VRageMath.Vector4D.Y

Gets or sets the y-component of the vector.

Definition at line 27 of file Vector4D.cs.

double VRageMath.Vector4D.Z

Gets or sets the z-component of the vector.

Definition at line 32 of file Vector4D.cs.

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

Definition at line 12 of file Vector4D.cs.


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