VectorNav .NET Library
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
VectorNav.Math.quatf Struct Reference

Represents an orientation/attitude as Euler parameters (quaternion). Though it is conceptually difficult to visualize the orientation of a given set of quaternion values (as opposed to Eulter angles such as yaw, pitch, roll), they are useful for heavy mathematical processing because they avoid mathematical sigularities common when using Euler angles. More...

Public Member Functions

override string ToString ()
 
 quatf (float x, float y, float z, float w)
 Creates a new qautf with the provided values for its components. More...
 
quatf Negate ()
 Negates quatf. More...
 
float Magnitude ()
 Computes and returns the magnitude of the quatf. More...
 
quatf Normalize ()
 Normalizes the quatf. More...
 
quatf Multiply (float scalar)
 Multiplies this quatf by the provided scalar value and returns the result. More...
 
quatf Divide (float scalar)
 Divides this quatf by the provided scalar value and returns the result. More...
 
quatf Subtract (quatf rhs)
 Subtracts the provided quatf from this quatf. More...
 
float PrincipleRotationAngle ()
 Computes the angle of rotation about the quaternion's principle rotation angle in radians. More...
 
float PrincipleRotationAngleInDegs ()
 Computes the angle of rotation about the quaternion's principle rotation angle in degrees. More...
 
float[] ToArray ()
 Returns an array of the quatf's component values. More...
 

Static Public Member Functions

static implicit operator quatf (vec4f v)
 
static quatf operator* (quatf lhs, float rhs)
 Operator overloaded version of Multiply method. More...
 
static quatf operator* (float lhs, quatf rhs)
 Operator overloaded version of Multiply method. More...
 
static quatf operator/ (quatf lhs, float rhs)
 Operator overloaded version of Divide method. More...
 
static quatf operator- (quatf lhs, quatf rhs)
 Operator overloaded version of Subtract method. More...
 
static quatf operator- (quatf 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 quatf. More...
 
static quatf NoRotation [get]
 Returns a new quatf representing no rotation. More...
 
float this[int index] [get, set]
 Allows indexing into the quatf. More...
 

Detailed Description

Represents an orientation/attitude as Euler parameters (quaternion). Though it is conceptually difficult to visualize the orientation of a given set of quaternion values (as opposed to Eulter angles such as yaw, pitch, roll), they are useful for heavy mathematical processing because they avoid mathematical sigularities common when using Euler angles.

Constructor & Destructor Documentation

VectorNav.Math.quatf.quatf ( float  x,
float  y,
float  z,
float  w 
)

Creates a new qautf with the provided values for its components.

Parameters
xThe value for the X (0) component.
yThe value for the Y (1) component.
zThe value for the Z (2) component.
wThe value for the W (3) component.

Member Function Documentation

quatf VectorNav.Math.quatf.Divide ( float  scalar)

Divides this quatf by the provided scalar value and returns the result.

Parameters
scalarThe scalar value to divide this quatf by.
Returns
The resulting quatf.
Exceptions
DivideByZeroExceptionThe provided scalar had a value of zero.
float VectorNav.Math.quatf.Magnitude ( )

Computes and returns the magnitude of the quatf.

Returns
The computed magnitude.
quatf VectorNav.Math.quatf.Multiply ( float  scalar)

Multiplies this quatf by the provided scalar value and returns the result.

Parameters
scalarThe scalar value to multiply this quatf by.
Returns
The resulting quatf.
quatf VectorNav.Math.quatf.Negate ( )

Negates quatf.

Returns
The negated quatf.
quatf VectorNav.Math.quatf.Normalize ( )

Normalizes the quatf.

Returns
The normalized quatf.
static quatf VectorNav.Math.quatf.operator* ( quatf  lhs,
float  rhs 
)
static

Operator overloaded version of Multiply method.

Parameters
lhsThe left-side quatf of the multiplication symbol.
rhsThe right-side scalar of the multiplication symbol.
Returns
The quatf resulting from the operation.
static quatf VectorNav.Math.quatf.operator* ( float  lhs,
quatf  rhs 
)
static

Operator overloaded version of Multiply method.

Parameters
lhsThe left-side scalar of the multiplication symbol.
rhsThe right-side quatf of the multiplication symbol.
Returns
The quatf resulting from the operation.
static quatf VectorNav.Math.quatf.operator- ( quatf  lhs,
quatf  rhs 
)
static

Operator overloaded version of Subtract method.

Parameters
lhsThe left-side quatf of the subtraction symbol.
rhsThe right-side quatf of the subtraction symbol.
Returns
The quatf resulting from the operation.
static quatf VectorNav.Math.quatf.operator- ( quatf  value)
static

Operator overloaded version of Negate method.

Parameters
valueThe quatf to negate.
Returns
The negated quatf.
static quatf VectorNav.Math.quatf.operator/ ( quatf  lhs,
float  rhs 
)
static

Operator overloaded version of Divide method.

Parameters
lhsThe left-side quatf of the division symbol.
rhsThe right-side scalar of the division symbol.
Returns
The quatf resulting from the operation.
float VectorNav.Math.quatf.PrincipleRotationAngle ( )

Computes the angle of rotation about the quaternion's principle rotation angle in radians.

Returns
The principle rotation angle in radians.
float VectorNav.Math.quatf.PrincipleRotationAngleInDegs ( )

Computes the angle of rotation about the quaternion's principle rotation angle in degrees.

Returns
The principle rotation angle in degrees.
quatf VectorNav.Math.quatf.Subtract ( quatf  rhs)

Subtracts the provided quatf from this quatf.

Parameters
rhsThe quatf to subtract from this quatf.
Returns
The resultant quatf from the subtraction.
float [] VectorNav.Math.quatf.ToArray ( )

Returns an array of the quatf's component values.

Returns
The array containing the quatf components.

Member Data Documentation

float VectorNav.Math.quatf.W

The W (3-component) value.

float VectorNav.Math.quatf.X

The X (0-component) value.

float VectorNav.Math.quatf.Y

The Y (1-component) value.

float VectorNav.Math.quatf.Z

The Z (2-component) value.

Property Documentation

int VectorNav.Math.quatf.Dimension
get

The dimensions of the quatf.

quatf VectorNav.Math.quatf.NoRotation
staticget

Returns a new quatf representing no rotation.

float VectorNav.Math.quatf.this[int index]
getset

Allows indexing into the quatf.

Parameters
indexThe specified index. Must be in the range [0, 3].
Returns
The value at the specified index.
Exceptions
IndexOutOfRangeExceptionThrown if the specified index is out of range.

The documentation for this struct was generated from the following file: