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