LeapQuaternionΒΆ

The LeapQuaternion struct represents a rotation in three-dimensional space. More...

Inherits IEquatable< LeapQuaternion >.

Public Member Functions

bool Equals (LeapQuaternion v)
 Compare LeapQuaternion equality component-wise. More...
 
bool IsValid ()
 Returns true if all of the quaternion's components are finite. More...
 
 LeapQuaternion (float x, float y, float z, float w)
 Creates a new LeapQuaternion with the specified component values. More...
 
 LeapQuaternion (LeapQuaternion quaternion)
 Copies the specified LeapQuaternion. More...
 
 LeapQuaternion (LeapInternal.LEAP_QUATERNION quaternion)
 Copies the specified LEAP_QUATERNION. More...
 
LeapQuaternion Multiply (LeapQuaternion rhs)
 Concatenates the rotation described by this quaternion with the one provided and returns the result. More...
 
override string ToString ()
 Returns a string containing this quaternion in a human readable format: (x, y, z). More...
 

Public Attributes

float w
 The w component. More...
 
float x
 The x component. More...
 
float y
 The y component. More...
 
float z
 The z component. More...
 

Static Public Attributes

static readonly LeapQuaternion Identity = new LeapQuaternion(0, 0, 0, 1)
 The identity quaternion. More...
 

Properties

float Magnitude [get]
 The magnitude, or length, of this quaternion. More...
 
float MagnitudeSquared [get]
 The square of the magnitude, or length, of this quaternion. More...
 
LeapQuaternion Normalized [get]
 A normalized copy of this quaternion. More...
 

Detailed Description

The LeapQuaternion struct represents a rotation in three-dimensional space.

Since
3.1.2

Constructor & Destructor Documentation

LeapQuaternion ( float  x,
float  y,
float  z,
float  w 
)

Creates a new LeapQuaternion with the specified component values.

Parameters
xthe i-basis component
ythe j-basis component
zthe k-basis component
wthe scalar component
Since
3.1.2
LeapQuaternion ( LeapQuaternion  quaternion)

Copies the specified LeapQuaternion.

Parameters
quaternionthe LeapQuaternion to copy.
Since
3.1.2
LeapQuaternion ( LeapInternal.LEAP_QUATERNION  quaternion)

Copies the specified LEAP_QUATERNION.

Parameters
quaternionthe LEAP_QUATERNION struct to copy.
Since
3.1.2

Member Function Documentation

bool Equals ( LeapQuaternion  v)

Compare LeapQuaternion equality component-wise.

Since
3.1.2
bool IsValid ( )

Returns true if all of the quaternion's components are finite.

If any component is NaN or infinite, then this returns false.

Since
3.1.2
LeapQuaternion Multiply ( LeapQuaternion  rhs)

Concatenates the rotation described by this quaternion with the one provided and returns the result.

Returns
A LeapQuaternion containing the product.
Since
3.1.2
override string ToString ( )

Returns a string containing this quaternion in a human readable format: (x, y, z).

Since
3.1.2

Member Data Documentation

readonly LeapQuaternion Identity = new LeapQuaternion(0, 0, 0, 1)
static

The identity quaternion.

Since
3.1.2
float w

The w component.

Since
3.1.2
float x

The x component.

Since
3.1.2
float y

The y component.

Since
3.1.2
float z

The z component.

Since
3.1.2

Property Documentation

float Magnitude
get

The magnitude, or length, of this quaternion.

Returns
The length of this quaternion.
Since
3.1.2
float MagnitudeSquared
get

The square of the magnitude, or length, of this quaternion.

Returns
The square of the length of this quaternion.
Since
3.1.2
LeapQuaternion Normalized
get

A normalized copy of this quaternion.

Returns
A LeapQuaternion object with a length of one.
Since
3.1.2