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

Defines a vector with three components. More...

Inheritance diagram for VRageMath.Vector3D:

Public Member Functions

 Vector3D (double x, double y, double z)
 Initializes a new instance of Vector3. More...
 
 Vector3D (double value)
 Creates a new instance of Vector3. More...
 
 Vector3D (Vector2 value, double z)
 Initializes a new instance of Vector3. More...
 
 Vector3D (Vector2D value, double z)
 
 Vector3D (Vector4 xyz)
 
 Vector3D (Vector4D xyz)
 
 Vector3D (Vector3 value)
 
 Vector3D (ref Vector3I value)
 
 Vector3D (Vector3I value)
 
void Interpolate3 (Vector3D v0, Vector3D v1, double rt)
 
bool IsValid ()
 
void AssertIsValid ()
 
override string ToString ()
 Retrieves a string representation of the current object. More...
 
string ToString (string format)
 
bool Equals (Vector3D other)
 Determines whether the specified Object is equal to the Vector3. More...
 
bool Equals (Vector3D other, double epsilon)
 
override bool Equals (object obj)
 Returns a value that indicates whether the current instance is equal to a specified object. More...
 
override int GetHashCode ()
 
long GetHash ()
 Gets the hash code of the vector object. More...
 
double Length ()
 Calculates the length of the vector. More...
 
double LengthSquared ()
 Calculates the length of the vector squared. More...
 
double Dot (Vector3D v)
 
double Dot (Vector3 v)
 
double Dot (ref Vector3D v)
 
Vector3D Cross (Vector3D v)
 
double 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...
 
double Min ()
 Returns the component of the vector that is smallest of all the three components. More...
 
double AbsMin ()
 Returns the component of the vector, whose absolute value is smallest of all the three components. More...
 
double Max ()
 Returns the component of the vector that is largest of all the three components. More...
 
double AbsMax ()
 Returns the component of the vector, whose absolute value is largest of all the three components. More...
 
int AbsMaxComponent ()
 
void CalculatePerpendicularVector (out Vector3D result)
 
long VolumeInt (double multiplier)
 
bool IsInsideInclusive (ref Vector3D min, ref Vector3D max)
 
double GetDim (int i)
 
void SetDim (int i, double value)
 

Static Public Member Functions

static Vector3D ()
 
static Vector3D operator- (Vector3D value)
 Returns a vector pointing in the opposite direction. More...
 
static bool operator== (Vector3D value1, Vector3D value2)
 Tests vectors for equality. More...
 
static bool operator== (Vector3 value1, Vector3D value2)
 
static bool operator== (Vector3D value1, Vector3 value2)
 
static bool operator!= (Vector3D value1, Vector3D value2)
 Tests vectors for inequality. More...
 
static bool operator!= (Vector3 value1, Vector3D value2)
 
static bool operator!= (Vector3D value1, Vector3 value2)
 
static Vector3D operator% (Vector3D value1, double value2)
 
static Vector3D operator% (Vector3D value1, Vector3D value2)
 Modulo division of two vectors. More...
 
static Vector3D operator+ (Vector3D value1, Vector3D value2)
 Adds two vectors. More...
 
static Vector3D operator+ (Vector3D value1, Vector3 value2)
 
static Vector3D operator+ (Vector3 value1, Vector3D value2)
 
static Vector3D operator+ (Vector3D value1, Vector3I value2)
 
static Vector3D operator+ (Vector3D value1, double value2)
 
static Vector3D operator+ (Vector3D value1, float value2)
 
static Vector3D operator- (Vector3D value1, Vector3D value2)
 Subtracts a vector from a vector. More...
 
static Vector3D operator- (Vector3D value1, Vector3 value2)
 
static Vector3D operator- (Vector3 value1, Vector3D value2)
 
static Vector3D operator- (Vector3D value1, double value2)
 
static Vector3D operator* (Vector3D value1, Vector3 value2)
 Multiplies the components of two vectors by each other. More...
 
static Vector3D operator* (Vector3D value, double scaleFactor)
 Multiplies a vector by a scalar value. More...
 
static Vector3D operator* (double scaleFactor, Vector3D value)
 Multiplies a vector by a scalar value. More...
 
static Vector3D operator/ (Vector3D value1, Vector3D value2)
 Divides the components of a vector by the components of another vector. More...
 
static Vector3D operator/ (Vector3D value, double divider)
 Divides a vector by a scalar value. More...
 
static Vector3D operator/ (double value, Vector3D divider)
 
static Vector3D Abs (Vector3D value)
 
static Vector3D Sign (Vector3D value)
 
static Vector3D SignNonZero (Vector3D value)
 Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign. More...
 
static bool IsUnit (ref Vector3D value)
 
static bool ArePerpendicular (ref Vector3D a, ref Vector3D b)
 
static bool IsZero (Vector3D value)
 
static bool IsZero (Vector3D value, double epsilon)
 
static Vector3D IsZeroVector (Vector3D value)
 
static Vector3D IsZeroVector (Vector3D value, double epsilon)
 
static Vector3D Step (Vector3D value)
 
static bool TryParse (string str, out Vector3D retval)
 
static double Distance (Vector3D value1, Vector3D value2)
 Calculates the distance between two vectors. More...
 
static double Distance (Vector3D value1, Vector3 value2)
 
static double Distance (Vector3 value1, Vector3D value2)
 
static void Distance (ref Vector3D value1, ref Vector3D value2, out double result)
 Calculates the distance between two vectors. More...
 
static double DistanceSquared (Vector3D value1, Vector3D value2)
 Calculates the distance between two vectors squared. More...
 
static void DistanceSquared (ref Vector3D value1, ref Vector3D value2, out double result)
 Calculates the distance between two vectors squared. More...
 
static double RectangularDistance (Vector3D value1, Vector3D value2)
 Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors. More...
 
static double RectangularDistance (ref Vector3D value1, ref Vector3D value2)
 Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors. More...
 
static double Dot (Vector3D vector1, Vector3D vector2)
 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 double Dot (Vector3D vector1, Vector3 vector2)
 
static void Dot (ref Vector3D vector1, ref Vector3D vector2, 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 void Dot (ref Vector3D vector1, ref Vector3 vector2, out double result)
 
static void Dot (ref Vector3 vector1, ref Vector3D vector2, out double result)
 
static Vector3D Normalize (Vector3D 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 Vector3D value, out Vector3D 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 Vector3D Cross (Vector3D vector1, Vector3D vector2)
 Calculates the cross product of two vectors. More...
 
static void Cross (ref Vector3D vector1, ref Vector3D vector2, out Vector3D result)
 Calculates the cross product of two vectors. More...
 
static Vector3D Reflect (Vector3D vector, Vector3D normal)
 Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample. More...
 
static void Reflect (ref Vector3D vector, ref Vector3D normal, out Vector3D result)
 Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample. More...
 
static Vector3D Reject (Vector3D vector, Vector3D direction)
 Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction More...
 
static void Reject (ref Vector3D vector, ref Vector3D direction, out Vector3D result)
 Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction More...
 
static Vector3D Min (Vector3D value1, Vector3D value2)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static void Min (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Returns a vector that contains the lowest value from each matching pair of components. More...
 
static Vector3D Max (Vector3D value1, Vector3D value2)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static void Max (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Returns a vector that contains the highest value from each matching pair of components. More...
 
static void MinMax (ref Vector3D min, ref Vector3D max)
 Separates minimal and maximal values of any two input vectors More...
 
static Vector3D DominantAxisProjection (Vector3D value1)
 Returns a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value. More...
 
static void DominantAxisProjection (ref Vector3D value1, out Vector3D result)
 Calculates a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value. The result is saved into a user-specified variable. More...
 
static Vector3D Clamp (Vector3D value1, Vector3D min, Vector3D max)
 Restricts a value to be within a specified range. More...
 
static void Clamp (ref Vector3D value1, ref Vector3D min, ref Vector3D max, out Vector3D result)
 Restricts a value to be within a specified range. More...
 
static Vector3D ClampToSphere (Vector3D vector, double radius)
 
static void ClampToSphere (ref Vector3D vector, double radius)
 
static Vector3D Lerp (Vector3D value1, Vector3D value2, double amount)
 Performs a linear interpolation between two vectors. More...
 
static void Lerp (ref Vector3D value1, ref Vector3D value2, double amount, out Vector3D result)
 Performs a linear interpolation between two vectors. More...
 
static Vector3D Barycentric (Vector3D value1, Vector3D value2, Vector3D value3, double amount1, double amount2)
 Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle. More...
 
static void Barycentric (ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, double amount1, double amount2, out Vector3D result)
 Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 3D triangle. More...
 
static void Barycentric (Vector3D p, Vector3D a, Vector3D b, Vector3D c, out double u, out double v, out double w)
 Compute barycentric coordinates (u, v, w) for point p with respect to triangle (a, b, c) From : Real-Time Collision Detection, Christer Ericson, CRC Press 3.4 Barycentric Coordinates More...
 
static Vector3D SmoothStep (Vector3D value1, Vector3D value2, double amount)
 Interpolates between two values using a cubic equation. More...
 
static void SmoothStep (ref Vector3D value1, ref Vector3D value2, double amount, out Vector3D result)
 Interpolates between two values using a cubic equation. More...
 
static Vector3D CatmullRom (Vector3D value1, Vector3D value2, Vector3D value3, Vector3D value4, double amount)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static void CatmullRom (ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, ref Vector3D value4, double amount, out Vector3D result)
 Performs a Catmull-Rom interpolation using the specified positions. More...
 
static Vector3D Hermite (Vector3D value1, Vector3D tangent1, Vector3D value2, Vector3D tangent2, double amount)
 Performs a Hermite spline interpolation. More...
 
static void Hermite (ref Vector3D value1, ref Vector3D tangent1, ref Vector3D value2, ref Vector3D tangent2, double amount, out Vector3D result)
 Performs a Hermite spline interpolation. More...
 
static Vector3D Transform (Vector3D position, MatrixD matrix)
 Transforms a 3D vector by the given matrix. More...
 
static Vector3D Transform (Vector3 position, MatrixD matrix)
 
static Vector3D Transform (Vector3D position, Matrix matrix)
 Transforms a 3D vector by the given matrix. More...
 
static Vector3D Transform (Vector3D position, ref MatrixD matrix)
 
static void Transform (ref Vector3D position, ref MatrixD matrix, out Vector3D result)
 Transforms a Vector3 by the given Matrix. More...
 
static void Transform (ref Vector3 position, ref MatrixD matrix, out Vector3D result)
 
static void TransformNoProjection (ref Vector3D vector, ref MatrixD matrix, out Vector3D result)
 
static void RotateAndScale (ref Vector3D vector, ref MatrixD matrix, out Vector3D result)
 
static void Transform (ref Vector3D position, ref MatrixI matrix, out Vector3D result)
 
static Vector3D TransformNormal (Vector3D normal, Matrix matrix)
 Transforms a 3D vector normal by a matrix. More...
 
static Vector3D TransformNormal (Vector3 normal, MatrixD matrix)
 Transforms a 3D vector normal by a matrix. More...
 
static Vector3D TransformNormal (Vector3D normal, MatrixD matrix)
 Transforms a 3D vector normal by a matrix. More...
 
static void TransformNormal (ref Vector3D normal, ref MatrixD matrix, out Vector3D result)
 Transforms a vector normal by a matrix. More...
 
static void TransformNormal (ref Vector3 normal, ref MatrixD matrix, out Vector3D result)
 
static void TransformNormal (ref Vector3D normal, ref MatrixI matrix, out Vector3D result)
 
static Vector3D TransformNormal (Vector3D normal, MyBlockOrientation orientation)
 
static void TransformNormal (ref Vector3D normal, MyBlockOrientation orientation, out Vector3D result)
 
static Vector3D TransformNormal (Vector3D normal, ref MatrixD matrix)
 
static Vector3D Transform (Vector3D value, Quaternion rotation)
 Transforms a Vector3 by a specified Quaternion rotation. More...
 
static void Transform (ref Vector3D value, ref Quaternion rotation, out Vector3D result)
 Transforms a Vector3 by a specified Quaternion rotation. More...
 
static void Rotate (ref Vector3D vector, ref MatrixD rotationMatrix, out Vector3D result)
 
static Vector3D Rotate (Vector3D vector, MatrixD rotationMatrix)
 
static void Transform (Vector3D[] sourceArray, ref MatrixD matrix, Vector3D[] destinationArray)
 Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array. More...
 
static unsafe void Transform (Vector3D[] sourceArray, ref MatrixD matrix, Vector3D *destinationArray)
 Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array. More...
 
static void Transform (Vector3D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3D[] destinationArray, int destinationIndex, int length)
 Applies a specified transform Matrix to a specified range of an array of Vector3s and writes the results into a specified range of a destination array. More...
 
static void TransformNormal (Vector3D[] sourceArray, ref Matrix matrix, Vector3D[] destinationArray)
 Transforms an array of 3D vector normals by a specified Matrix. More...
 
static unsafe void TransformNormal (Vector3D[] sourceArray, ref Matrix matrix, Vector3D *destinationArray)
 Transforms an array of 3D vector normals by a specified Matrix. More...
 
static void TransformNormal (Vector3D[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3D[] destinationArray, int destinationIndex, int length)
 Transforms a specified range in an array of 3D vector normals by a specified Matrix and writes the results to a specified range in a destination array. More...
 
static void Transform (Vector3D[] sourceArray, ref Quaternion rotation, Vector3D[] destinationArray)
 Transforms a source array of Vector3s by a specified Quaternion rotation and writes the results to an existing destination array. More...
 
static void Transform (Vector3D[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector3D[] destinationArray, int destinationIndex, int length)
 Applies a specified Quaternion rotation to a specified range of an array of Vector3s and writes the results into a specified range of a destination array. More...
 
static Vector3D Negate (Vector3D value)
 Returns a vector pointing in the opposite direction. More...
 
static void Negate (ref Vector3D value, out Vector3D result)
 Returns a vector pointing in the opposite direction. More...
 
static Vector3D Add (Vector3D value1, Vector3D value2)
 Adds two vectors. More...
 
static void Add (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Adds two vectors. More...
 
static Vector3D Subtract (Vector3D value1, Vector3D value2)
 Subtracts a vector from a vector. More...
 
static void Subtract (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Subtracts a vector from a vector. More...
 
static Vector3D Multiply (Vector3D value1, Vector3D value2)
 Multiplies the components of two vectors by each other. More...
 
static void Multiply (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Multiplies the components of two vectors by each other. More...
 
static Vector3D Multiply (Vector3D value1, double scaleFactor)
 Multiplies a vector by a scalar value. More...
 
static void Multiply (ref Vector3D value1, double scaleFactor, out Vector3D result)
 Multiplies a vector by a scalar value. More...
 
static Vector3D Divide (Vector3D value1, Vector3D value2)
 Divides the components of a vector by the components of another vector. More...
 
static void Divide (ref Vector3D value1, ref Vector3D value2, out Vector3D result)
 Divides the components of a vector by the components of another vector. More...
 
static Vector3D Divide (Vector3D value1, double value2)
 Divides a vector by a scalar value. More...
 
static void Divide (ref Vector3D value1, double value2, out Vector3D result)
 Divides a vector by a scalar value. More...
 
static Vector3D CalculatePerpendicularVector (Vector3D v)
 
static void GetAzimuthAndElevation (Vector3D v, out double azimuth, out double elevation)
 
static void CreateFromAzimuthAndElevation (double azimuth, double elevation, out Vector3D direction)
 
static Vector3D SwapYZCoordinates (Vector3D v)
 
static implicit operator Vector3 (Vector3D v)
 
static implicit operator Vector3D (Vector3 v)
 
static Vector3I Round (Vector3D vect3d)
 
static Vector3I Floor (Vector3D vect3d)
 
static void Fract (ref Vector3D o, out Vector3D r)
 
static Vector3D Round (Vector3D v, int numDecimals)
 
static void Abs (ref Vector3D vector3D, out Vector3D abs)
 

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...
 

Static Public Attributes

static Vector3D Zero = new Vector3D()
 
static Vector3D One = new Vector3D(1, 1, 1)
 
static Vector3D Half = new Vector3D(0.5, 0.5, 0.5)
 
static Vector3D PositiveInfinity = new Vector3D(double.PositiveInfinity)
 
static Vector3D NegativeInfinity = new Vector3D(double.NegativeInfinity)
 
static Vector3D UnitX = new Vector3D(1, 0.0, 0.0)
 
static Vector3D UnitY = new Vector3D(0.0, 1, 0.0)
 
static Vector3D UnitZ = new Vector3D(0.0, 0.0, 1)
 
static Vector3D Up = new Vector3D(0.0, 1, 0.0)
 
static Vector3D Down = new Vector3D(0.0, -1, 0.0)
 
static Vector3D Right = new Vector3D(1, 0.0, 0.0)
 
static Vector3D Left = new Vector3D(-1, 0.0, 0.0)
 
static Vector3D Forward = new Vector3D(0.0, 0.0, -1)
 
static Vector3D Backward = new Vector3D(0.0, 0.0, 1)
 
static Vector3D MaxValue = new Vector3D(double.MaxValue, double.MaxValue, double.MaxValue)
 
static Vector3D MinValue = new Vector3D(double.MinValue, double.MinValue, double.MinValue)
 

Properties

double Sum [get]
 
double Volume [get]
 

Detailed Description

Defines a vector with three components.

Definition at line 13 of file Vector3D.cs.

Constructor & Destructor Documentation

static VRageMath.Vector3D.Vector3D ( )
inlinestatic

Definition at line 48 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( double  x,
double  y,
double  z 
)
inline

Initializes a new instance of Vector3.

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.

Definition at line 56 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( double  value)
inline

Creates a new instance of Vector3.

Parameters
valueValue to initialize each component to.

Definition at line 67 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector2  value,
double  z 
)
inline

Initializes a new instance of Vector3.

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

Definition at line 76 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector2D  value,
double  z 
)
inline

Definition at line 83 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector4  xyz)
inline

Definition at line 90 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector4D  xyz)
inline

Definition at line 97 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector3  value)
inline

Definition at line 104 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( ref Vector3I  value)
inline

Definition at line 111 of file Vector3D.cs.

VRageMath.Vector3D.Vector3D ( Vector3I  value)
inline

Definition at line 118 of file Vector3D.cs.

Member Function Documentation

static Vector3D VRageMath.Vector3D.Abs ( Vector3D  value)
inlinestatic

Definition at line 389 of file Vector3D.cs.

static void VRageMath.Vector3D.Abs ( ref Vector3D  vector3D,
out Vector3D  abs 
)
inlinestatic

Definition at line 2157 of file Vector3D.cs.

double VRageMath.Vector3D.AbsMax ( )
inline

Returns the component of the vector, whose absolute value is largest of all the three components.

Definition at line 993 of file Vector3D.cs.

int VRageMath.Vector3D.AbsMaxComponent ( )
inline

Definition at line 1007 of file Vector3D.cs.

double VRageMath.Vector3D.AbsMin ( )
inline

Returns the component of the vector, whose absolute value is smallest of all the three components.

Definition at line 959 of file Vector3D.cs.

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1877 of file Vector3D.cs.

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

Adds two vectors.

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

Definition at line 1890 of file Vector3D.cs.

static bool VRageMath.Vector3D.ArePerpendicular ( ref Vector3D  a,
ref Vector3D  b 
)
inlinestatic

Definition at line 435 of file Vector3D.cs.

void VRageMath.Vector3D.AssertIsValid ( )
inline

Definition at line 424 of file Vector3D.cs.

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

Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.

Parameters
value1A Vector3 containing the 3D Cartesian coordinates of vertex 1 of the triangle.
value2A Vector3 containing the 3D Cartesian coordinates of vertex 2 of the triangle.
value3A Vector3 containing the 3D 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 1243 of file Vector3D.cs.

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

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

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

Definition at line 1256 of file Vector3D.cs.

static void VRageMath.Vector3D.Barycentric ( Vector3D  p,
Vector3D  a,
Vector3D  b,
Vector3D  c,
out double  u,
out double  v,
out double  w 
)
inlinestatic

Compute barycentric coordinates (u, v, w) for point p with respect to triangle (a, b, c) From : Real-Time Collision Detection, Christer Ericson, CRC Press 3.4 Barycentric Coordinates

Definition at line 1268 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.CalculatePerpendicularVector ( Vector3D  v)
inlinestatic

Definition at line 2020 of file Vector3D.cs.

void VRageMath.Vector3D.CalculatePerpendicularVector ( out Vector3D  result)
inline

Definition at line 2028 of file Vector3D.cs.

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

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

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

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

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

Definition at line 1193 of file Vector3D.cs.

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

Definition at line 1205 of file Vector3D.cs.

static void VRageMath.Vector3D.CreateFromAzimuthAndElevation ( double  azimuth,
double  elevation,
out Vector3D  direction 
)
inlinestatic

Definition at line 2060 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Cross ( Vector3D  v)
inline

Definition at line 798 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Cross ( Vector3D  vector1,
Vector3D  vector2 
)
inlinestatic

Calculates the cross product of two vectors.

Parameters
vector1Source vector.
vector2Source vector.

Definition at line 847 of file Vector3D.cs.

static void VRageMath.Vector3D.Cross ( ref Vector3D  vector1,
ref Vector3D  vector2,
out Vector3D  result 
)
inlinestatic

Calculates the cross product of two vectors.

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

Definition at line 860 of file Vector3D.cs.

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

Calculates the distance between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 672 of file Vector3D.cs.

static double VRageMath.Vector3D.Distance ( Vector3D  value1,
Vector3  value2 
)
inlinestatic

Definition at line 680 of file Vector3D.cs.

static double VRageMath.Vector3D.Distance ( Vector3  value1,
Vector3D  value2 
)
inlinestatic

Definition at line 688 of file Vector3D.cs.

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

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

Calculates the distance between two vectors squared.

Parameters
value1Source vector.
value2Source vector.

Definition at line 712 of file Vector3D.cs.

static void VRageMath.Vector3D.DistanceSquared ( ref Vector3D  value1,
ref Vector3D  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 724 of file Vector3D.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 1973 of file Vector3D.cs.

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

static Vector3D VRageMath.Vector3D.Divide ( Vector3D  value1,
double  value2 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
value1Source vector.
value2The divisor.

Definition at line 1997 of file Vector3D.cs.

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

Divides a vector by a scalar value.

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

Definition at line 2011 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.DominantAxisProjection ( Vector3D  value1)
inlinestatic

Returns a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value.

Parameters
value1Source vector.

Definition at line 1106 of file Vector3D.cs.

static void VRageMath.Vector3D.DominantAxisProjection ( ref Vector3D  value1,
out Vector3D  result 
)
inlinestatic

Calculates a vector that is equal to the projection of the input vector to the coordinate axis that corresponds to the original vector's largest value. The result is saved into a user-specified variable.

Parameters
value1Source vector.
result[OutAttribute] The projected vector.

Definition at line 1132 of file Vector3D.cs.

static double VRageMath.Vector3D.Dot ( Vector3D  vector1,
Vector3D  vector2 
)
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
vector1Source vector.
vector2Source vector.

Definition at line 756 of file Vector3D.cs.

static double VRageMath.Vector3D.Dot ( Vector3D  vector1,
Vector3  vector2 
)
inlinestatic

Definition at line 760 of file Vector3D.cs.

static void VRageMath.Vector3D.Dot ( ref Vector3D  vector1,
ref Vector3D  vector2,
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
vector1Source vector.
vector2Source vector.
result[OutAttribute] The dot product of the two vectors.

Definition at line 769 of file Vector3D.cs.

static void VRageMath.Vector3D.Dot ( ref Vector3D  vector1,
ref Vector3  vector2,
out double  result 
)
inlinestatic

Definition at line 773 of file Vector3D.cs.

static void VRageMath.Vector3D.Dot ( ref Vector3  vector1,
ref Vector3D  vector2,
out double  result 
)
inlinestatic

Definition at line 777 of file Vector3D.cs.

double VRageMath.Vector3D.Dot ( Vector3D  v)
inline

Definition at line 782 of file Vector3D.cs.

double VRageMath.Vector3D.Dot ( Vector3  v)
inline

Definition at line 787 of file Vector3D.cs.

double VRageMath.Vector3D.Dot ( ref Vector3D  v)
inline

Definition at line 793 of file Vector3D.cs.

bool VRageMath.Vector3D.Equals ( Vector3D  other)
inline

Determines whether the specified Object is equal to the Vector3.

Parameters
otherThe Vector3 to compare with the current Vector3.

Definition at line 588 of file Vector3D.cs.

bool VRageMath.Vector3D.Equals ( Vector3D  other,
double  epsilon 
)
inline

Definition at line 596 of file Vector3D.cs.

override bool VRageMath.Vector3D.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 605 of file Vector3D.cs.

static Vector3I VRageMath.Vector3D.Floor ( Vector3D  vect3d)
inlinestatic

Definition at line 2140 of file Vector3D.cs.

static void VRageMath.Vector3D.Fract ( ref Vector3D  o,
out Vector3D  r 
)
inlinestatic

Definition at line 2145 of file Vector3D.cs.

static void VRageMath.Vector3D.GetAzimuthAndElevation ( Vector3D  v,
out double  azimuth,
out double  elevation 
)
inlinestatic

Definition at line 2042 of file Vector3D.cs.

double VRageMath.Vector3D.GetDim ( int  i)
inline

Definition at line 2103 of file Vector3D.cs.

long VRageMath.Vector3D.GetHash ( )
inline

Gets the hash code of the vector object.

Definition at line 624 of file Vector3D.cs.

override int VRageMath.Vector3D.GetHashCode ( )
inline

Definition at line 613 of file Vector3D.cs.

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

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

void VRageMath.Vector3D.Interpolate3 ( Vector3D  v0,
Vector3D  v1,
double  rt 
)
inline

Definition at line 409 of file Vector3D.cs.

bool VRageMath.Vector3D.IsInsideInclusive ( ref Vector3D  min,
ref Vector3D  max 
)
inline

Definition at line 2090 of file Vector3D.cs.

static bool VRageMath.Vector3D.IsUnit ( ref Vector3D  value)
inlinestatic

Definition at line 429 of file Vector3D.cs.

bool VRageMath.Vector3D.IsValid ( )
inline

Definition at line 417 of file Vector3D.cs.

static bool VRageMath.Vector3D.IsZero ( Vector3D  value)
inlinestatic

Definition at line 443 of file Vector3D.cs.

static bool VRageMath.Vector3D.IsZero ( Vector3D  value,
double  epsilon 
)
inlinestatic

Definition at line 449 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.IsZeroVector ( Vector3D  value)
inlinestatic

Definition at line 455 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.IsZeroVector ( Vector3D  value,
double  epsilon 
)
inlinestatic

Definition at line 461 of file Vector3D.cs.

double VRageMath.Vector3D.Length ( )
inline

Calculates the length of the vector.

Definition at line 655 of file Vector3D.cs.

double VRageMath.Vector3D.LengthSquared ( )
inline

Calculates the length of the vector squared.

Definition at line 663 of file Vector3D.cs.

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

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

double VRageMath.Vector3D.Max ( )
inline

Returns the component of the vector that is largest of all the three components.

Definition at line 976 of file Vector3D.cs.

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

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

Parameters
value1Source vector.
value2Source vector.

Definition at line 1053 of file Vector3D.cs.

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

double VRageMath.Vector3D.Min ( )
inline

Returns the component of the vector that is smallest of all the three components.

Definition at line 942 of file Vector3D.cs.

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

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

Parameters
value1Source vector.
value2Source vector.

Definition at line 1029 of file Vector3D.cs.

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

static void VRageMath.Vector3D.MinMax ( ref Vector3D  min,
ref Vector3D  max 
)
inlinestatic

Separates minimal and maximal values of any two input vectors

Parameters
minminimal values of the two vectors
maxmaximal values of the two vectors

Definition at line 1078 of file Vector3D.cs.

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

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1925 of file Vector3D.cs.

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

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

Multiplies a vector by a scalar value.

Parameters
value1Source vector.
scaleFactorScalar value.

Definition at line 1949 of file Vector3D.cs.

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

Multiplies a vector by a scalar value.

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

Definition at line 1962 of file Vector3D.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 1853 of file Vector3D.cs.

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

Returns a vector pointing in the opposite direction.

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

Definition at line 1866 of file Vector3D.cs.

double VRageMath.Vector3D.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.

returns length

Definition at line 807 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Normalize ( Vector3D  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
valueThe source Vector3.

Definition at line 821 of file Vector3D.cs.

static void VRageMath.Vector3D.Normalize ( ref Vector3D  value,
out Vector3D  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] The normalized vector.

Definition at line 835 of file Vector3D.cs.

static implicit VRageMath.Vector3D.operator Vector3 ( Vector3D  v)
inlinestatic

Definition at line 2125 of file Vector3D.cs.

static implicit VRageMath.Vector3D.operator Vector3D ( Vector3  v)
inlinestatic

Definition at line 2130 of file Vector3D.cs.

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

Tests vectors for inequality.

Parameters
value1Vector to compare.
value2Vector to compare.

Definition at line 169 of file Vector3D.cs.

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

Definition at line 176 of file Vector3D.cs.

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

Definition at line 183 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator% ( Vector3D  value1,
double  value2 
)
inlinestatic

Definition at line 191 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator% ( Vector3D  value1,
Vector3D  value2 
)
inlinestatic

Modulo division of two vectors.

Parameters
value1
value2
Returns

Definition at line 206 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator* ( Vector3D  value1,
Vector3  value2 
)
inlinestatic

Multiplies the components of two vectors by each other.

Parameters
value1Source vector.
value2Source vector.

Definition at line 318 of file Vector3D.cs.

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

Multiplies a vector by a scalar value.

Parameters
valueSource vector.
scaleFactorScalar value.

Definition at line 331 of file Vector3D.cs.

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

Multiplies a vector by a scalar value.

Parameters
scaleFactorScalar value.
valueSource vector.

Definition at line 344 of file Vector3D.cs.

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

Adds two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 219 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator+ ( Vector3D  value1,
Vector3  value2 
)
inlinestatic

Definition at line 228 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator+ ( Vector3  value1,
Vector3D  value2 
)
inlinestatic

Definition at line 237 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator+ ( Vector3D  value1,
Vector3I  value2 
)
inlinestatic

Definition at line 246 of file Vector3D.cs.

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

Definition at line 255 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator+ ( Vector3D  value1,
float  value2 
)
inlinestatic

Definition at line 264 of file Vector3D.cs.

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

Returns a vector pointing in the opposite direction.

Parameters
valueSource vector.

Definition at line 129 of file Vector3D.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 277 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator- ( Vector3D  value1,
Vector3  value2 
)
inlinestatic

Definition at line 286 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator- ( Vector3  value1,
Vector3D  value2 
)
inlinestatic

Definition at line 295 of file Vector3D.cs.

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

Definition at line 305 of file Vector3D.cs.

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

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

Parameters
value1Source vector.
value2Divisor vector.

Definition at line 357 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator/ ( Vector3D  value,
double  divider 
)
inlinestatic

Divides a vector by a scalar value.

Parameters
valueSource vector.
dividerThe divisor.

Definition at line 370 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.operator/ ( double  value,
Vector3D  divider 
)
inlinestatic

Definition at line 380 of file Vector3D.cs.

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

Tests vectors for equality.

Parameters
value1Source vector.
value2Source vector.

Definition at line 143 of file Vector3D.cs.

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

Definition at line 150 of file Vector3D.cs.

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

Definition at line 157 of file Vector3D.cs.

static double VRageMath.Vector3D.RectangularDistance ( Vector3D  value1,
Vector3D  value2 
)
inlinestatic

Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 736 of file Vector3D.cs.

static double VRageMath.Vector3D.RectangularDistance ( ref Vector3D  value1,
ref Vector3D  value2 
)
inlinestatic

Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.

Parameters
value1Source vector.
value2Source vector.

Definition at line 746 of file Vector3D.cs.

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

Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.

Parameters
vectorSource vector.
normalNormal of the surface.

Definition at line 874 of file Vector3D.cs.

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

Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.

Parameters
vectorSource vector.
normalNormal of the surface.
result[OutAttribute] The reflected vector.

Definition at line 888 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Reject ( Vector3D  vector,
Vector3D  direction 
)
inlinestatic

Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction

Parameters
vectorVector which is to be rejected
directionDirection from which the input vector will be rejected
Returns
Rejection of the vector from the given direction

Definition at line 902 of file Vector3D.cs.

static void VRageMath.Vector3D.Reject ( ref Vector3D  vector,
ref Vector3D  direction,
out Vector3D  result 
)
inlinestatic

Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction

Parameters
vectorVector which is to be rejected
directionDirection from which the input vector will be rejected
resultRejection of the vector from the given direction

Definition at line 915 of file Vector3D.cs.

static void VRageMath.Vector3D.Rotate ( ref Vector3D  vector,
ref MatrixD  rotationMatrix,
out Vector3D  result 
)
inlinestatic

Definition at line 1644 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Rotate ( Vector3D  vector,
MatrixD  rotationMatrix 
)
inlinestatic

Definition at line 1654 of file Vector3D.cs.

static void VRageMath.Vector3D.RotateAndScale ( ref Vector3D  vector,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Transform the provided vector only about the rotation and scale terms of a matrix.

Definition at line 1471 of file Vector3D.cs.

static Vector3I VRageMath.Vector3D.Round ( Vector3D  vect3d)
inlinestatic

Definition at line 2135 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Round ( Vector3D  v,
int  numDecimals 
)
inlinestatic

Definition at line 2152 of file Vector3D.cs.

void VRageMath.Vector3D.SetDim ( int  i,
double  value 
)
inline

Definition at line 2114 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Sign ( Vector3D  value)
inlinestatic

Definition at line 394 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.SignNonZero ( Vector3D  value)
inlinestatic

Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign.

Definition at line 404 of file Vector3D.cs.

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

Interpolates between two values using a cubic equation.

Parameters
value1Source value.
value2Source value.
amountWeighting value.

Definition at line 1286 of file Vector3D.cs.

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

Interpolates between two values using a cubic equation.

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

Definition at line 1301 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.Step ( Vector3D  value)
inlinestatic

Definition at line 467 of file Vector3D.cs.

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

Subtracts a vector from a vector.

Parameters
value1Source vector.
value2Source vector.

Definition at line 1901 of file Vector3D.cs.

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

Subtracts a vector from a vector.

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

Definition at line 1914 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.SwapYZCoordinates ( Vector3D  v)
inlinestatic

Definition at line 2098 of file Vector3D.cs.

override string VRageMath.Vector3D.ToString ( )
inline

Retrieves a string representation of the current object.

Definition at line 475 of file Vector3D.cs.

string VRageMath.Vector3D.ToString ( string  format)
inline

Definition at line 578 of file Vector3D.cs.

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

Transforms a 3D vector by the given matrix.

Parameters
positionThe source vector.
matrixThe transformation matrix.

Definition at line 1378 of file Vector3D.cs.

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

Definition at line 1390 of file Vector3D.cs.

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

Transforms a 3D vector by the given matrix.

Parameters
positionThe source vector.
matrixThe transformation matrix.

Definition at line 1407 of file Vector3D.cs.

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

Definition at line 1420 of file Vector3D.cs.

static void VRageMath.Vector3D.Transform ( ref Vector3D  position,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Transforms a Vector3 by the given Matrix.

Parameters
positionThe source Vector3.
matrixThe transformation Matrix.
result[OutAttribute] The transformed vector.

Definition at line 1430 of file Vector3D.cs.

static void VRageMath.Vector3D.Transform ( ref Vector3  position,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Definition at line 1441 of file Vector3D.cs.

static void VRageMath.Vector3D.Transform ( ref Vector3D  position,
ref MatrixI  matrix,
out Vector3D  result 
)
inlinestatic

Definition at line 1482 of file Vector3D.cs.

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

Transforms a Vector3 by a specified Quaternion rotation.

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

Definition at line 1594 of file Vector3D.cs.

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

Transforms a Vector3 by a specified Quaternion rotation.

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

Definition at line 1622 of file Vector3D.cs.

static void VRageMath.Vector3D.Transform ( Vector3D[]  sourceArray,
ref MatrixD  matrix,
Vector3D[]  destinationArray 
)
inlinestatic

Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array.

Parameters
sourceArrayThe source array.
matrixThe transform Matrix to apply.
destinationArrayAn existing destination array into which the transformed Vector3s are written.

Definition at line 1665 of file Vector3D.cs.

static unsafe void VRageMath.Vector3D.Transform ( Vector3D[]  sourceArray,
ref MatrixD  matrix,
Vector3D destinationArray 
)
inlinestatic

Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array.

Parameters
sourceArrayThe source array.
matrixThe transform Matrix to apply.
destinationArrayAn existing destination array into which the transformed Vector3s are written.

Definition at line 1684 of file Vector3D.cs.

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

Applies a specified transform Matrix to a specified range of an array of Vector3s and writes the results into a specified range of a destination array.

Parameters
sourceArrayThe source array.
sourceIndexThe index in the source array at which to start.
matrixThe transform Matrix to apply.
destinationArrayThe existing destination array.
destinationIndexThe index in the destination array at which to start.
lengthThe number of Vector3s to transform.

Definition at line 1701 of file Vector3D.cs.

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

Transforms a source array of Vector3s by a specified Quaternion rotation and writes the results to an existing destination array.

Parameters
sourceArrayThe source array.
rotationThe Quaternion rotation to apply.
destinationArrayAn existing destination array into which the transformed Vector3s are written.

Definition at line 1775 of file Vector3D.cs.

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

Applies a specified Quaternion rotation to a specified range of an array of Vector3s and writes the results into a specified range of a destination array.

Parameters
sourceArrayThe source array.
sourceIndexThe index in the source array at which to start.
rotationThe Quaternion rotation to apply.
destinationArrayThe existing destination array.
destinationIndexThe index in the destination array at which to start.
lengthThe number of Vector3s to transform.

Definition at line 1813 of file Vector3D.cs.

static void VRageMath.Vector3D.TransformNoProjection ( ref Vector3D  vector,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Transform the provided vector only about the rotation, scale and translation terms of a matrix.

This effectively treats the matrix as a 3x4 matrix and the input vector as a 4 dimensional vector with unit W coordinate.

Definition at line 1457 of file Vector3D.cs.

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

Transforms a 3D vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation matrix.

Definition at line 1495 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.TransformNormal ( Vector3  normal,
MatrixD  matrix 
)
inlinestatic

Transforms a 3D vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation matrix.

Definition at line 1511 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.TransformNormal ( Vector3D  normal,
MatrixD  matrix 
)
inlinestatic

Transforms a 3D vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation matrix.

Definition at line 1527 of file Vector3D.cs.

static void VRageMath.Vector3D.TransformNormal ( ref Vector3D  normal,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Transforms a vector normal by a matrix.

Parameters
normalThe source vector.
matrixThe transformation Matrix.
result[OutAttribute] The Vector3 resulting from the transformation.

Definition at line 1543 of file Vector3D.cs.

static void VRageMath.Vector3D.TransformNormal ( ref Vector3  normal,
ref MatrixD  matrix,
out Vector3D  result 
)
inlinestatic

Definition at line 1553 of file Vector3D.cs.

static void VRageMath.Vector3D.TransformNormal ( ref Vector3D  normal,
ref MatrixI  matrix,
out Vector3D  result 
)
inlinestatic

Definition at line 1563 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.TransformNormal ( Vector3D  normal,
MyBlockOrientation  orientation 
)
inlinestatic

Definition at line 1570 of file Vector3D.cs.

static void VRageMath.Vector3D.TransformNormal ( ref Vector3D  normal,
MyBlockOrientation  orientation,
out Vector3D  result 
)
inlinestatic

Definition at line 1577 of file Vector3D.cs.

static Vector3D VRageMath.Vector3D.TransformNormal ( Vector3D  normal,
ref MatrixD  matrix 
)
inlinestatic

Definition at line 1584 of file Vector3D.cs.

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

Transforms an array of 3D vector normals by a specified Matrix.

Parameters
sourceArrayThe array of Vector3 normals to transform.
matrixThe transform matrix to apply.
destinationArrayAn existing Vector3 array into which the results of the transforms are written.

Definition at line 1720 of file Vector3D.cs.

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

Transforms an array of 3D vector normals by a specified Matrix.

Parameters
sourceArrayThe array of Vector3 normals to transform.
matrixThe transform matrix to apply.
destinationArrayAn existing Vector3 array into which the results of the transforms are written.

Definition at line 1739 of file Vector3D.cs.

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

Transforms a specified range in an array of 3D vector normals by a specified Matrix and writes the results to a specified range in a destination array.

Parameters
sourceArrayThe source array of Vector3 normals.
sourceIndexThe starting index in the source array.
matrixThe transform Matrix to apply.
destinationArrayThe destination Vector3 array.
destinationIndexThe starting index in the destination array.
lengthThe number of vectors to transform.

Definition at line 1756 of file Vector3D.cs.

static bool VRageMath.Vector3D.TryParse ( string  str,
out Vector3D  retval 
)
inlinestatic

Definition at line 481 of file Vector3D.cs.

long VRageMath.Vector3D.VolumeInt ( double  multiplier)
inline

Definition at line 2085 of file Vector3D.cs.

Member Data Documentation

Vector3D VRageMath.Vector3D.Backward = new Vector3D(0.0, 0.0, 1)
static

Definition at line 28 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Down = new Vector3D(0.0, -1, 0.0)
static

Definition at line 24 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Forward = new Vector3D(0.0, 0.0, -1)
static

Definition at line 27 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Half = new Vector3D(0.5, 0.5, 0.5)
static

Definition at line 17 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Left = new Vector3D(-1, 0.0, 0.0)
static

Definition at line 26 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.MaxValue = new Vector3D(double.MaxValue, double.MaxValue, double.MaxValue)
static

Definition at line 29 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.MinValue = new Vector3D(double.MinValue, double.MinValue, double.MinValue)
static

Definition at line 30 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.NegativeInfinity = new Vector3D(double.NegativeInfinity)
static

Definition at line 19 of file Vector3D.cs.

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

Definition at line 16 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.PositiveInfinity = new Vector3D(double.PositiveInfinity)
static

Definition at line 18 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Right = new Vector3D(1, 0.0, 0.0)
static

Definition at line 25 of file Vector3D.cs.

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

Definition at line 20 of file Vector3D.cs.

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

Definition at line 21 of file Vector3D.cs.

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

Definition at line 22 of file Vector3D.cs.

Vector3D VRageMath.Vector3D.Up = new Vector3D(0.0, 1, 0.0)
static

Definition at line 23 of file Vector3D.cs.

double VRageMath.Vector3D.X

Gets or sets the x-component of the vector.

Definition at line 35 of file Vector3D.cs.

double VRageMath.Vector3D.Y

Gets or sets the y-component of the vector.

Definition at line 40 of file Vector3D.cs.

double VRageMath.Vector3D.Z

Gets or sets the z-component of the vector.

Definition at line 45 of file Vector3D.cs.

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

Definition at line 15 of file Vector3D.cs.

Property Documentation

double VRageMath.Vector3D.Sum
get

Definition at line 2070 of file Vector3D.cs.

double VRageMath.Vector3D.Volume
get

Definition at line 2078 of file Vector3D.cs.


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