Space Engineers
|
Defines a vector with three components. More...
Public Member Functions | |
Vector3 (float x, float y, float z) | |
Initializes a new instance of Vector3. More... | |
Vector3 (double x, double y, double z) | |
Vector3 (float value) | |
Creates a new instance of Vector3. More... | |
Vector3 (Vector2 value, float z) | |
Initializes a new instance of Vector3. More... | |
Vector3 (Vector4 xyz) | |
Vector3 (ref Vector3I value) | |
Vector3 (Vector3I value) | |
void | Divide (float divider) |
void | Multiply (float scale) |
void | Add (Vector3 other) |
void | Interpolate3 (Vector3 v0, Vector3 v1, float rt) |
bool | IsValid () |
void | AssertIsValid () |
override string | ToString () |
Retrieves a string representation of the current object. More... | |
string | ToString (string format) |
bool | Equals (Vector3 other) |
Determines whether the specified Object is equal to the Vector3. More... | |
bool | Equals (Vector3 other, float 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... | |
float | Length () |
Calculates the length of the vector. More... | |
float | LengthSquared () |
Calculates the length of the vector squared. More... | |
float | Dot (Vector3 v) |
float | Dot (ref Vector3 v) |
Vector3 | Cross (Vector3 v) |
float | 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... | |
float | Min () |
Returns the component of the vector that is smallest of all the three components. More... | |
float | AbsMin () |
Returns the component of the vector, whose absolute value is smallest of all the three components. More... | |
float | Max () |
Returns the component of the vector that is largest of all the three components. More... | |
Vector3 | MaxAbsComponent () |
Keeps only component with maximal absolute, others are set to zero. More... | |
float | AbsMax () |
Returns the component of the vector, whose absolute value is largest of all the three components. More... | |
void | CalculatePerpendicularVector (out Vector3 result) |
long | VolumeInt (float multiplier) |
bool | IsInsideInclusive (ref Vector3 min, ref Vector3 max) |
float | GetDim (int i) |
void | SetDim (int i, float value) |
Static Public Member Functions | |
static | Vector3 () |
static Vector3 | operator- (Vector3 value) |
Returns a vector pointing in the opposite direction. More... | |
static bool | operator== (Vector3 value1, Vector3 value2) |
Tests vectors for equality. More... | |
static bool | operator!= (Vector3 value1, Vector3 value2) |
Tests vectors for inequality. More... | |
static Vector3 | operator+ (Vector3 value1, Vector3 value2) |
Adds two vectors. More... | |
static Vector3 | operator+ (Vector3 value1, float value2) |
static Vector3 | operator- (Vector3 value1, Vector3 value2) |
Subtracts a vector from a vector. More... | |
static Vector3 | operator- (Vector3 value1, float value2) |
static Vector3 | operator* (Vector3 value1, Vector3 value2) |
Multiplies the components of two vectors by each other. More... | |
static Vector3 | operator* (Vector3 value, float scaleFactor) |
Multiplies a vector by a scalar value. More... | |
static Vector3 | operator* (float scaleFactor, Vector3 value) |
Multiplies a vector by a scalar value. More... | |
static Vector3 | operator/ (Vector3 value1, Vector3 value2) |
Divides the components of a vector by the components of another vector. More... | |
static Vector3 | operator/ (Vector3 value, float divider) |
Divides a vector by a scalar value. More... | |
static Vector3 | operator/ (float value, Vector3 divider) |
static Vector3 | Abs (Vector3 value) |
static Vector3 | Sign (Vector3 value) |
static Vector3 | SignNonZero (Vector3 value) |
Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign. More... | |
static bool | IsUnit (ref Vector3 value) |
static bool | ArePerpendicular (ref Vector3 a, ref Vector3 b) |
static bool | IsZero (Vector3 value) |
static bool | IsZero (Vector3 value, float epsilon) |
static Vector3 | IsZeroVector (Vector3 value) |
static Vector3 | IsZeroVector (Vector3 value, float epsilon) |
static Vector3 | Step (Vector3 value) |
static float | Distance (Vector3 value1, Vector3 value2) |
Calculates the distance between two vectors. More... | |
static void | Distance (ref Vector3 value1, ref Vector3 value2, out float result) |
Calculates the distance between two vectors. More... | |
static float | DistanceSquared (Vector3 value1, Vector3 value2) |
Calculates the distance between two vectors squared. More... | |
static void | DistanceSquared (ref Vector3 value1, ref Vector3 value2, out float result) |
Calculates the distance between two vectors squared. More... | |
static float | RectangularDistance (Vector3 value1, Vector3 value2) |
Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors. More... | |
static float | RectangularDistance (ref Vector3 value1, ref Vector3 value2) |
Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors. More... | |
static float | Dot (Vector3 vector1, Vector3 vector2) |
Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a floating 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 Vector3 vector1, ref Vector3 vector2, out float 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 floating 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 Vector3 | Normalize (Vector3 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 Vector3 | Normalize (Vector3D value) |
static bool | GetNormalized (ref Vector3 value) |
static void | Normalize (ref Vector3 value, out Vector3 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 Vector3 | Cross (Vector3 vector1, Vector3 vector2) |
Calculates the cross product of two vectors. More... | |
static void | Cross (ref Vector3 vector1, ref Vector3 vector2, out Vector3 result) |
Calculates the cross product of two vectors. More... | |
static Vector3 | Reflect (Vector3 vector, Vector3 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 Vector3 vector, ref Vector3 normal, out Vector3 result) |
Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample. More... | |
static Vector3 | Reject (Vector3 vector, Vector3 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 Vector3 vector, ref Vector3 direction, out Vector3 result) |
Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction More... | |
static Vector3 | Min (Vector3 value1, Vector3 value2) |
Returns a vector that contains the lowest value from each matching pair of components. More... | |
static void | Min (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Returns a vector that contains the lowest value from each matching pair of components. More... | |
static Vector3 | Max (Vector3 value1, Vector3 value2) |
Returns a vector that contains the highest value from each matching pair of components. More... | |
static void | Max (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Returns a vector that contains the highest value from each matching pair of components. More... | |
static void | MinMax (ref Vector3 min, ref Vector3 max) |
Separates minimal and maximal values of any two input vectors More... | |
static Vector3 | DominantAxisProjection (Vector3 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 Vector3 value1, out Vector3 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 Vector3 | Clamp (Vector3 value1, Vector3 min, Vector3 max) |
Restricts a value to be within a specified range. More... | |
static void | Clamp (ref Vector3 value1, ref Vector3 min, ref Vector3 max, out Vector3 result) |
Restricts a value to be within a specified range. More... | |
static Vector3 | ClampToSphere (Vector3 vector, float radius) |
static void | ClampToSphere (ref Vector3 vector, float radius) |
static Vector3 | Lerp (Vector3 value1, Vector3 value2, float amount) |
Performs a linear interpolation between two vectors. More... | |
static void | Lerp (ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result) |
Performs a linear interpolation between two vectors. More... | |
static Vector3 | Barycentric (Vector3 value1, Vector3 value2, Vector3 value3, float amount1, float 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 Vector3 value1, ref Vector3 value2, ref Vector3 value3, float amount1, float amount2, out Vector3 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 (Vector3 p, Vector3 a, Vector3 b, Vector3 c, out float u, out float v, out float 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 Vector3 | SmoothStep (Vector3 value1, Vector3 value2, float amount) |
Interpolates between two values using a cubic equation. More... | |
static void | SmoothStep (ref Vector3 value1, ref Vector3 value2, float amount, out Vector3 result) |
Interpolates between two values using a cubic equation. More... | |
static Vector3 | CatmullRom (Vector3 value1, Vector3 value2, Vector3 value3, Vector3 value4, float amount) |
Performs a Catmull-Rom interpolation using the specified positions. More... | |
static void | CatmullRom (ref Vector3 value1, ref Vector3 value2, ref Vector3 value3, ref Vector3 value4, float amount, out Vector3 result) |
Performs a Catmull-Rom interpolation using the specified positions. More... | |
static Vector3 | Hermite (Vector3 value1, Vector3 tangent1, Vector3 value2, Vector3 tangent2, float amount) |
Performs a Hermite spline interpolation. More... | |
static void | Hermite (ref Vector3 value1, ref Vector3 tangent1, ref Vector3 value2, ref Vector3 tangent2, float amount, out Vector3 result) |
Performs a Hermite spline interpolation. More... | |
static Vector3 | Transform (Vector3 position, Matrix matrix) |
Transforms a 3D vector by the given matrix. More... | |
static Vector3D | Transform (Vector3 position, MatrixD matrix) |
Transforms a 3D vector by the given matrix. More... | |
static Vector3 | Transform (Vector3 position, ref Matrix matrix) |
static void | Transform (ref Vector3 position, ref Matrix matrix, out Vector3 result) |
Transforms a Vector3 by the given Matrix. More... | |
static void | Transform (ref Vector3 position, ref MatrixI matrix, out Vector3 result) |
static void | TransformNoProjection (ref Vector3 vector, ref Matrix matrix, out Vector3 result) |
static void | RotateAndScale (ref Vector3 vector, ref Matrix matrix, out Vector3 result) |
static Vector3 | TransformNormal (Vector3 normal, Matrix matrix) |
Transforms a 3D vector normal by a matrix. More... | |
static Vector3 | TransformNormal (Vector3 normal, MatrixD matrix) |
Transforms a 3D vector normal by a matrix. More... | |
static Vector3 | TransformNormal (Vector3D normal, Matrix matrix) |
Transforms a 3D vector normal by a matrix. More... | |
static void | TransformNormal (ref Vector3 normal, ref Matrix matrix, out Vector3 result) |
Transforms a vector normal by a matrix. More... | |
static void | TransformNormal (ref Vector3 normal, ref MatrixD matrix, out Vector3 result) |
static void | TransformNormal (ref Vector3 normal, ref MatrixI matrix, out Vector3 result) |
static Vector3 | TransformNormal (Vector3 normal, MyBlockOrientation orientation) |
static void | TransformNormal (ref Vector3 normal, MyBlockOrientation orientation, out Vector3 result) |
static Vector3 | TransformNormal (Vector3 normal, ref Matrix matrix) |
static Vector3 | Transform (Vector3 value, Quaternion rotation) |
Transforms a Vector3 by a specified Quaternion rotation. More... | |
static void | Transform (ref Vector3 value, ref Quaternion rotation, out Vector3 result) |
Transforms a Vector3 by a specified Quaternion rotation. More... | |
static void | Transform (Vector3[] sourceArray, ref Matrix matrix, Vector3[] destinationArray) |
Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array. More... | |
static void | Transform (Vector3[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3[] 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 (Vector3[] sourceArray, ref Matrix matrix, Vector3[] destinationArray) |
Transforms an array of 3D vector normals by a specified Matrix. More... | |
static void | TransformNormal (Vector3[] sourceArray, int sourceIndex, ref Matrix matrix, Vector3[] 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 (Vector3[] sourceArray, ref Quaternion rotation, Vector3[] 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 (Vector3[] sourceArray, int sourceIndex, ref Quaternion rotation, Vector3[] 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 Vector3 | Negate (Vector3 value) |
Returns a vector pointing in the opposite direction. More... | |
static void | Negate (ref Vector3 value, out Vector3 result) |
Returns a vector pointing in the opposite direction. More... | |
static Vector3 | Add (Vector3 value1, Vector3 value2) |
Adds two vectors. More... | |
static void | Add (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Adds two vectors. More... | |
static Vector3 | Subtract (Vector3 value1, Vector3 value2) |
Subtracts a vector from a vector. More... | |
static void | Subtract (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Subtracts a vector from a vector. More... | |
static Vector3 | Multiply (Vector3 value1, Vector3 value2) |
Multiplies the components of two vectors by each other. More... | |
static void | Multiply (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Multiplies the components of two vectors by each other. More... | |
static Vector3 | Multiply (Vector3 value1, float scaleFactor) |
Multiplies a vector by a scalar value. More... | |
static void | Multiply (ref Vector3 value1, float scaleFactor, out Vector3 result) |
Multiplies a vector by a scalar value. More... | |
static Vector3 | Divide (Vector3 value1, Vector3 value2) |
Divides the components of a vector by the components of another vector. More... | |
static void | Divide (ref Vector3 value1, ref Vector3 value2, out Vector3 result) |
Divides the components of a vector by the components of another vector. More... | |
static Vector3 | Divide (Vector3 value1, float value2) |
Divides a vector by a scalar value. More... | |
static void | Divide (ref Vector3 value1, float value2, out Vector3 result) |
Divides a vector by a scalar value. More... | |
static Vector3 | CalculatePerpendicularVector (Vector3 v) |
static void | GetAzimuthAndElevation (Vector3 v, out float azimuth, out float elevation) |
static void | CreateFromAzimuthAndElevation (float azimuth, float elevation, out Vector3 direction) |
static Vector3 | SwapYZCoordinates (Vector3 v) |
static Vector3 | Ceiling (Vector3 v) |
static Vector3 | Floor (Vector3 v) |
static Vector3 | Round (Vector3 v) |
static Vector3 | Round (Vector3 v, int numDecimals) |
Public Attributes | |
float | X |
Gets or sets the x-component of the vector. More... | |
float | Y |
Gets or sets the y-component of the vector. More... | |
float | Z |
Gets or sets the z-component of the vector. More... | |
Static Public Attributes | |
static Vector3 | Zero = new Vector3() |
static Vector3 | One = new Vector3(1f, 1f, 1f) |
static Vector3 | MinusOne = new Vector3(-1f, -1f, -1f) |
static Vector3 | Half = new Vector3(0.5f, 0.5f, 0.5f) |
static Vector3 | PositiveInfinity = new Vector3(float.PositiveInfinity) |
static Vector3 | NegativeInfinity = new Vector3(float.NegativeInfinity) |
static Vector3 | UnitX = new Vector3(1f, 0.0f, 0.0f) |
static Vector3 | UnitY = new Vector3(0.0f, 1f, 0.0f) |
static Vector3 | UnitZ = new Vector3(0.0f, 0.0f, 1f) |
static Vector3 | Up = new Vector3(0.0f, 1f, 0.0f) |
static Vector3 | Down = new Vector3(0.0f, -1f, 0.0f) |
static Vector3 | Right = new Vector3(1f, 0.0f, 0.0f) |
static Vector3 | Left = new Vector3(-1f, 0.0f, 0.0f) |
static Vector3 | Forward = new Vector3(0.0f, 0.0f, -1f) |
static Vector3 | Backward = new Vector3(0.0f, 0.0f, 1f) |
static Vector3 | MaxValue = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue) |
static Vector3 | MinValue = new Vector3(float.MinValue, float.MinValue, float.MinValue) |
static Vector3 | Invalid = new Vector3(float.NaN) |
Properties | |
float | Sum [get] |
float | Volume [get] |
Defines a vector with three components.
Definition at line 22 of file Vector3.cs.
|
inlinestatic |
Definition at line 62 of file Vector3.cs.
|
inline |
Initializes a new instance of Vector3.
x | Initial value for the x-component of the vector. |
y | Initial value for the y-component of the vector. |
z | Initial value for the z-component of the vector. |
Definition at line 70 of file Vector3.cs.
|
inline |
Definition at line 77 of file Vector3.cs.
|
inline |
Creates a new instance of Vector3.
value | Value to initialize each component to. |
Definition at line 88 of file Vector3.cs.
|
inline |
Initializes a new instance of Vector3.
value | A vector containing the values to initialize x and y components with. |
z | Initial value for the z-component of the vector. |
Definition at line 97 of file Vector3.cs.
|
inline |
Definition at line 104 of file Vector3.cs.
|
inline |
Definition at line 111 of file Vector3.cs.
|
inline |
Definition at line 118 of file Vector3.cs.
Definition at line 303 of file Vector3.cs.
|
inline |
Returns the component of the vector, whose absolute value is largest of all the three components.
Definition at line 821 of file Vector3.cs.
|
inline |
Returns the component of the vector, whose absolute value is smallest of all the three components.
Definition at line 770 of file Vector3.cs.
|
inline |
Definition at line 296 of file Vector3.cs.
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1632 of file Vector3.cs.
|
inlinestatic |
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] Sum of the source vectors. |
Definition at line 1645 of file Vector3.cs.
Definition at line 349 of file Vector3.cs.
|
inline |
Definition at line 338 of file Vector3.cs.
|
inlinestatic |
Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in Barycentric coordinates relative to a 3D triangle.
value1 | A Vector3 containing the 3D Cartesian coordinates of vertex 1 of the triangle. |
value2 | A Vector3 containing the 3D Cartesian coordinates of vertex 2 of the triangle. |
value3 | A Vector3 containing the 3D Cartesian coordinates of vertex 3 of the triangle. |
amount1 | Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2). |
amount2 | Barycentric coordinate b3, which expresses the weighting factor toward vertex 3 (specified in value3). |
Definition at line 1043 of file Vector3.cs.
|
inlinestatic |
Returns a Vector3 containing the 3D Cartesian coordinates of a point specified in barycentric (areal) coordinates relative to a 3D triangle.
value1 | A Vector3 containing the 3D Cartesian coordinates of vertex 1 of the triangle. |
value2 | A Vector3 containing the 3D Cartesian coordinates of vertex 2 of the triangle. |
value3 | A Vector3 containing the 3D Cartesian coordinates of vertex 3 of the triangle. |
amount1 | Barycentric coordinate b2, which expresses the weighting factor toward vertex 2 (specified in value2). |
amount2 | Barycentric 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 1056 of file Vector3.cs.
|
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 1068 of file Vector3.cs.
Definition at line 1774 of file Vector3.cs.
|
inline |
Definition at line 1781 of file Vector3.cs.
|
inlinestatic |
Performs a Catmull-Rom interpolation using the specified positions.
value1 | The first position in the interpolation. |
value2 | The second position in the interpolation. |
value3 | The third position in the interpolation. |
value4 | The fourth position in the interpolation. |
amount | Weighting factor. |
Definition at line 1114 of file Vector3.cs.
|
inlinestatic |
Performs a Catmull-Rom interpolation using the specified positions.
value1 | The first position in the interpolation. |
value2 | The second position in the interpolation. |
value3 | The third position in the interpolation. |
value4 | The fourth position in the interpolation. |
amount | Weighting factor. |
result | [OutAttribute] A vector that is the result of the Catmull-Rom interpolation. |
Definition at line 1129 of file Vector3.cs.
Definition at line 1877 of file Vector3.cs.
Restricts a value to be within a specified range.
value1 | The value to clamp. |
min | The minimum value. |
max | The maximum value. |
Definition at line 956 of file Vector3.cs.
|
inlinestatic |
Restricts a value to be within a specified range.
value1 | The value to clamp. |
min | The minimum value. |
max | The maximum value. |
result | [OutAttribute] The clamped value. |
Definition at line 978 of file Vector3.cs.
Definition at line 994 of file Vector3.cs.
|
inlinestatic |
Definition at line 1005 of file Vector3.cs.
|
inlinestatic |
Definition at line 1813 of file Vector3.cs.
Definition at line 582 of file Vector3.cs.
Calculates the cross product of two vectors.
vector1 | Source vector. |
vector2 | Source vector. |
Definition at line 658 of file Vector3.cs.
|
inlinestatic |
Calculates the cross product of two vectors.
vector1 | Source vector. |
vector2 | Source vector. |
result | [OutAttribute] The cross product of the vectors. |
Definition at line 671 of file Vector3.cs.
Calculates the distance between two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 489 of file Vector3.cs.
|
inlinestatic |
Calculates the distance between two vectors.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The distance between the vectors. |
Definition at line 501 of file Vector3.cs.
Calculates the distance between two vectors squared.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 514 of file Vector3.cs.
|
inlinestatic |
Calculates the distance between two vectors squared.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The distance between the two vectors squared. |
Definition at line 526 of file Vector3.cs.
|
inline |
Definition at line 281 of file Vector3.cs.
Divides the components of a vector by the components of another vector.
value1 | Source vector. |
value2 | Divisor vector. |
Definition at line 1728 of file Vector3.cs.
|
inlinestatic |
Divides the components of a vector by the components of another vector.
value1 | Source vector. |
value2 | The divisor. |
result | [OutAttribute] The result of the division. |
Definition at line 1741 of file Vector3.cs.
Divides a vector by a scalar value.
value1 | Source vector. |
value2 | The divisor. |
Definition at line 1752 of file Vector3.cs.
|
inlinestatic |
Divides a vector by a scalar value.
value1 | Source vector. |
value2 | The divisor. |
result | [OutAttribute] The result of the division. |
Definition at line 1766 of file Vector3.cs.
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.
value1 | Source vector. |
Definition at line 916 of file Vector3.cs.
|
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.
value1 | Source vector. |
result | [OutAttribute] The projected vector. |
Definition at line 930 of file Vector3.cs.
Calculates the dot product of two vectors. If the two vectors are unit vectors, the dot product returns a floating 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.
vector1 | Source vector. |
vector2 | Source vector. |
Definition at line 558 of file Vector3.cs.
|
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 floating 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.
vector1 | Source vector. |
vector2 | Source vector. |
result | [OutAttribute] The dot product of the two vectors. |
Definition at line 567 of file Vector3.cs.
|
inline |
Definition at line 572 of file Vector3.cs.
|
inline |
Definition at line 577 of file Vector3.cs.
|
inline |
Determines whether the specified Object is equal to the Vector3.
Definition at line 405 of file Vector3.cs.
|
inline |
Definition at line 413 of file Vector3.cs.
|
inline |
Returns a value that indicates whether the current instance is equal to a specified object.
obj | Object to make the comparison with. |
Definition at line 422 of file Vector3.cs.
Definition at line 1882 of file Vector3.cs.
|
inlinestatic |
Definition at line 1795 of file Vector3.cs.
|
inline |
Definition at line 1856 of file Vector3.cs.
|
inline |
Gets the hash code of the vector object.
Definition at line 441 of file Vector3.cs.
|
inline |
Definition at line 430 of file Vector3.cs.
|
inlinestatic |
Definition at line 625 of file Vector3.cs.
|
inlinestatic |
Performs a Hermite spline interpolation.
value1 | Source position vector. |
tangent1 | Source tangent vector. |
value2 | Source position vector. |
tangent2 | Source tangent vector. |
amount | Weighting factor. |
Definition at line 1142 of file Vector3.cs.
|
inlinestatic |
Performs a Hermite spline interpolation.
value1 | Source position vector. |
tangent1 | Source tangent vector. |
value2 | Source position vector. |
tangent2 | Source tangent vector. |
amount | Weighting factor. |
result | [OutAttribute] The result of the Hermite spline interpolation. |
Definition at line 1161 of file Vector3.cs.
Definition at line 323 of file Vector3.cs.
Definition at line 1843 of file Vector3.cs.
|
inlinestatic |
Definition at line 343 of file Vector3.cs.
|
inline |
Definition at line 331 of file Vector3.cs.
|
inlinestatic |
Definition at line 357 of file Vector3.cs.
|
inlinestatic |
Definition at line 363 of file Vector3.cs.
Definition at line 369 of file Vector3.cs.
Definition at line 375 of file Vector3.cs.
|
inline |
Calculates the length of the vector.
Definition at line 472 of file Vector3.cs.
|
inline |
Calculates the length of the vector squared.
Definition at line 480 of file Vector3.cs.
Performs a linear interpolation between two vectors.
value1 | Source vector. |
value2 | Source vector. |
amount | Value between 0 and 1 indicating the weight of value2. |
Definition at line 1019 of file Vector3.cs.
|
inlinestatic |
Performs a linear interpolation between two vectors.
value1 | Source vector. |
value2 | Source vector. |
amount | Value between 0 and 1 indicating the weight of value2. |
result | [OutAttribute] The result of the interpolation. |
Definition at line 1032 of file Vector3.cs.
|
inline |
Returns the component of the vector that is largest of all the three components.
Definition at line 787 of file Vector3.cs.
Returns a vector that contains the highest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 863 of file Vector3.cs.
|
inlinestatic |
Returns a vector that contains the highest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The maximized vector. |
Definition at line 876 of file Vector3.cs.
|
inline |
Keeps only component with maximal absolute, others are set to zero.
Definition at line 804 of file Vector3.cs.
|
inline |
Returns the component of the vector that is smallest of all the three components.
Definition at line 753 of file Vector3.cs.
Returns a vector that contains the lowest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 839 of file Vector3.cs.
|
inlinestatic |
Returns a vector that contains the lowest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The minimized vector. |
Definition at line 852 of file Vector3.cs.
Separates minimal and maximal values of any two input vectors
min | minimal values of the two vectors |
max | maximal values of the two vectors |
Definition at line 888 of file Vector3.cs.
|
inline |
Definition at line 289 of file Vector3.cs.
Multiplies the components of two vectors by each other.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1680 of file Vector3.cs.
|
inlinestatic |
Multiplies the components of two vectors by each other.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The result of the multiplication. |
Definition at line 1693 of file Vector3.cs.
Multiplies a vector by a scalar value.
value1 | Source vector. |
scaleFactor | Scalar value. |
Definition at line 1704 of file Vector3.cs.
|
inlinestatic |
Multiplies a vector by a scalar value.
value1 | Source vector. |
scaleFactor | Scalar value. |
result | [OutAttribute] The result of the multiplication. |
Definition at line 1717 of file Vector3.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
Definition at line 1608 of file Vector3.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
result | [OutAttribute] Vector pointing in the opposite direction. |
Definition at line 1621 of file Vector3.cs.
|
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 591 of file Vector3.cs.
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.
value | The source Vector3. |
Definition at line 605 of file Vector3.cs.
Definition at line 615 of file Vector3.cs.
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.
value | Source vector. |
result | [OutAttribute] The normalized vector. |
Definition at line 646 of file Vector3.cs.
Tests vectors for inequality.
value1 | Vector to compare. |
value2 | Vector to compare. |
Definition at line 154 of file Vector3.cs.
Multiplies the components of two vectors by each other.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 210 of file Vector3.cs.
Multiplies a vector by a scalar value.
value | Source vector. |
scaleFactor | Scalar value. |
Definition at line 223 of file Vector3.cs.
Multiplies a vector by a scalar value.
scaleFactor | Scalar value. |
value | Source vector. |
Definition at line 236 of file Vector3.cs.
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 166 of file Vector3.cs.
Definition at line 175 of file Vector3.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
Definition at line 129 of file Vector3.cs.
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 188 of file Vector3.cs.
Definition at line 197 of file Vector3.cs.
Divides the components of a vector by the components of another vector.
value1 | Source vector. |
value2 | Divisor vector. |
Definition at line 249 of file Vector3.cs.
Divides a vector by a scalar value.
value | Source vector. |
divider | The divisor. |
Definition at line 262 of file Vector3.cs.
Definition at line 272 of file Vector3.cs.
Tests vectors for equality.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 142 of file Vector3.cs.
Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 538 of file Vector3.cs.
|
inlinestatic |
Calculates rectangular distance (a.k.a. Manhattan distance or Chessboard distace) between two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 548 of file Vector3.cs.
Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.
vector | Source vector. |
normal | Normal of the surface. |
Definition at line 685 of file Vector3.cs.
|
inlinestatic |
Returns the reflection of a vector off a surface that has the specified normal. Reference page contains code sample.
vector | Source vector. |
normal | Normal of the surface. |
result | [OutAttribute] The reflected vector. |
Definition at line 699 of file Vector3.cs.
Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction
vector | Vector which is to be rejected |
direction | Direction from which the input vector will be rejected |
Definition at line 713 of file Vector3.cs.
|
inlinestatic |
Returns the rejection of vector from direction, i.e. projection of vector onto the plane defined by origin and direction
vector | Vector which is to be rejected |
direction | Direction from which the input vector will be rejected |
result | Rejection of the vector from the given direction |
Definition at line 726 of file Vector3.cs.
|
inlinestatic |
Transform the provided vector only about the rotation and scale terms of a matrix.
Definition at line 1267 of file Vector3.cs.
Definition at line 1887 of file Vector3.cs.
Definition at line 1892 of file Vector3.cs.
|
inline |
Definition at line 1866 of file Vector3.cs.
Definition at line 308 of file Vector3.cs.
Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign.
Definition at line 318 of file Vector3.cs.
|
inlinestatic |
Interpolates between two values using a cubic equation.
value1 | Source value. |
value2 | Source value. |
amount | Weighting value. |
Definition at line 1086 of file Vector3.cs.
|
inlinestatic |
Interpolates between two values using a cubic equation.
value1 | Source vector. |
value2 | Source vector. |
amount | Weighting value. |
result | [OutAttribute] The interpolated value. |
Definition at line 1101 of file Vector3.cs.
Definition at line 381 of file Vector3.cs.
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1656 of file Vector3.cs.
|
inlinestatic |
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The result of the subtraction. |
Definition at line 1669 of file Vector3.cs.
Definition at line 1851 of file Vector3.cs.
|
inline |
Retrieves a string representation of the current object.
Definition at line 389 of file Vector3.cs.
|
inline |
Definition at line 395 of file Vector3.cs.
Transforms a 3D vector by the given matrix.
position | The source vector. |
matrix | The transformation matrix. |
Definition at line 1178 of file Vector3.cs.
Transforms a 3D vector by the given matrix.
position | The source vector. |
matrix | The transformation matrix. |
Definition at line 1201 of file Vector3.cs.
Definition at line 1215 of file Vector3.cs.
|
inlinestatic |
Definition at line 1240 of file Vector3.cs.
|
inlinestatic |
Transforms a Vector3 by a specified Quaternion rotation.
value | The Vector3 to rotate. |
rotation | The Quaternion rotation to apply. |
Definition at line 1404 of file Vector3.cs.
|
inlinestatic |
Transforms a Vector3 by a specified Quaternion rotation.
value | The Vector3 to rotate. |
rotation | The Quaternion rotation to apply. |
result | [OutAttribute] An existing Vector3 filled in with the results of the rotation. |
Definition at line 1432 of file Vector3.cs.
|
inlinestatic |
Transforms a source array of Vector3s by a specified Matrix and writes the results to an existing destination array.
sourceArray | The source array. |
matrix | The transform Matrix to apply. |
destinationArray | An existing destination array into which the transformed Vector3s are written. |
Definition at line 1458 of file Vector3.cs.
|
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.
sourceArray | The source array. |
sourceIndex | The index in the source array at which to start. |
matrix | The transform Matrix to apply. |
destinationArray | The existing destination array. |
destinationIndex | The index in the destination array at which to start. |
length | The number of Vector3s to transform. |
Definition at line 1475 of file Vector3.cs.
|
inlinestatic |
Transforms a source array of Vector3s by a specified Quaternion rotation and writes the results to an existing destination array.
sourceArray | The source array. |
rotation | The Quaternion rotation to apply. |
destinationArray | An existing destination array into which the transformed Vector3s are written. |
Definition at line 1530 of file Vector3.cs.
|
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.
sourceArray | The source array. |
sourceIndex | The index in the source array at which to start. |
rotation | The Quaternion rotation to apply. |
destinationArray | The existing destination array. |
destinationIndex | The index in the destination array at which to start. |
length | The number of Vector3s to transform. |
Definition at line 1568 of file Vector3.cs.
|
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 1253 of file Vector3.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1306 of file Vector3.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1322 of file Vector3.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1338 of file Vector3.cs.
|
inlinestatic |
Transforms a vector normal by a matrix.
normal | The source vector. |
matrix | The transformation Matrix. |
result | [OutAttribute] The Vector3 resulting from the transformation. |
Definition at line 1354 of file Vector3.cs.
|
inlinestatic |
Definition at line 1363 of file Vector3.cs.
|
inlinestatic |
Definition at line 1373 of file Vector3.cs.
|
inlinestatic |
Definition at line 1380 of file Vector3.cs.
|
inlinestatic |
Definition at line 1387 of file Vector3.cs.
Definition at line 1394 of file Vector3.cs.
|
inlinestatic |
Transforms an array of 3D vector normals by a specified Matrix.
sourceArray | The array of Vector3 normals to transform. |
matrix | The transform matrix to apply. |
destinationArray | An existing Vector3 array into which the results of the transforms are written. |
Definition at line 1494 of file Vector3.cs.
|
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.
sourceArray | The source array of Vector3 normals. |
sourceIndex | The starting index in the source array. |
matrix | The transform Matrix to apply. |
destinationArray | The destination Vector3 array. |
destinationIndex | The starting index in the destination array. |
length | The number of vectors to transform. |
Definition at line 1511 of file Vector3.cs.
|
inline |
Definition at line 1838 of file Vector3.cs.
Definition at line 41 of file Vector3.cs.
Definition at line 37 of file Vector3.cs.
Definition at line 40 of file Vector3.cs.
Definition at line 30 of file Vector3.cs.
Definition at line 44 of file Vector3.cs.
Definition at line 39 of file Vector3.cs.
|
static |
Definition at line 42 of file Vector3.cs.
Definition at line 29 of file Vector3.cs.
|
static |
Definition at line 43 of file Vector3.cs.
Definition at line 32 of file Vector3.cs.
Definition at line 28 of file Vector3.cs.
Definition at line 31 of file Vector3.cs.
Definition at line 38 of file Vector3.cs.
Definition at line 33 of file Vector3.cs.
Definition at line 34 of file Vector3.cs.
Definition at line 35 of file Vector3.cs.
Definition at line 36 of file Vector3.cs.
float VRageMath.Vector3.X |
Gets or sets the x-component of the vector.
Definition at line 49 of file Vector3.cs.
float VRageMath.Vector3.Y |
Gets or sets the y-component of the vector.
Definition at line 54 of file Vector3.cs.
float VRageMath.Vector3.Z |
Gets or sets the z-component of the vector.
Definition at line 59 of file Vector3.cs.
Definition at line 27 of file Vector3.cs.
|
get |
Definition at line 1823 of file Vector3.cs.
|
get |
Definition at line 1831 of file Vector3.cs.