Represents a 4D vector using four single-precision floating-point numbers. More...
Public Member Functions | |
| Vector4 (float x, float y, float z, float w) | |
| Constructs a new Vector4. | |
| Vector4 (Vector2 v) | |
| Constructs a new Vector4 from the given Vector2. | |
| Vector4 (Vector3 v) | |
| Constructs a new Vector4 from the given Vector3. | |
| Vector4 (Vector3 v, float w) | |
| Constructs a new Vector4 from the specified Vector3 and w component. | |
| Vector4 (Vector4 v) | |
| Constructs a new Vector4 from the given Vector4. | |
| void | Add (Vector4 right) |
| Add the Vector passed as parameter to this instance. | |
| void | Add (ref Vector4 right) |
| Add the Vector passed as parameter to this instance. | |
| void | Sub (Vector4 right) |
| Subtract the Vector passed as parameter from this instance. | |
| void | Sub (ref Vector4 right) |
| Subtract the Vector passed as parameter from this instance. | |
| void | Mult (float f) |
| Multiply this instance by a scalar. | |
| void | Div (float f) |
| Divide this instance by a scalar. | |
| void | Normalize () |
| Scales the Vector4 to unit length. | |
| void | NormalizeFast () |
| Scales the Vector4 to approximately unit length. | |
| void | Scale (float sx, float sy, float sz, float sw) |
| Scales the current Vector4 by the given amounts. | |
| void | Scale (Vector4 scale) |
| Scales this instance by the given parameter. | |
| void | Scale (ref Vector4 scale) |
| Scales this instance by the given parameter. | |
| override string | ToString () |
| Returns a System.String that represents the current Vector4. | |
| 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 (Vector4 other) |
| Indicates whether the current vector is equal to another vector. | |
Static Public Member Functions | |
| static Vector4 | Sub (Vector4 a, Vector4 b) |
| Subtract one Vector from another. | |
| static void | Sub (ref Vector4 a, ref Vector4 b, out Vector4 result) |
| Subtract one Vector from another. | |
| static Vector4 | Mult (Vector4 a, float f) |
| Multiply a vector and a scalar. | |
| static void | Mult (ref Vector4 a, float f, out Vector4 result) |
| Multiply a vector and a scalar. | |
| static Vector4 | Div (Vector4 a, float f) |
| Divide a vector by a scalar. | |
| static void | Div (ref Vector4 a, float f, out Vector4 result) |
| Divide a vector by a scalar. | |
| static Vector4 | Add (Vector4 a, Vector4 b) |
| Adds two vectors. | |
| static void | Add (ref Vector4 a, ref Vector4 b, out Vector4 result) |
| Adds two vectors. | |
| static Vector4 | Subtract (Vector4 a, Vector4 b) |
| Subtract one Vector from another. | |
| static void | Subtract (ref Vector4 a, ref Vector4 b, out Vector4 result) |
| Subtract one Vector from another. | |
| static Vector4 | Multiply (Vector4 vector, float scale) |
| Multiplies a vector by a scalar. | |
| static void | Multiply (ref Vector4 vector, float scale, out Vector4 result) |
| Multiplies a vector by a scalar. | |
| static Vector4 | Multiply (Vector4 vector, Vector4 scale) |
| Multiplies a vector by the components a vector (scale). | |
| static void | Multiply (ref Vector4 vector, ref Vector4 scale, out Vector4 result) |
| Multiplies a vector by the components of a vector (scale). | |
| static Vector4 | Divide (Vector4 vector, float scale) |
| Divides a vector by a scalar. | |
| static void | Divide (ref Vector4 vector, float scale, out Vector4 result) |
| Divides a vector by a scalar. | |
| static Vector4 | Divide (Vector4 vector, Vector4 scale) |
| Divides a vector by the components of a vector (scale). | |
| static void | Divide (ref Vector4 vector, ref Vector4 scale, out Vector4 result) |
| Divide a vector by the components of a vector (scale). | |
| static Vector4 | Min (Vector4 a, Vector4 b) |
| Calculate the component-wise minimum of two vectors. | |
| static void | Min (ref Vector4 a, ref Vector4 b, out Vector4 result) |
| Calculate the component-wise minimum of two vectors. | |
| static Vector4 | Max (Vector4 a, Vector4 b) |
| Calculate the component-wise maximum of two vectors. | |
| static void | Max (ref Vector4 a, ref Vector4 b, out Vector4 result) |
| Calculate the component-wise maximum of two vectors. | |
| static Vector4 | Clamp (Vector4 vec, Vector4 min, Vector4 max) |
| Clamp a vector to the given minimum and maximum vectors. | |
| static void | Clamp (ref Vector4 vec, ref Vector4 min, ref Vector4 max, out Vector4 result) |
| Clamp a vector to the given minimum and maximum vectors. | |
| static Vector4 | Normalize (Vector4 vec) |
| Scale a vector to unit length. | |
| static void | Normalize (ref Vector4 vec, out Vector4 result) |
| Scale a vector to unit length. | |
| static Vector4 | NormalizeFast (Vector4 vec) |
| Scale a vector to approximately unit length. | |
| static void | NormalizeFast (ref Vector4 vec, out Vector4 result) |
| Scale a vector to approximately unit length. | |
| static float | Dot (Vector4 left, Vector4 right) |
| Calculate the dot product of two vectors. | |
| static void | Dot (ref Vector4 left, ref Vector4 right, out float result) |
| Calculate the dot product of two vectors. | |
| static Vector4 | Lerp (Vector4 a, Vector4 b, float blend) |
| Returns a new Vector that is the linear blend of the 2 given Vectors. | |
| static void | Lerp (ref Vector4 a, ref Vector4 b, float blend, out Vector4 result) |
| Returns a new Vector that is the linear blend of the 2 given Vectors. | |
| static Vector4 | BaryCentric (Vector4 a, Vector4 b, Vector4 c, float u, float v) |
| Interpolate 3 Vectors using Barycentric coordinates. | |
| static void | BaryCentric (ref Vector4 a, ref Vector4 b, ref Vector4 c, float u, float v, out Vector4 result) |
| Interpolate 3 Vectors using Barycentric coordinates. | |
| static Vector4 | Transform (Vector4 vec, Matrix4 mat) |
| Transform a Vector by the given Matrix. | |
| static void | Transform (ref Vector4 vec, ref Matrix4 mat, out Vector4 result) |
| Transform a Vector by the given Matrix. | |
| static Vector4 | Transform (Vector4 vec, Quaternion quat) |
| Transforms a vector by a quaternion rotation. | |
| static void | Transform (ref Vector4 vec, ref Quaternion quat, out Vector4 result) |
| Transforms a vector by a quaternion rotation. | |
| static Vector4 | operator+ (Vector4 left, Vector4 right) |
| Adds two instances. | |
| static Vector4 | operator- (Vector4 left, Vector4 right) |
| Subtracts two instances. | |
| static Vector4 | operator- (Vector4 vec) |
| Negates an instance. | |
| static Vector4 | operator* (Vector4 vec, float scale) |
| Multiplies an instance by a scalar. | |
| static Vector4 | operator* (float scale, Vector4 vec) |
| Multiplies an instance by a scalar. | |
| static Vector4 | operator/ (Vector4 vec, float scale) |
| Divides an instance by a scalar. | |
| static bool | operator== (Vector4 left, Vector4 right) |
| Compares two instances for equality. | |
| static bool | operator!= (Vector4 left, Vector4 right) |
| Compares two instances for inequality. | |
| unsafe static | operator float * (Vector4 v) |
| Returns a pointer to the first element of the specified instance. | |
| static | operator IntPtr (Vector4 v) |
| Returns a pointer to the first element of the specified instance. | |
Public Attributes | |
| float | X |
| The X component of the Vector4. | |
| float | Y |
| The Y component of the Vector4. | |
| float | Z |
| The Z component of the Vector4. | |
| float | W |
| The W component of the Vector4. | |
Static Public Attributes | |
| static Vector4 | UnitX = new Vector4(1, 0, 0, 0) |
| Defines a unit-length Vector4 that points towards the X-axis. | |
| static Vector4 | UnitY = new Vector4(0, 1, 0, 0) |
| Defines a unit-length Vector4 that points towards the Y-axis. | |
| static Vector4 | UnitZ = new Vector4(0, 0, 1, 0) |
| Defines a unit-length Vector4 that points towards the Z-axis. | |
| static Vector4 | UnitW = new Vector4(0, 0, 0, 1) |
| Defines a unit-length Vector4 that points towards the W-axis. | |
| static Vector4 | Zero = new Vector4(0, 0, 0, 0) |
| Defines a zero-length Vector4. | |
| static readonly Vector4 | One = new Vector4(1, 1, 1, 1) |
| Defines an instance with all components set to 1. | |
| static readonly int | SizeInBytes = Marshal.SizeOf(new Vector4()) |
| Defines the size of the Vector4 struct in bytes. | |
Properties | |
| float | Length [get] |
| Gets the length (magnitude) of the vector. | |
| float | LengthFast [get] |
| Gets an approximation of the vector length (magnitude). | |
| float | LengthSquared [get] |
| Gets the square of the vector length (magnitude). | |
| Vector2 | Xy [get, set] |
| Gets or sets an OpenTK.Vector2 with the X and Y components of this instance. | |
| Vector3 | Xyz [get, set] |
| Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance. | |
Represents a 4D vector using four single-precision floating-point numbers.
The Vector4 structure is suitable for interoperation with unmanaged code requiring four consecutive floats.
Definition at line 36 of file Vector4.cs.
| OpenTK.Vector4.Vector4 | ( | float | x, | |
| float | y, | |||
| float | z, | |||
| float | w | |||
| ) |
| OpenTK.Vector4.Vector4 | ( | Vector2 | v | ) |
| OpenTK.Vector4.Vector4 | ( | Vector3 | v | ) |
| OpenTK.Vector4.Vector4 | ( | Vector3 | v, | |
| float | w | |||
| ) |
| OpenTK.Vector4.Vector4 | ( | Vector4 | v | ) |
Adds two vectors.
| a | Left operand. | |
| b | Right operand. | |
| result | Result of operation. |
Definition at line 517 of file Vector4.cs.
00518 { 00519 result = new Vector4(a.X + b.X, a.Y + b.Y, a.Z + b.Z, a.W + b.W); 00520 }
Adds two vectors.
| a | Left operand. | |
| b | Right operand. |
Definition at line 505 of file Vector4.cs.
00506 { 00507 Add(ref a, ref b, out a); 00508 return a; 00509 }
| void OpenTK.Vector4.Add | ( | ref Vector4 | right | ) |
| void OpenTK.Vector4.Add | ( | Vector4 | right | ) |
| static void OpenTK.Vector4.BaryCentric | ( | ref Vector4 | a, | |
| ref Vector4 | b, | |||
| ref Vector4 | c, | |||
| float | u, | |||
| float | v, | |||
| out Vector4 | 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 902 of file Vector4.cs.
00903 { 00904 result = a; // copy 00905 00906 Vector4 temp = b; // copy 00907 Subtract(ref temp, ref a, out temp); 00908 Multiply(ref temp, u, out temp); 00909 Add(ref result, ref temp, out result); 00910 00911 temp = c; // copy 00912 Subtract(ref temp, ref a, out temp); 00913 Multiply(ref temp, v, out temp); 00914 Add(ref result, ref temp, out result); 00915 }
| static Vector4 OpenTK.Vector4.BaryCentric | ( | Vector4 | a, | |
| Vector4 | b, | |||
| Vector4 | c, | |||
| float | u, | |||
| float | 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 890 of file Vector4.cs.
| static void OpenTK.Vector4.Clamp | ( | ref Vector4 | vec, | |
| ref Vector4 | min, | |||
| ref Vector4 | max, | |||
| out Vector4 | 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 742 of file Vector4.cs.
00743 { 00744 result.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X; 00745 result.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y; 00746 result.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z; 00747 result.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W; 00748 }
Clamp a vector to the given minimum and maximum vectors.
| vec | Input vector | |
| min | Minimum vector | |
| max | Maximum vector |
Definition at line 726 of file Vector4.cs.
00727 { 00728 vec.X = vec.X < min.X ? min.X : vec.X > max.X ? max.X : vec.X; 00729 vec.Y = vec.Y < min.Y ? min.Y : vec.Y > max.Y ? max.Y : vec.Y; 00730 vec.Z = vec.X < min.Z ? min.Z : vec.Z > max.Z ? max.Z : vec.Z; 00731 vec.W = vec.Y < min.W ? min.W : vec.W > max.W ? max.W : vec.W; 00732 return vec; 00733 }
Divide a vector by a scalar.
| a | Vector operand | |
| f | Scalar operand | |
| result | Result of the division |
Definition at line 484 of file Vector4.cs.
Divide a vector by a scalar.
| a | Vector operand | |
| f | Scalar operand |
Definition at line 468 of file Vector4.cs.
| void OpenTK.Vector4.Div | ( | float | f | ) |
| static void OpenTK.Vector4.Divide | ( | ref Vector4 | vector, | |
| ref Vector4 | scale, | |||
| out Vector4 | 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 644 of file Vector4.cs.
00645 { 00646 result = new Vector4(vector.X / scale.X, vector.Y / scale.Y, vector.Z / scale.Z, vector.W / scale.W); 00647 }
Divides a vector by the components of a vector (scale).
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 632 of file Vector4.cs.
00633 { 00634 Divide(ref vector, ref scale, out vector); 00635 return vector; 00636 }
Divides a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 621 of file Vector4.cs.
00622 { 00623 Multiply(ref vector, 1 / scale, out result); 00624 }
Divides a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 609 of file Vector4.cs.
00610 { 00611 Divide(ref vector, scale, out vector); 00612 return vector; 00613 }
Calculate the dot product of two vectors.
| left | First operand | |
| right | Second operand | |
| result | The dot product of the two inputs |
Definition at line 837 of file Vector4.cs.
Calculate the dot product of two vectors.
| left | First operand | |
| right | Second operand |
Definition at line 826 of file Vector4.cs.
| bool OpenTK.Vector4.Equals | ( | Vector4 | other | ) |
Indicates whether the current vector is equal to another vector.
| other | A vector to compare with this vector. |
Definition at line 1188 of file Vector4.cs.
| override bool OpenTK.Vector4.Equals | ( | object | obj | ) |
Indicates whether this instance and a specified object are equal.
| obj | The object to compare to. |
Definition at line 1169 of file Vector4.cs.
| override int OpenTK.Vector4.GetHashCode | ( | ) |
| static void OpenTK.Vector4.Lerp | ( | ref Vector4 | a, | |
| ref Vector4 | b, | |||
| float | blend, | |||
| out Vector4 | 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 869 of file Vector4.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 853 of file Vector4.cs.
Calculate the component-wise maximum of two vectors.
| a | First operand | |
| b | Second operand | |
| result | The component-wise maximum |
Definition at line 707 of file Vector4.cs.
Calculate the component-wise maximum of two vectors.
| a | First operand | |
| b | Second operand |
Definition at line 692 of file Vector4.cs.
Calculate the component-wise minimum of two vectors.
| a | First operand | |
| b | Second operand | |
| result | The component-wise minimum |
Definition at line 674 of file Vector4.cs.
Calculate the component-wise minimum of two vectors.
| a | First operand | |
| b | Second operand |
Definition at line 659 of file Vector4.cs.
Multiply a vector and a scalar.
| a | Vector operand | |
| f | Scalar operand | |
| result | Result of the multiplication |
Definition at line 450 of file Vector4.cs.
Multiply a vector and a scalar.
| a | Vector operand | |
| f | Scalar operand |
Definition at line 435 of file Vector4.cs.
| void OpenTK.Vector4.Mult | ( | float | f | ) |
| static void OpenTK.Vector4.Multiply | ( | ref Vector4 | vector, | |
| ref Vector4 | scale, | |||
| out Vector4 | 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 594 of file Vector4.cs.
00595 { 00596 result = new Vector4(vector.X * scale.X, vector.Y * scale.Y, vector.Z * scale.Z, vector.W * scale.W); 00597 }
Multiplies a vector by the components a vector (scale).
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 582 of file Vector4.cs.
00583 { 00584 Multiply(ref vector, ref scale, out vector); 00585 return vector; 00586 }
| static void OpenTK.Vector4.Multiply | ( | ref Vector4 | vector, | |
| float | scale, | |||
| out Vector4 | result | |||
| ) | [static] |
Multiplies a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. | |
| result | Result of the operation. |
Definition at line 571 of file Vector4.cs.
00572 { 00573 result = new Vector4(vector.X * scale, vector.Y * scale, vector.Z * scale, vector.W * scale); 00574 }
Multiplies a vector by a scalar.
| vector | Left operand. | |
| scale | Right operand. |
Definition at line 559 of file Vector4.cs.
00560 { 00561 Multiply(ref vector, scale, out vector); 00562 return vector; 00563 }
Scale a vector to unit length.
| vec | The input vector | |
| result | The normalized vector |
Definition at line 774 of file Vector4.cs.
Scale a vector to unit length.
| vec | The input vector |
Definition at line 759 of file Vector4.cs.
| void OpenTK.Vector4.Normalize | ( | ) |
Scale a vector to approximately unit length.
| vec | The input vector | |
| result | The normalized vector |
Definition at line 807 of file Vector4.cs.
Scale a vector to approximately unit length.
| vec | The input vector |
Definition at line 792 of file Vector4.cs.
| void OpenTK.Vector4.NormalizeFast | ( | ) |
| unsafe static OpenTK.Vector4.operator float * | ( | Vector4 | v | ) | [explicit, static] |
Returns a pointer to the first element of the specified instance.
| v | The instance. |
Definition at line 1114 of file Vector4.cs.
| static OpenTK.Vector4.operator IntPtr | ( | Vector4 | v | ) | [explicit, static] |
Returns a pointer to the first element of the specified instance.
| v | The instance. |
Definition at line 1124 of file Vector4.cs.
Compares two instances for inequality.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1103 of file Vector4.cs.
Multiplies an instance by a scalar.
| scale | The scalar. | |
| vec | The instance. |
Definition at line 1061 of file Vector4.cs.
Multiplies an instance by a scalar.
| vec | The instance. | |
| scale | The scalar. |
Definition at line 1046 of file Vector4.cs.
Adds two instances.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1002 of file Vector4.cs.
Negates an instance.
| vec | The instance. |
Definition at line 1031 of file Vector4.cs.
Subtracts two instances.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1017 of file Vector4.cs.
Divides an instance by a scalar.
| vec | The instance. | |
| scale | The scalar. |
Definition at line 1076 of file Vector4.cs.
Compares two instances for equality.
| left | The first instance. | |
| right | The second instance. |
Definition at line 1092 of file Vector4.cs.
| void OpenTK.Vector4.Scale | ( | ref Vector4 | scale | ) |
| void OpenTK.Vector4.Scale | ( | Vector4 | scale | ) |
| void OpenTK.Vector4.Scale | ( | float | sx, | |
| float | sy, | |||
| float | sz, | |||
| float | sw | |||
| ) |
Scales the current Vector4 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 355 of file Vector4.cs.
Subtract one Vector from another.
| a | First operand | |
| b | Second operand | |
| result | Result of subtraction |
Definition at line 417 of file Vector4.cs.
Subtract one Vector from another.
| a | First operand | |
| b | Second operand |
Definition at line 402 of file Vector4.cs.
| void OpenTK.Vector4.Sub | ( | ref Vector4 | right | ) |
| void OpenTK.Vector4.Sub | ( | Vector4 | right | ) |
Subtract one Vector from another.
| a | First operand | |
| b | Second operand | |
| result | Result of subtraction |
Definition at line 544 of file Vector4.cs.
00545 { 00546 result = new Vector4(a.X - b.X, a.Y - b.Y, a.Z - b.Z, a.W - b.W); 00547 }
Subtract one Vector from another.
| a | First operand | |
| b | Second operand |
Definition at line 532 of file Vector4.cs.
00533 { 00534 Subtract(ref a, ref b, out a); 00535 return a; 00536 }
| override string OpenTK.Vector4.ToString | ( | ) |
| static void OpenTK.Vector4.Transform | ( | ref Vector4 | vec, | |
| ref Quaternion | quat, | |||
| out Vector4 | 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 964 of file Vector4.cs.
00965 { 00966 Quaternion v = new Quaternion(vec.X, vec.Y, vec.Z, vec.W), i, t; 00967 Quaternion.Invert(ref quat, out i); 00968 Quaternion.Multiply(ref quat, ref v, out t); 00969 Quaternion.Multiply(ref t, ref i, out v); 00970 00971 result = new Vector4(v.X, v.Y, v.Z, v.W); 00972 }
| static Vector4 OpenTK.Vector4.Transform | ( | Vector4 | vec, | |
| Quaternion | 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 951 of file Vector4.cs.
| static void OpenTK.Vector4.Transform | ( | ref Vector4 | vec, | |
| ref Matrix4 | mat, | |||
| out Vector4 | 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 936 of file Vector4.cs.
00937 { 00938 result = new Vector4( 00939 vec.X * mat.Row0.X + vec.Y * mat.Row1.X + vec.Z * mat.Row2.X + vec.W * mat.Row3.X, 00940 vec.X * mat.Row0.Y + vec.Y * mat.Row1.Y + vec.Z * mat.Row2.Y + vec.W * mat.Row3.Y, 00941 vec.X * mat.Row0.Z + vec.Y * mat.Row1.Z + vec.Z * mat.Row2.Z + vec.W * mat.Row3.Z, 00942 vec.X * mat.Row0.W + vec.Y * mat.Row1.W + vec.Z * mat.Row2.W + vec.W * mat.Row3.W); 00943 }
Transform a Vector by the given Matrix.
| vec | The vector to transform | |
| mat | The desired transformation |
Definition at line 925 of file Vector4.cs.
readonly Vector4 OpenTK.Vector4.One = new Vector4(1, 1, 1, 1) [static] |
Defines an instance with all components set to 1.
Definition at line 88 of file Vector4.cs.
readonly int OpenTK.Vector4.SizeInBytes = Marshal.SizeOf(new Vector4()) [static] |
Defines the size of the Vector4 struct in bytes.
Definition at line 93 of file Vector4.cs.
Vector4 OpenTK.Vector4.UnitW = new Vector4(0, 0, 0, 1) [static] |
Defines a unit-length Vector4 that points towards the W-axis.
Definition at line 78 of file Vector4.cs.
Vector4 OpenTK.Vector4.UnitX = new Vector4(1, 0, 0, 0) [static] |
Defines a unit-length Vector4 that points towards the X-axis.
Definition at line 63 of file Vector4.cs.
Vector4 OpenTK.Vector4.UnitY = new Vector4(0, 1, 0, 0) [static] |
Defines a unit-length Vector4 that points towards the Y-axis.
Definition at line 68 of file Vector4.cs.
Vector4 OpenTK.Vector4.UnitZ = new Vector4(0, 0, 1, 0) [static] |
Defines a unit-length Vector4 that points towards the Z-axis.
Definition at line 73 of file Vector4.cs.
| float OpenTK.Vector4.W |
The W component of the Vector4.
Definition at line 58 of file Vector4.cs.
| float OpenTK.Vector4.X |
The X component of the Vector4.
Definition at line 43 of file Vector4.cs.
| float OpenTK.Vector4.Y |
The Y component of the Vector4.
Definition at line 48 of file Vector4.cs.
| float OpenTK.Vector4.Z |
The Z component of the Vector4.
Definition at line 53 of file Vector4.cs.
Vector4 OpenTK.Vector4.Zero = new Vector4(0, 0, 0, 0) [static] |
Defines a zero-length Vector4.
Definition at line 83 of file Vector4.cs.
float OpenTK.Vector4.Length [get] |
Gets the length (magnitude) of the vector.
Definition at line 262 of file Vector4.cs.
float OpenTK.Vector4.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 283 of file Vector4.cs.
float OpenTK.Vector4.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 304 of file Vector4.cs.
Vector2 OpenTK.Vector4.Xy [get, set] |
Gets or sets an OpenTK.Vector2 with the X and Y components of this instance.
Definition at line 984 of file Vector4.cs.
Vector3 OpenTK.Vector4.Xyz [get, set] |
Gets or sets an OpenTK.Vector3 with the X, Y and Z components of this instance.
Definition at line 990 of file Vector4.cs.
1.6.1