![]() |
VectorNav .NET Library
|
Represents a Euclidean vector of dimension 4 with an underlying data value type of float.
More...
Public Member Functions | |
| override string | ToString () |
| vec4f (float value) | |
| Creates a new vec4f with the XYZW (0, 1, 2 and 3) components initialized to the provided value. More... | |
| vec4f (float x, float y, float z, float w) | |
| Creates a new vec4f with the provided values for its components. More... | |
| vec4f | Negate () |
| Negates vec4f. More... | |
| float | Magnitude () |
| Computes and returns the magnitude of the vec4f. More... | |
| vec4f | Normalize () |
| Normalizes the vec4f. More... | |
| vec4f | Multiply (float scalar) |
Multiplies this vec4f by the provided scalar value and returns the result. More... | |
| vec4f | Divide (float scalar) |
| Divides this vec4f by the provided scalar value and returns the result. More... | |
| vec4f | Add (vec4f vector) |
| Adds this vec4f with the provided vec4f together. More... | |
| vec4f | Subtract (vec4f rhs) |
| Subtracts the provided vec4f from this vec4f. More... | |
| float | DotProduct (vec4f vector) |
| Computes the dot product of this vec4f and the provided vec4f. More... | |
| float[] | ToArray () |
| Returns an array of the vec4f's component values. More... | |
Static Public Member Functions | |
| static vec4f | operator* (vec4f lhs, float rhs) |
| Operator overloaded version of Multiply method. More... | |
| static vec4f | operator* (float lhs, vec4f rhs) |
| Operator overloaded version of Multiply method. More... | |
| static vec4f | operator/ (vec4f lhs, float rhs) |
| Operator overloaded version of Divide method. More... | |
| static vec4f | operator+ (vec4f lhs, vec4f rhs) |
| Operator overloaded version of Add method. More... | |
| static vec4f | operator- (vec4f lhs, vec4f rhs) |
| Operator overloaded version of Subtract method. More... | |
| static vec4f | operator- (vec4f value) |
| Operator overloaded version of Negate method. More... | |
Public Attributes | |
| float | X |
| The X (0-component) value. More... | |
| float | Y |
| The Y (1-component) value. More... | |
| float | Z |
| The Z (2-component) value. More... | |
| float | W |
| The W (3-component) value. More... | |
Properties | |
| int | Dimension [get] |
| The dimensions of the vec4f. More... | |
| static vec4f | Zero [get] |
| Returns a new vec4f with all of its components initialized to 0. More... | |
| static vec4f | One [get] |
| Returns a new vec4f with all of its components initialized to 1. More... | |
| static vec4f | UnitX [get] |
| Returns a new unit vec4f in the X (0-dimension) direction. More... | |
| static vec4f | UnitY [get] |
| Returns a new unit vec4f in the Y (1-dimension) direction. More... | |
| static vec4f | UnitZ [get] |
| Returns a new unit vec4f in the Z (2-dimension) direction. More... | |
| static vec4f | UnitW [get] |
| Returns a new unit vec4f in the W (3-dimension) direction. More... | |
| float | this[int index] [get, set] |
| Allows indexing into the vec4f. More... | |
Represents a Euclidean vector of dimension 4 with an underlying data value type of float.
| VectorNav.Math.vec4f.vec4f | ( | float | value | ) |
Creates a new vec4f with the XYZW (0, 1, 2 and 3) components initialized to the provided value.
| value | The value to initialize the XYZW (0, 1, 2 and 3) components with. |
| VectorNav.Math.vec4f.vec4f | ( | float | x, |
| float | y, | ||
| float | z, | ||
| float | w | ||
| ) |
Creates a new vec4f with the provided values for its components.
| x | The value for the X (0) component. |
| y | The value for the Y (1) component. |
| z | The value for the Z (2) component. |
| w | The value for the W (3) component. |
| vec4f VectorNav.Math.vec4f.Divide | ( | float | scalar | ) |
| float VectorNav.Math.vec4f.DotProduct | ( | vec4f | vector | ) |
| float VectorNav.Math.vec4f.Magnitude | ( | ) |
Computes and returns the magnitude of the vec4f.
| vec4f VectorNav.Math.vec4f.Multiply | ( | float | scalar | ) |
| float [] VectorNav.Math.vec4f.ToArray | ( | ) |
| float VectorNav.Math.vec4f.W |
The W (3-component) value.
| float VectorNav.Math.vec4f.X |
The X (0-component) value.
| float VectorNav.Math.vec4f.Y |
The Y (1-component) value.
| float VectorNav.Math.vec4f.Z |
The Z (2-component) value.
|
get |
The dimensions of the vec4f.
|
staticget |
Returns a new vec4f with all of its components initialized to 1.
|
getset |
Allows indexing into the vec4f.
| index | The specified index. Must be in the range [0, 3]. |
| IndexOutOfRangeException | Thrown if the specified index is out of range. |
|
staticget |
Returns a new unit vec4f in the W (3-dimension) direction.
|
staticget |
Returns a new unit vec4f in the X (0-dimension) direction.
|
staticget |
Returns a new unit vec4f in the Y (1-dimension) direction.
|
staticget |
Returns a new unit vec4f in the Z (2-dimension) direction.
|
staticget |
Returns a new vec4f with all of its components initialized to 0.
1.8.10