Represents a 4D vector using four double-precision floating-point numbers. More...
Public Member Functions | |
| Vector4d (double x, double y, double z, double w) | |
| Constructs a new Vector4d. | |
| Vector4d (Vector2d v) | |
| Constructs a new Vector4d from the given Vector2d. | |
| Vector4d (Vector3d v) | |
| Constructs a new Vector4d from the given Vector3d. | |
| Vector4d (Vector3 v, double w) | |
| Constructs a new Vector4d from the specified Vector3d and w component. | |
| Vector4d (Vector4d v) | |
| Constructs a new Vector4d from the given Vector4d. | |
| void | Add (Vector4d right) |
| Add the Vector passed as parameter to this instance. | |
| void | Add (ref Vector4d right) |
| Add the Vector passed as parameter to this instance. | |
| void | Sub (Vector4d right) |
| Subtract the Vector passed as parameter from this instance. | |
| void | Sub (ref Vector4d right) |
| Subtract the Vector passed as parameter from this instance. | |
| void | Mult (double f) |
| Multiply this instance by a scalar. | |
| void | Div (double f) |
| Divide this instance by a scalar. | |
| void | Normalize () |
| Scales the Vector4d to unit length. | |
| void | NormalizeFast () |
| Scales the Vector4d to approximately unit length. | |
| void | Scale (double sx, double sy, double sz, double sw) |
| Scales the current Vector4d by the given amounts. | |
| void | Scale (Vector4d scale) |
| Scales this instance by the given parameter. | |
| void | Scale (ref Vector4d scale) |
| Scales this instance by the given parameter. | |
| override string | ToString () |
| Returns a System.String that represents the current Vector4d. | |
| override int | GetHashCode () |
| Returns the hashcode for this instance. | |
| override bool | Equals (object obj) |
| Indicates whether this instance and a specified object are equal. | |
| bool | Equals (Vector4d other) |
| Indicates whether the current vector is equal to another vector. | |
Static Public Member Functions | |
| static Vector4d | Sub (Vector4d a, Vector4d b) |
| Subtract one Vector from another. | |
| static void | Sub (ref Vector4d a, ref Vector4d b, out Vector4d result) |
| Subtract one Vector from another. | |
| static Vector4d | Mult (Vector4d a, double f) |
| Multiply a vector and a scalar. | |
| static void | Mult (ref Vector4d a, double f, out Vector4d result) |
| Multiply a vector and a scalar. | |
| static Vector4d | Div (Vector4d a, double f) |
| Divide a vector by a scalar. | |
| static void | Div (ref Vector4d a, double f, out Vector4d result) |
| Divide a vector by a scalar. | |
| static Vector4d | Add (Vector4d a, Vector4d b) |
| Adds two vectors. | |
| static void | Add (ref Vector4d a, ref Vector4d b, out Vector4d result) |
| Adds two vectors. | |
| static Vector4d | Subtract (Vector4d a, Vector4d b) |
| Subtract one Vector from another. | |
| static void | Subtract (ref Vector4d a, ref Vector4d b, out Vector4d result) |
| Subtract one Vector from another. | |
| static Vector4d | Multiply (Vector4d vector, double scale) |
| Multiplies a vector by a scalar. | |
| static void | Multiply (ref Vector4d vector, double scale, out Vector4d result) |
| Multiplies a vector by a scalar. | |
| static Vector4d | Multiply (Vector4d vector, Vector4d scale) |
| Multiplies a vector by the components a vector (scale). | |
| static void | Multiply (ref Vector4d vector, ref Vector4d scale, out Vector4d result) |
| Multiplies a vector by the components of a vector (scale). | |
| static Vector4d | Divide (Vector4d vector, double scale) |
| Divides a vector by a scalar. | |
| static void | Divide (ref Vector4d vector, double scale, out Vector4d result) |
| Divides a vector by a scalar. | |
| static Vector4d | Divide (Vector4d vector, Vector4d scale) |
| Divides a vector by the components of a vector (scale). | |
| static void | Divide (ref Vector4d vector, ref Vector4d scale, out Vector4d result) |
| Divide a vector by the components of a vector (scale). | |
| static Vector4d | Min (Vector4d a, Vector4d b) |
| Calculate the component-wise minimum of two vectors. | |
| static void | Min (ref Vector4d a, ref Vector4d b, out Vector4d result) |
| Calculate the component-wise minimum of two vectors. | |
| static Vector4d | Max (Vector4d a, Vector4d b) |
| Calculate the component-wise maximum of two vectors. | |
| static void | Max (ref Vector4d a, ref Vector4d b, out Vector4d result) |
| Calculate the component-wise maximum of two vectors. | |
| static Vector4d | Clamp (Vector4d vec, Vector4d min, Vector4d max) |
| Clamp a vector to the given minimum and maximum vectors. | |
| static void | Clamp (ref Vector4d vec, ref Vector4d min, ref Vector4d max, out Vector4d result) |
| Clamp a vector to the given minimum and maximum vectors. | |
| static Vector4d | Normalize (Vector4d vec) |
| Scale a vector to unit length. | |
| static void | Normalize (ref Vector4d vec, out Vector4d result) |
| Scale a vector to unit length. | |
| static Vector4d | NormalizeFast (Vector4d vec) |
| Scale a vector to approximately unit length. | |
| static void | NormalizeFast (ref Vector4d vec, out Vector4d result) |
| Scale a vector to approximately unit length. | |
| static double | Dot (Vector4d left, Vector4d right) |
| Calculate the dot product of two vectors. | |
| static void | Dot (ref Vector4d left, ref Vector4d right, out double result) |
| Calculate the dot product of two vectors. | |
| static Vector4d | Lerp (Vector4d a, Vector4d b, double blend) |
| Returns a new Vector that is the linear blend of the 2 given Vectors. | |
| static void | Lerp (ref Vector4d a, ref Vector4d b, double blend, out Vector4d result) |
| Returns a new Vector that is the linear blend of the 2 given Vectors. | |
| static Vector4d | BaryCentric (Vector4d a, Vector4d b, Vector4d c, double u, double v) |
| Interpolate 3 Vectors using Barycentric coordinates. | |
| static void | BaryCentric (ref Vector4d a, ref Vector4d b, ref Vector4d c, double u, double v, out Vector4d result) |
| Interpolate 3 Vectors using Barycentric coordinates. | |
| static Vector4d | Transform (Vector4d vec, Matrix4d mat) |
| Transform a Vector by the given Matrix. | |
| static void | Transform (ref Vector4d vec, ref Matrix4d mat, out Vector4d result) |
| Transform a Vector by the given Matrix. | |
| static Vector4d | Transform (Vector4d vec, Quaterniond quat) |
| Transforms a vector by a quaternion rotation. | |
| static void | Transform (ref Vector4d vec, ref Quaterniond quat, out Vector4d result) |
| Transforms a vector by a quaternion rotation. | |
| static Vector4d | operator+ (Vector4d left, Vector4d right) |
| Adds two instances. | |
| static Vector4d | operator- (Vector4d left, Vector4d right) |
| Subtracts two instances. | |
| static Vector4d | operator- (Vector4d vec) |
| Negates an instance. | |
| static Vector4d | operator* (Vector4d vec, double scale) |
| Multiplies an instance by a scalar. | |
| static Vector4d | operator* (double scale, Vector4d vec) |
| Multiplies an instance by a scalar. | |
| static Vector4d | operator/ (Vector4d vec, double scale) |
| Divides an instance by a scalar. | |
| static bool | operator== (Vector4d left, Vector4d right) |
| Compares two instances for equality. | |
| static bool | operator!= (Vector4d left, Vector4d right) |
| Compares two instances for inequality. | |
| unsafe static | operator double * (Vector4d v) |
| Returns a pointer to the first element of the specified instance. | |
| static | operator IntPtr (Vector4d v) |
| Returns a pointer to the first element of the specified instance. | |
| static | operator Vector4d (Vector4 v4) |
| Converts OpenTK.Vector4 to OpenTK.Vector4d. | |
| static | operator Vector4 (Vector4d v4d) |
| Converts OpenTK.Vector4d to OpenTK.Vector4. | |
Public Attributes | |
| double | X |
| The X component of the Vector4d. | |
| double | Y |
| The Y component of the Vector4d. | |
| double | Z |
| The Z component of the Vector4d. | |
| double | W |
| The W component of the Vector4d. | |
Static Public Attributes | |
| static Vector4d | UnitX = new Vector4d(1, 0, 0, 0) |
| Defines a unit-length Vector4d that points towards the X-axis. | |
| static Vector4d | UnitY = new Vector4d(0, 1, 0, 0) |
| Defines a unit-length Vector4d that points towards the Y-axis. | |
| static Vector4d | UnitZ = new Vector4d(0, 0, 1, 0) |
| Defines a unit-length Vector4d that points towards the Z-axis. | |
| static Vector4d | UnitW = new Vector4d(0, 0, 0, 1) |
| Defines a unit-length Vector4d that points towards the W-axis. | |
| static Vector4d | Zero = new Vector4d(0, 0, 0, 0) |
| Defines a zero-length Vector4d. | |
| static readonly Vector4d | One = new Vector4d(1, 1, 1, 1) |
| Defines an instance with all components set to 1. | |
| static readonly int | SizeInBytes = Marshal.SizeOf(new Vector4d()) |
| Defines the size of the Vector4d struct in bytes. | |
Properties | |
| double | Length [get] |
| Gets the length (magnitude) of the vector. | |
| double | LengthFast [get] |
| Gets an approximation of the vector length (magnitude). | |
| double | LengthSquared [get] |
| Gets the square of the vector length (magnitude). | |
| Vector2d | Xy [get, set] |
| Gets or sets an OpenTK.Vector2d with the X and Y components of this instance. | |
| Vector3d | Xyz [get, set] |
| Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance. | |
Represents a 4D vector using four double-precision floating-point numbers.
Definition at line 34 of file Vector4d.cs.
| OpenTK.Vector4d.Vector4d | ( | double | x, | |
| double | y, | |||
| double | z, | |||
| double | w | |||
| ) |
| OpenTK.Vector4d.Vector4d | ( | Vector2d | v | ) |
| OpenTK.Vector4d.Vector4d | ( | Vector3d | v | ) |
| OpenTK.Vector4d.Vector4d | ( | Vector3 | v, | |
| double | w | |||
| ) |
| OpenTK.Vector4d.Vector4d | ( | Vector4d | v | ) |
Adds two vectors.
| a | Left operand. | |
| b | Right operand. | |
| result | Result of operation. |
Definition at line 520 of file Vector4d.cs.
00521 { 00522 result = new Vector4d(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); 00523 }
Adds two vectors.
| a | Left operand. | |
| b | Right operand. |
Definition at line 508 of file Vector4d.cs.
00509 { 00510 Add(ref a, ref b, out a); 00511 return a; 00512 }
| void OpenTK.Vector4d.Add | ( | ref Vector4d | right | ) |
| void OpenTK.Vector4d.Add | ( | Vector4d | right | ) |
| static void OpenTK.Vector4d.BaryCentric | ( | ref Vector4d | a, | |
| ref Vector4d | b, | |||
| ref Vector4d | c, | |||
| double | u, | |||
| double | v, | |||
| out Vector4d | result | |||
| ) | [static] |
Interpolate 3 Vectors using Barycentric coordinates.
| a | First input Vector. | |
| b | Second input Vector. | |
| c | Third input Vector. | |
| u | First Barycentric Coordinate. | |
| v | Second Barycentric Coordinate. | |
| result | Output Vector. a when u=v=0, b when u=1,v=0, c when u=0,v=1, and a linear combination of a,b,c otherwise |
Definition at line 905 of file Vector4d.cs.
00906 { 00907 result = a; // copy 00908 00909 Vector4d temp = b; // copy 00910 Subtract(ref temp, ref a, out temp); 00911 Multiply(ref temp, u, out temp); 00912 Add(ref result, ref temp, out result); 00913 00914 temp = c; // copy 00915 Subtract(ref temp, ref a, out temp); 00916 Multiply(ref temp, v, out temp); 00917 Add(ref result, ref temp, out result); 00918 }
| static Vector4d OpenTK.Vector4d.BaryCentric | ( | Vector4d | a, | |
| Vector4d | b, | |||
| Vector4d | c, | |||
| double | u, | |||
| double | v | |||
| ) | [static] |
Interpolate 3 Vectors using Barycentric coordinates.
| a | First input Vector | |
| b | Second input Vector | |
| c | Third input Vector | |
| u | First Barycentric Coordinate | |
| v | Second Barycentric Coordinate |
Definition at line 893 of file Vector4d.cs.
| static void OpenTK.Vector4d.Clamp | ( | ref Vector4d | vec, | |
| ref Vector4d | min, | |||
| ref Vector4d | max, | |||
| out Vector4d | result | |||
| ) | [static] |
Clamp a vector to the given minimum and maximum vectors.
| vec | Input vector | |
| min | Minimum vector | |
| max | Maximum vector | |
| result | The clamped vector |
Definition at line 745 of file Vector4d.cs.
00746 { 00747 result.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X; 00748 result.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y; 00749 result.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z; 00750 result.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W; 00751 }
Clamp a vector to the given minimum and maximum vectors.
| vec | Input vector | |
| min | Minimum vector | |
| max | Maximum vector |
Definition at line 729 of file Vector4d.cs.
00730 { 00731 vec.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X; 00732 vec.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y; 00733 vec.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z; 00734 vec.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W; 00735 return vec; 00736 }
Divide a vector by a scalar.
| a | Vector operand | |
| f | Scalar operand | |
| result | Result of the division |
Definition at line 487 of file Vector4d.cs.
Divide a vector by a scalar.
| a | Vector operand | |
| f | Scalar operand |
Definition at line 470 of file Vector4d.cs.
| void OpenTK.Vector4d.Div | ( | double | f | ) |
| static void OpenTK.Vector4d.Divide | ( | ref Vector4d | vector, | |
| ref Vector4d | scale, | |||
| out Vector4d | result | |||
| ) | [static] |
Divide a vector by the components of a vector (scale).
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 647 of file Vector4d.cs.
00648 { 00649 result = new Vector4d(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z, vector.W / scale.W); 00650 }
Divides a vector by the components of a vector (scale).
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 635 of file Vector4d.cs.
00636 { 00637 Divide(ref vector, ref scale, out vector); 00638 return vector; 00639 }
| static void OpenTK.Vector4d.Divide | ( | ref Vector4d | vector, | |
| double | scale, | |||
| out Vector4d | result | |||
| ) | [static] |
Divides a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 624 of file Vector4d.cs.
00625 { 00626 Multiply(ref vector, 1 / scale, out result); 00627 }
Divides a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 612 of file Vector4d.cs.
00613 { 00614 Divide(ref vector, scale, out vector); 00615 return vector; 00616 }
| static void OpenTK.Vector4d.Dot | ( | ref Vector4d | left, | |
| ref Vector4d | right, | |||
| out double | result | |||
| ) | [static] |
Calculate the dot product of two vectors.
| left | First operand | |
| right | Second operand | |
| result | The dot product of the two inputs |
Definition at line 840 of file Vector4d.cs.
Calculate the dot product of two vectors.
| left | First operand | |
| right | Second operand |
Definition at line 829 of file Vector4d.cs.
| bool OpenTK.Vector4d.Equals | ( | Vector4d | other | ) |
Indicates whether the current vector is equal to another vector.
| other | A vector to compare with this vector. |
Definition at line 1207 of file Vector4d.cs.
| override bool OpenTK.Vector4d.Equals | ( | object | obj | ) |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
Definition at line 1188 of file Vector4d.cs.
| override int OpenTK.Vector4d.GetHashCode | ( | ) |
| static void OpenTK.Vector4d.Lerp | ( | ref Vector4d | a, | |
| ref Vector4d | b, | |||
| double | blend, | |||
| out Vector4d | result | |||
| ) | [static] |
Returns a new Vector that is the linear blend of the 2 given Vectors.
| a | First input vector | |
| b | Second input vector | |
| blend | The blend factor. a when blend=0, b when blend=1. | |
| result | a when blend=0, b when blend=1, and a linear combination otherwise |
Definition at line 872 of file Vector4d.cs.
Returns a new Vector that is the linear blend of the 2 given Vectors.
| a | First input vector | |
| b | Second input vector | |
| blend | The blend factor. a when blend=0, b when blend=1. |
Definition at line 856 of file Vector4d.cs.
Calculate the component-wise maximum of two vectors.
| a | First operand | |
| b | Second operand | |
| result | The component-wise maximum |
Definition at line 710 of file Vector4d.cs.
Calculate the component-wise maximum of two vectors.
| a | First operand | |
| b | Second operand |
Definition at line 695 of file Vector4d.cs.
Calculate the component-wise minimum of two vectors.
| a | First operand | |
| b | Second operand | |
| result | The component-wise minimum |
Definition at line 677 of file Vector4d.cs.
Calculate the component-wise minimum of two vectors.
| a | First operand | |
| b | Second operand |
Definition at line 662 of file Vector4d.cs.
Multiply a vector and a scalar.
| a | Vector operand | |
| f | Scalar operand | |
| result | Result of the multiplication |
Definition at line 451 of file Vector4d.cs.
Multiply a vector and a scalar.
| a | Vector operand | |
| f | Scalar operand |
Definition at line 435 of file Vector4d.cs.
| void OpenTK.Vector4d.Mult | ( | double | f | ) |
| static void OpenTK.Vector4d.Multiply | ( | ref Vector4d | vector, | |
| ref Vector4d | scale, | |||
| out Vector4d | result | |||
| ) | [static] |
Multiplies a vector by the components of a vector (scale).
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 597 of file Vector4d.cs.
00598 { 00599 result = new Vector4d(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z, vector.W * scale.W); 00600 }
Multiplies a vector by the components a vector (scale).
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 585 of file Vector4d.cs.
00586 { 00587 Multiply(ref vector, ref scale, out vector); 00588 return vector; 00589 }
| static void OpenTK.Vector4d.Multiply | ( | ref Vector4d | vector, | |
| double | scale, | |||
| out Vector4d | result | |||
| ) | [static] |
Multiplies a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 574 of file Vector4d.cs.
00575 { 00576 result = new Vector4d(vector.X * scale, vector.Y * scale, vector.Z * scale, vector.W * scale); 00577 }
Multiplies a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 562 of file Vector4d.cs.
00563 { 00564 Multiply(ref vector, scale, out vector); 00565 return vector; 00566 }
Scale a vector to unit length.
| vec | The input vector | |
| result | The normalized vector |
Definition at line 777 of file Vector4d.cs.
Scale a vector to unit length.
| vec | The input vector |
Definition at line 762 of file Vector4d.cs.
| void OpenTK.Vector4d.Normalize | ( | ) |
Scale a vector to approximately unit length.
| vec | The input vector | |
| result | The normalized vector |
Definition at line 810 of file Vector4d.cs.
Scale a vector to approximately unit length.
| vec | The input vector |
Definition at line 795 of file Vector4d.cs.
| void OpenTK.Vector4d.NormalizeFast | ( | ) |
| unsafe static OpenTK.Vector4d.operator double * | ( | Vector4d | v | ) | [explicit, static] |
Returns a pointer to the first element of the specified instance.
| v | The instance. |
Definition at line 1117 of file Vector4d.cs.
| static OpenTK.Vector4d.operator IntPtr | ( | Vector4d | v | ) | [explicit, static] |
Returns a pointer to the first element of the specified instance.
| v | The instance. |
Definition at line 1127 of file Vector4d.cs.
Converts OpenTK.Vector4d to OpenTK.Vector4.
| v4d | The Vector4d to convert. |
Definition at line 1146 of file Vector4d.cs.
Converts OpenTK.Vector4 to OpenTK.Vector4d.
| v4 | The Vector4 to convert. |
Definition at line 1138 of file Vector4d.cs.
01139 { 01140 return new Vector4d(v4.X, v4.Y, v4.Z, v4.W); 01141 }
Compares two instances for inequality.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1106 of file Vector4d.cs.
Multiplies an instance by a scalar.
| scale | The scalar. | |
| vec | The instance. |
Definition at line 1064 of file Vector4d.cs.
Multiplies an instance by a scalar.
| vec | The instance. | |
| scale | The scalar. |
Definition at line 1049 of file Vector4d.cs.
Adds two instances.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1005 of file Vector4d.cs.
Negates an instance.
| vec | The instance. |
Definition at line 1034 of file Vector4d.cs.
Subtracts two instances.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1020 of file Vector4d.cs.
Divides an instance by a scalar.
| vec | The instance. | |
| scale | The scalar. |
Definition at line 1079 of file Vector4d.cs.
Compares two instances for equality.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1095 of file Vector4d.cs.
| void OpenTK.Vector4d.Scale | ( | ref Vector4d | scale | ) |
| void OpenTK.Vector4d.Scale | ( | Vector4d | scale | ) |
| void OpenTK.Vector4d.Scale | ( | double | sx, | |
| double | sy, | |||
| double | sz, | |||
| double | sw | |||
| ) |
Scales the current Vector4d by the given amounts.
| sx | The scale of the X component. | |
| sy | The scale of the Y component. | |
| sz | The scale of the Z component. | |
| sw | The scale of the Z component. |
Definition at line 352 of file Vector4d.cs.
Subtract one Vector from another.
| a | First operand | |
| b | Second operand | |
| result | Result of subtraction |
Definition at line 416 of file Vector4d.cs.
Subtract one Vector from another.
| a | First operand | |
| b | Second operand |
Definition at line 400 of file Vector4d.cs.
| void OpenTK.Vector4d.Sub | ( | ref Vector4d | right | ) |
| void OpenTK.Vector4d.Sub | ( | Vector4d | right | ) |
| static void OpenTK.Vector4d.Subtract | ( | ref Vector4d | a, | |
| ref Vector4d | b, | |||
| out Vector4d | result | |||
| ) | [static] |
Subtract one Vector from another.
| a | First operand | |
| b | Second operand | |
| result | Result of subtraction |
Definition at line 547 of file Vector4d.cs.
00548 { 00549 result = new Vector4d(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); 00550 }
Subtract one Vector from another.
| a | First operand | |
| b | Second operand |
Definition at line 535 of file Vector4d.cs.
00536 { 00537 Subtract(ref a, ref b, out a); 00538 return a; 00539 }
| override string OpenTK.Vector4d.ToString | ( | ) |
| static void OpenTK.Vector4d.Transform | ( | ref Vector4d | vec, | |
| ref Quaterniond | quat, | |||
| out Vector4d | result | |||
| ) | [static] |
Transforms a vector by a quaternion rotation.
| vec | The vector to transform. | |
| quat | The quaternion to rotate the vector by. | |
| result | The result of the operation. |
Definition at line 967 of file Vector4d.cs.
00968 { 00969 Quaterniond v = new Quaterniond(vec.X, vec.Y, vec.Z, vec.W), i, t; 00970 Quaterniond.Invert(ref quat, out i); 00971 Quaterniond.Multiply(ref quat, ref v, out t); 00972 Quaterniond.Multiply(ref t, ref i, out v); 00973 00974 result = new Vector4d(v.X, v.Y, v.Z, v.W); 00975 }
| static Vector4d OpenTK.Vector4d.Transform | ( | Vector4d | vec, | |
| Quaterniond | quat | |||
| ) | [static] |
Transforms a vector by a quaternion rotation.
| vec | The vector to transform. | |
| quat | The quaternion to rotate the vector by. |
Definition at line 954 of file Vector4d.cs.
| static void OpenTK.Vector4d.Transform | ( | ref Vector4d | vec, | |
| ref Matrix4d | mat, | |||
| out Vector4d | result | |||
| ) | [static] |
Transform a Vector by the given Matrix.
| vec | The vector to transform | |
| mat | The desired transformation | |
| result | The transformed vector |
Definition at line 939 of file Vector4d.cs.
00940 { 00941 result = new Vector4d( 00942 vec.X * mat.Row0.X + vec.Y * mat.Row1.X + vec.Z * mat.Row2.X + vec.W * mat.Row3.X, 00943 vec.X * mat.Row0.Y + vec.Y * mat.Row1.Y + vec.Z * mat.Row2.Y + vec.W * mat.Row3.Y, 00944 vec.X * mat.Row0.Z + vec.Y * mat.Row1.Z + vec.Z * mat.Row2.Z + vec.W * mat.Row3.Z, 00945 vec.X * mat.Row0.W + vec.Y * mat.Row1.W + vec.Z * mat.Row2.W + vec.W * mat.Row3.W); 00946 }
Transform a Vector by the given Matrix.
| vec | The vector to transform | |
| mat | The desired transformation |
Definition at line 928 of file Vector4d.cs.
readonly Vector4d OpenTK.Vector4d.One = new Vector4d(1, 1, 1, 1) [static] |
Defines an instance with all components set to 1.
Definition at line 86 of file Vector4d.cs.
readonly int OpenTK.Vector4d.SizeInBytes = Marshal.SizeOf(new Vector4d()) [static] |
Defines the size of the Vector4d struct in bytes.
Definition at line 91 of file Vector4d.cs.
Vector4d OpenTK.Vector4d.UnitW = new Vector4d(0, 0, 0, 1) [static] |
Defines a unit-length Vector4d that points towards the W-axis.
Definition at line 76 of file Vector4d.cs.
Vector4d OpenTK.Vector4d.UnitX = new Vector4d(1, 0, 0, 0) [static] |
Defines a unit-length Vector4d that points towards the X-axis.
Definition at line 61 of file Vector4d.cs.
Vector4d OpenTK.Vector4d.UnitY = new Vector4d(0, 1, 0, 0) [static] |
Defines a unit-length Vector4d that points towards the Y-axis.
Definition at line 66 of file Vector4d.cs.
Vector4d OpenTK.Vector4d.UnitZ = new Vector4d(0, 0, 1, 0) [static] |
Defines a unit-length Vector4d that points towards the Z-axis.
Definition at line 71 of file Vector4d.cs.
| double OpenTK.Vector4d.W |
The W component of the Vector4d.
Definition at line 56 of file Vector4d.cs.
| double OpenTK.Vector4d.X |
The X component of the Vector4d.
Definition at line 41 of file Vector4d.cs.
| double OpenTK.Vector4d.Y |
The Y component of the Vector4d.
Definition at line 46 of file Vector4d.cs.
| double OpenTK.Vector4d.Z |
The Z component of the Vector4d.
Definition at line 51 of file Vector4d.cs.
Vector4d OpenTK.Vector4d.Zero = new Vector4d(0, 0, 0, 0) [static] |
Defines a zero-length Vector4d.
Definition at line 81 of file Vector4d.cs.
double OpenTK.Vector4d.Length [get] |
Gets the length (magnitude) of the vector.
Definition at line 260 of file Vector4d.cs.
double OpenTK.Vector4d.LengthFast [get] |
Gets an approximation of the vector length (magnitude).
This property uses an approximation of the square root function to calculate vector magnitude, with an upper error bound of 0.001.
Definition at line 281 of file Vector4d.cs.
double OpenTK.Vector4d.LengthSquared [get] |
Gets the square of the vector length (magnitude).
This property avoids the costly square root operation required by the Length property. This makes it more suitable for comparisons.
Definition at line 301 of file Vector4d.cs.
Vector2d OpenTK.Vector4d.Xy [get, set] |
Gets or sets an OpenTK.Vector2d with the X and Y components of this instance.
Definition at line 987 of file Vector4d.cs.
Vector3d OpenTK.Vector4d.Xyz [get, set] |
Gets or sets an OpenTK.Vector3d with the X, Y and Z components of this instance.
Definition at line 993 of file Vector4d.cs.
1.6.1