Skip to content
This repository was archived by the owner on Dec 13, 2025. It is now read-only.

VRageMath.Vector3D

Malware edited this page Dec 21, 2018 · 56 revisions

Index

Vector3D Struct

Namespace: VRageMath
Assembly: VRage.Math.dll

Summary

Defines a vector with three components.

Fields

_double X_ Gets or sets the x-component of the vector.
_double Y_ Gets or sets the y-component of the vector.
_double Z_ Gets or sets the z-component of the vector.
static _Vector3D Zero_
static _Vector3D One_
static _Vector3D Half_
static _Vector3D PositiveInfinity_
static _Vector3D NegativeInfinity_
static _Vector3D UnitX_
static _Vector3D UnitY_
static _Vector3D UnitZ_
static _Vector3D Up_
static _Vector3D Down_
static _Vector3D Right_
static _Vector3D Left_
static _Vector3D Forward_
static _Vector3D Backward_
static _Vector3D MaxValue_
static _Vector3D MinValue_
### Properties
_double Sum_
_double Volume_
### Methods
static _void TransformNormal(ref Vector3D normal, ref MatrixI matrix, ref Vector3D result)_
static _Vector3D TransformNormal(Vector3D normal, MyBlockOrientation orientation)_
static _void TransformNormal(ref Vector3D normal, MyBlockOrientation orientation, ref 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.
static _void Transform(ref Vector3D value, ref Quaternion rotation, ref Vector3D result)_ Transforms a Vector3 by a specified Quaternion rotation.
static _void Rotate(ref Vector3D vector, ref MatrixD rotationMatrix, ref 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.
static _void Transform(Vector3D[] sourceArray, ref MatrixD matrix, *Vector3D destinationArray)_
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.
static _void TransformNormal(Vector3D[] sourceArray, ref Matrix matrix, Vector3D[] destinationArray)_ Transforms an array of 3D vector normals by a specified Matrix.
static _void TransformNormal(Vector3D[] sourceArray, ref Matrix matrix, *Vector3D destinationArray)_
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.
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.
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.
static _Vector3D Negate(Vector3D value)_ Returns a vector pointing in the opposite direction.
static _void Negate(ref Vector3D value, ref Vector3D result)_ Returns a vector pointing in the opposite direction.
static _Vector3D Add(Vector3D value1, Vector3D value2)_ Adds two vectors.
static _void Add(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Adds two vectors.
static _Vector3D Subtract(Vector3D value1, Vector3D value2)_ Subtracts a vector from a vector.
static _void Subtract(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Subtracts a vector from a vector.
static _Vector3D Multiply(Vector3D value1, Vector3D value2)_ Multiplies the components of two vectors by each other.
static _void Multiply(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Multiplies the components of two vectors by each other.
static _Vector3D Multiply(Vector3D value1, double scaleFactor)_ Multiplies a vector by a scalar value.
static _void Multiply(ref Vector3D value1, double scaleFactor, ref Vector3D result)_ Multiplies a vector by a scalar value.
static _Vector3D Divide(Vector3D value1, Vector3D value2)_ Divides the components of a vector by the components of another vector.
static _void Divide(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Divides the components of a vector by the components of another vector.
static _Vector3D Divide(Vector3D value1, double value2)_ Divides a vector by a scalar value.
static _void Divide(ref Vector3D value1, double value2, ref Vector3D result)_ Divides a vector by a scalar value.
static _Vector3D CalculatePerpendicularVector(Vector3D v)_
_void CalculatePerpendicularVector(ref Vector3D result)_
static _void GetAzimuthAndElevation(Vector3D v, ref double azimuth, ref double elevation)_
static _void CreateFromAzimuthAndElevation(double azimuth, double elevation, ref Vector3D direction)_
_long VolumeInt(double multiplier)_
_bool IsInsideInclusive(ref Vector3D min, ref Vector3D max)_
static _Vector3D SwapYZCoordinates(Vector3D v)_
_double GetDim(int i)_
_void SetDim(int i, double value)_
static _Vector3I Round(Vector3D vect3d)_
static _Vector3I Floor(Vector3D vect3d)_
static _void Fract(ref Vector3D o, ref Vector3D r)_
static _Vector3D Round(Vector3D v, int numDecimals)_
static _void Abs(ref Vector3D vector3D, ref Vector3D abs)_
static _Vector3D ProjectOnPlane(ref Vector3D vec, ref Vector3D planeNormal)_ Projects given vector on plane specified by it's normal.
static _Vector3D ProjectOnVector(ref Vector3D vec, ref Vector3D guideVector)_ Projects vector on another vector resulting in new vector in guided vector's direction with different length.
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.
_void Interpolate3(Vector3D v0, Vector3D v1, double rt)_
_bool IsValid()_
_void AssertIsValid()_
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)_
_string ToString()_ Retrieves a string representation of the current object.
static _bool TryParse(string str, ref Vector3D retval)_
_string ToString(string format)_
_bool Equals(Vector3D other)_ Determines whether the specified Object is equal to the Vector3.
_bool Equals(Vector3D other, double epsilon)_
_bool Equals(Object obj)_ Returns a value that indicates whether the current instance is equal to a specified object.
_int GetHashCode()_
_long GetHash()_ Gets the hash code of the vector object.
_double Length()_ Calculates the length of the vector.
_double LengthSquared()_ Calculates the length of the vector squared.
static _double Distance(Vector3D value1, Vector3D value2)_ Calculates the distance between two vectors.
static _double Distance(Vector3D value1, Vector3 value2)_
static _double Distance(Vector3 value1, Vector3D value2)_
static _void Distance(ref Vector3D value1, ref Vector3D value2, ref double result)_ Calculates the distance between two vectors.
static _double DistanceSquared(Vector3D value1, Vector3D value2)_ Calculates the distance between two vectors squared.
static _void DistanceSquared(ref Vector3D value1, ref Vector3D value2, ref double result)_ Calculates the distance between two vectors squared.
static _double RectangularDistance(Vector3D value1, Vector3D value2)_ Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.
static _double RectangularDistance(ref Vector3D value1, ref Vector3D value2)_ Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.
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.
static _double Dot(Vector3D vector1, Vector3 vector2)_
static _void Dot(ref Vector3D vector1, ref Vector3D vector2, ref 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.
static _void Dot(ref Vector3D vector1, ref Vector3 vector2, ref double result)_
static _void Dot(ref Vector3 vector1, ref Vector3D vector2, ref double result)_
_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.
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.
static _void Normalize(ref Vector3D value, ref 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.
static _Vector3D Cross(Vector3D vector1, Vector3D vector2)_ Calculates the cross product of two vectors.
static _void Cross(ref Vector3D vector1, ref Vector3D vector2, ref Vector3D result)_ Calculates the cross product of two vectors.
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.
static _void Reflect(ref Vector3D vector, ref Vector3D normal, ref Vector3D result)_ Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.
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
static _void Reject(ref Vector3D vector, ref Vector3D direction, ref Vector3D result)_ Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction
_double Min()_ Returns the component of the vector that is smallest of all the three components.
_double AbsMin()_ Returns the component of the vector, whose absolute value is smallest of all the three components.
_double Max()_ Returns the component of the vector that is largest of all the three components.
_double AbsMax()_ Returns the component of the vector, whose absolute value is largest of all the three components.
_int AbsMaxComponent()_
static _Vector3D Min(Vector3D value1, Vector3D value2)_ Returns a vector that contains the lowest value from each matching pair of components.
static _void Min(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Returns a vector that contains the lowest value from each matching pair of components.
static _Vector3D Max(Vector3D value1, Vector3D value2)_ Returns a vector that contains the highest value from each matching pair of components.
static _void Max(ref Vector3D value1, ref Vector3D value2, ref Vector3D result)_ Returns a vector that contains the highest value from each matching pair of components.
static _void MinMax(ref Vector3D min, ref Vector3D max)_ Separates minimal and maximal values of any two input vectors
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.
static _void DominantAxisProjection(ref Vector3D value1, ref 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.
static _Vector3D Clamp(Vector3D value1, Vector3D min, Vector3D max)_ Restricts a value to be within a specified range.
static _void Clamp(ref Vector3D value1, ref Vector3D min, ref Vector3D max, ref Vector3D result)_ Restricts a value to be within a specified range.
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.
static _void Lerp(ref Vector3D value1, ref Vector3D value2, double amount, ref Vector3D result)_ Performs a linear interpolation between two vectors.
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.
static _void Barycentric(ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, double amount1, double amount2, ref Vector3D result)_ Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 3D triangle.
static _void Barycentric(Vector3D p, Vector3D a, Vector3D b, Vector3D c, ref double u, ref double v, ref 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
static _Vector3D SmoothStep(Vector3D value1, Vector3D value2, double amount)_ Interpolates between two values using a cubic equation.
static _void SmoothStep(ref Vector3D value1, ref Vector3D value2, double amount, ref Vector3D result)_ Interpolates between two values using a cubic equation.
static _Vector3D CatmullRom(Vector3D value1, Vector3D value2, Vector3D value3, Vector3D value4, double amount)_ Performs a Catmull-Rom interpolation using the specified positions.
static _void CatmullRom(ref Vector3D value1, ref Vector3D value2, ref Vector3D value3, ref Vector3D value4, double amount, ref Vector3D result)_ Performs a Catmull-Rom interpolation using the specified positions.
static _Vector3D Hermite(Vector3D value1, Vector3D tangent1, Vector3D value2, Vector3D tangent2, double amount)_ Performs a Hermite spline interpolation.
static _void Hermite(ref Vector3D value1, ref Vector3D tangent1, ref Vector3D value2, ref Vector3D tangent2, double amount, ref Vector3D result)_ Performs a Hermite spline interpolation.
static _Vector3D Transform(Vector3D position, MatrixD matrix)_ Transforms a 3D vector by the given matrix.
static _Vector3D Transform(Vector3 position, MatrixD matrix)_
static _Vector3D Transform(Vector3D position, Matrix matrix)_ Transforms a 3D vector by the given matrix.
static _Vector3D Transform(Vector3D position, ref MatrixD matrix)_
static _void Transform(ref Vector3D position, ref MatrixD matrix, ref Vector3D result)_ Transforms a Vector3 by the given Matrix.
static _void Transform(ref Vector3 position, ref MatrixD matrix, ref Vector3D result)_
static _void TransformNoProjection(ref Vector3D vector, ref MatrixD matrix, ref Vector3D result)_
static _void RotateAndScale(ref Vector3D vector, ref MatrixD matrix, ref Vector3D result)_
static _void Transform(ref Vector3D position, ref MatrixI matrix, ref Vector3D result)_
static _Vector3D TransformNormal(Vector3D normal, Matrix matrix)_ Transforms a 3D vector normal by a matrix.
static _Vector3D TransformNormal(Vector3 normal, MatrixD matrix)_ Transforms a 3D vector normal by a matrix.
static _Vector3D TransformNormal(Vector3D normal, MatrixD matrix)_ Transforms a 3D vector normal by a matrix.
static _void TransformNormal(ref Vector3D normal, ref MatrixD matrix, ref Vector3D result)_ Transforms a vector normal by a matrix.
static _void TransformNormal(ref Vector3 normal, ref MatrixD matrix, ref Vector3D result)_

Clone this wiki locally