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