Space Engineers
|
Defines a vector with three components. More...
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] |
Defines a vector with three components.
Definition at line 13 of file Vector3D.cs.
|
inlinestatic |
Definition at line 48 of file Vector3D.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 56 of file Vector3D.cs.
|
inline |
Creates a new instance of Vector3.
value | Value to initialize each component to. |
Definition at line 67 of file Vector3D.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 76 of file Vector3D.cs.
|
inline |
Definition at line 83 of file Vector3D.cs.
|
inline |
Definition at line 90 of file Vector3D.cs.
|
inline |
Definition at line 97 of file Vector3D.cs.
|
inline |
Definition at line 104 of file Vector3D.cs.
|
inline |
Definition at line 111 of file Vector3D.cs.
|
inline |
Definition at line 118 of file Vector3D.cs.
Definition at line 389 of file Vector3D.cs.
Definition at line 2157 of file Vector3D.cs.
|
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.
|
inline |
Definition at line 1007 of file Vector3D.cs.
|
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.
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1877 of file Vector3D.cs.
|
inlinestatic |
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] Sum of the source vectors. |
Definition at line 1890 of file Vector3D.cs.
Definition at line 435 of file Vector3D.cs.
|
inline |
Definition at line 424 of file Vector3D.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 1243 of file Vector3D.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 1256 of file Vector3D.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 1268 of file Vector3D.cs.
Definition at line 2020 of file Vector3D.cs.
|
inline |
Definition at line 2028 of file Vector3D.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 1314 of file Vector3D.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 1329 of file Vector3D.cs.
|
inlinestatic |
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 1154 of file Vector3D.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 1176 of file Vector3D.cs.
Definition at line 1193 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1205 of file Vector3D.cs.
|
inlinestatic |
Definition at line 2060 of file Vector3D.cs.
Definition at line 798 of file Vector3D.cs.
Calculates the cross product of two vectors.
vector1 | Source vector. |
vector2 | Source vector. |
Definition at line 847 of file Vector3D.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 860 of file Vector3D.cs.
Calculates the distance between two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 672 of file Vector3D.cs.
Definition at line 680 of file Vector3D.cs.
Definition at line 688 of file Vector3D.cs.
|
inlinestatic |
Calculates the distance between two vectors.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The distance between the vectors. |
Definition at line 699 of file Vector3D.cs.
Calculates the distance between two vectors squared.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 712 of file Vector3D.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 724 of file Vector3D.cs.
Divides the components of a vector by the components of another vector.
value1 | Source vector. |
value2 | Divisor vector. |
Definition at line 1973 of file Vector3D.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 1986 of file Vector3D.cs.
Divides a vector by a scalar value.
value1 | Source vector. |
value2 | The divisor. |
Definition at line 1997 of file Vector3D.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 2011 of file Vector3D.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 1106 of file Vector3D.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 1132 of file Vector3D.cs.
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.
vector1 | Source vector. |
vector2 | Source vector. |
Definition at line 756 of file Vector3D.cs.
Definition at line 760 of file Vector3D.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 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.
vector1 | Source vector. |
vector2 | Source vector. |
result | [OutAttribute] The dot product of the two vectors. |
Definition at line 769 of file Vector3D.cs.
|
inlinestatic |
Definition at line 773 of file Vector3D.cs.
|
inlinestatic |
Definition at line 777 of file Vector3D.cs.
|
inline |
Definition at line 782 of file Vector3D.cs.
|
inline |
Definition at line 787 of file Vector3D.cs.
|
inline |
Definition at line 793 of file Vector3D.cs.
|
inline |
Determines whether the specified Object is equal to the Vector3.
Definition at line 588 of file Vector3D.cs.
|
inline |
Definition at line 596 of file Vector3D.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 605 of file Vector3D.cs.
Definition at line 2140 of file Vector3D.cs.
Definition at line 2145 of file Vector3D.cs.
|
inlinestatic |
Definition at line 2042 of file Vector3D.cs.
|
inline |
Definition at line 2103 of file Vector3D.cs.
|
inline |
Gets the hash code of the vector object.
Definition at line 624 of file Vector3D.cs.
|
inline |
Definition at line 613 of file Vector3D.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 1342 of file Vector3D.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 1361 of file Vector3D.cs.
Definition at line 409 of file Vector3D.cs.
Definition at line 2090 of file Vector3D.cs.
|
inlinestatic |
Definition at line 429 of file Vector3D.cs.
|
inline |
Definition at line 417 of file Vector3D.cs.
|
inlinestatic |
Definition at line 443 of file Vector3D.cs.
|
inlinestatic |
Definition at line 449 of file Vector3D.cs.
Definition at line 455 of file Vector3D.cs.
Definition at line 461 of file Vector3D.cs.
|
inline |
Calculates the length of the vector.
Definition at line 655 of file Vector3D.cs.
|
inline |
Calculates the length of the vector squared.
Definition at line 663 of file Vector3D.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. |
Definition at line 1219 of file Vector3D.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 1232 of file Vector3D.cs.
|
inline |
Returns the component of the vector that is largest of all the three components.
Definition at line 976 of file Vector3D.cs.
Returns a vector that contains the highest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1053 of file Vector3D.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 1066 of file Vector3D.cs.
|
inline |
Returns the component of the vector that is smallest of all the three components.
Definition at line 942 of file Vector3D.cs.
Returns a vector that contains the lowest value from each matching pair of components.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1029 of file Vector3D.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 1042 of file Vector3D.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 1078 of file Vector3D.cs.
Multiplies the components of two vectors by each other.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1925 of file Vector3D.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 1938 of file Vector3D.cs.
Multiplies a vector by a scalar value.
value1 | Source vector. |
scaleFactor | Scalar value. |
Definition at line 1949 of file Vector3D.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 1962 of file Vector3D.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
Definition at line 1853 of file Vector3D.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
result | [OutAttribute] Vector pointing in the opposite direction. |
Definition at line 1866 of file Vector3D.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 807 of file Vector3D.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 821 of file Vector3D.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 835 of file Vector3D.cs.
Definition at line 2125 of file Vector3D.cs.
Definition at line 2130 of file Vector3D.cs.
Tests vectors for inequality.
value1 | Vector to compare. |
value2 | Vector to compare. |
Definition at line 169 of file Vector3D.cs.
Definition at line 176 of file Vector3D.cs.
Definition at line 183 of file Vector3D.cs.
Definition at line 191 of file Vector3D.cs.
Modulo division of two vectors.
value1 | |
value2 |
Definition at line 206 of file Vector3D.cs.
Multiplies the components of two vectors by each other.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 318 of file Vector3D.cs.
Multiplies a vector by a scalar value.
value | Source vector. |
scaleFactor | Scalar value. |
Definition at line 331 of file Vector3D.cs.
Multiplies a vector by a scalar value.
scaleFactor | Scalar value. |
value | Source vector. |
Definition at line 344 of file Vector3D.cs.
Adds two vectors.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 219 of file Vector3D.cs.
Definition at line 228 of file Vector3D.cs.
Definition at line 237 of file Vector3D.cs.
Definition at line 246 of file Vector3D.cs.
Definition at line 255 of file Vector3D.cs.
Definition at line 264 of file Vector3D.cs.
Returns a vector pointing in the opposite direction.
value | Source vector. |
Definition at line 129 of file Vector3D.cs.
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 277 of file Vector3D.cs.
Definition at line 286 of file Vector3D.cs.
Definition at line 295 of file Vector3D.cs.
Definition at line 305 of file Vector3D.cs.
Divides the components of a vector by the components of another vector.
value1 | Source vector. |
value2 | Divisor vector. |
Definition at line 357 of file Vector3D.cs.
Divides a vector by a scalar value.
value | Source vector. |
divider | The divisor. |
Definition at line 370 of file Vector3D.cs.
Definition at line 380 of file Vector3D.cs.
Tests vectors for equality.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 143 of file Vector3D.cs.
Definition at line 150 of file Vector3D.cs.
Definition at line 157 of file Vector3D.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 736 of file Vector3D.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 746 of file Vector3D.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 874 of file Vector3D.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 888 of file Vector3D.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 902 of file Vector3D.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 915 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1644 of file Vector3D.cs.
Definition at line 1654 of file Vector3D.cs.
|
inlinestatic |
Transform the provided vector only about the rotation and scale terms of a matrix.
Definition at line 1471 of file Vector3D.cs.
Definition at line 2135 of file Vector3D.cs.
Definition at line 2152 of file Vector3D.cs.
|
inline |
Definition at line 2114 of file Vector3D.cs.
Definition at line 394 of file Vector3D.cs.
Returns per component sign, never returns zero. For zero component returns sign 1. Faster than Sign.
Definition at line 404 of file Vector3D.cs.
|
inlinestatic |
Interpolates between two values using a cubic equation.
value1 | Source value. |
value2 | Source value. |
amount | Weighting value. |
Definition at line 1286 of file Vector3D.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 1301 of file Vector3D.cs.
Definition at line 467 of file Vector3D.cs.
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
Definition at line 1901 of file Vector3D.cs.
|
inlinestatic |
Subtracts a vector from a vector.
value1 | Source vector. |
value2 | Source vector. |
result | [OutAttribute] The result of the subtraction. |
Definition at line 1914 of file Vector3D.cs.
Definition at line 2098 of file Vector3D.cs.
|
inline |
Retrieves a string representation of the current object.
Definition at line 475 of file Vector3D.cs.
|
inline |
Definition at line 578 of file Vector3D.cs.
Transforms a 3D vector by the given matrix.
position | The source vector. |
matrix | The transformation matrix. |
Definition at line 1378 of file Vector3D.cs.
Definition at line 1390 of file Vector3D.cs.
Transforms a 3D vector by the given matrix.
position | The source vector. |
matrix | The transformation matrix. |
Definition at line 1407 of file Vector3D.cs.
Definition at line 1420 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1441 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1482 of file Vector3D.cs.
|
inlinestatic |
Transforms a Vector3 by a specified Quaternion rotation.
value | The Vector3 to rotate. |
rotation | The Quaternion rotation to apply. |
Definition at line 1594 of file Vector3D.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 1622 of file Vector3D.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 1665 of file Vector3D.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 1684 of file Vector3D.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 1701 of file Vector3D.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 1775 of file Vector3D.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 1813 of file Vector3D.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 1457 of file Vector3D.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1495 of file Vector3D.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1511 of file Vector3D.cs.
Transforms a 3D vector normal by a matrix.
normal | The source vector. |
matrix | The transformation matrix. |
Definition at line 1527 of file Vector3D.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 1543 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1553 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1563 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1570 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1577 of file Vector3D.cs.
|
inlinestatic |
Definition at line 1584 of file Vector3D.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 1720 of file Vector3D.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 1739 of file Vector3D.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 1756 of file Vector3D.cs.
|
inlinestatic |
Definition at line 481 of file Vector3D.cs.
|
inline |
Definition at line 2085 of file Vector3D.cs.
Definition at line 28 of file Vector3D.cs.
Definition at line 24 of file Vector3D.cs.
Definition at line 27 of file Vector3D.cs.
Definition at line 17 of file Vector3D.cs.
Definition at line 26 of file Vector3D.cs.
|
static |
Definition at line 29 of file Vector3D.cs.
|
static |
Definition at line 30 of file Vector3D.cs.
Definition at line 19 of file Vector3D.cs.
Definition at line 16 of file Vector3D.cs.
Definition at line 18 of file Vector3D.cs.
Definition at line 25 of file Vector3D.cs.
Definition at line 20 of file Vector3D.cs.
Definition at line 21 of file Vector3D.cs.
Definition at line 22 of file Vector3D.cs.
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.
Definition at line 15 of file Vector3D.cs.
|
get |
Definition at line 2070 of file Vector3D.cs.
|
get |
Definition at line 2078 of file Vector3D.cs.