Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtGui.QQuaternion Class Reference

The QQuaternion class represents a quaternion consisting of a vector and scalar. More...

Inheritance diagram for QtGui.QQuaternion:
Collaboration diagram for QtGui.QQuaternion:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QQuaternion ()
 
 
 QQuaternion (QVector4D vector)
 
 
 QQuaternion (QQuaternion copy)
 
 
 QQuaternion (double scalar, QVector3D vector)
 
 
 QQuaternion (double scalar, double xpos, double ypos, double zpos)
 
 
virtual void CreateProxy ()
 
new QQuaternion Conjugate ()
 
 
new bool IsIdentity ()
 
 
new bool IsNull ()
 
 
new double Length ()
 
 
new double LengthSquared ()
 
 
new void Normalize ()
 
 
new QQuaternion Normalized ()
 
 
new QVector3D RotatedVector (QVector3D vector)
 
 
new void SetVector (double x, double y, double z)
 
 
new QVector4D ToVector4D ()
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QQuaternion arg1, QQuaternion arg2)
 
static QQuaternion operator* (QQuaternion arg1, QQuaternion arg2)
 
 
static QQuaternion operator* (QQuaternion arg1, double arg2)
 
 
static QQuaternion operator+ (QQuaternion arg1, QQuaternion arg2)
 
 
static QQuaternion operator- (QQuaternion arg1)
 
 
static QQuaternion operator- (QQuaternion arg1, QQuaternion arg2)
 
 
static QQuaternion operator/ (QQuaternion arg1, double arg2)
 
 
static bool operator== (QQuaternion arg1, QQuaternion arg2)
 
static QQuaternion FromAxisAndAngle (QVector3D axis, double angle)
 
 
static QQuaternion FromAxisAndAngle (double x, double y, double z, double angle)
 
 
static QQuaternion Nlerp (QQuaternion q1, QQuaternion q2, double t)
 
 
static QQuaternion Slerp (QQuaternion q1, QQuaternion q2, double t)
 
 

Protected Member Functions

 QQuaternion (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

new double Scalar [get, set]
 
 
new QVector3D Vector [get, set]
 
 
new double X [get, set]
 
 
new double Y [get, set]
 
 
new double Z [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QQuaternion class represents a quaternion consisting of a vector and scalar.

Quaternions are used to represent rotations in 3D space, and consist of a 3D rotation axis specified by the x, y, and z coordinates, and a scalar representing the rotation angle.

Constructor & Destructor Documentation

QtGui.QQuaternion.QQuaternion ( System.Type  dummy)
protected
QtGui.QQuaternion.QQuaternion ( )

Constructs an identity quaternion, i.e. with coordinates (1, 0, 0, 0).

QtGui.QQuaternion.QQuaternion ( QVector4D  vector)

Constructs a quaternion from the components of vector.

QtGui.QQuaternion.QQuaternion ( QQuaternion  copy)

Constructs an identity quaternion, i.e. with coordinates (1, 0, 0, 0).

QtGui.QQuaternion.QQuaternion ( double  scalar,
QVector3D  vector 
)

Constructs an identity quaternion, i.e. with coordinates (1, 0, 0, 0).

QtGui.QQuaternion.QQuaternion ( double  scalar,
double  xpos,
double  ypos,
double  zpos 
)

Constructs an identity quaternion, i.e. with coordinates (1, 0, 0, 0).

Member Function Documentation

new QQuaternion QtGui.QQuaternion.Conjugate ( )

Returns the conjugate of this quaternion, which is (-x, -y, -z, scalar).

virtual void QtGui.QQuaternion.CreateProxy ( )
virtual
new void QtGui.QQuaternion.Dispose ( )
override bool QtGui.QQuaternion.Equals ( object  o)
static QQuaternion QtGui.QQuaternion.FromAxisAndAngle ( QVector3D  axis,
double  angle 
)
static

Creates a normalized quaternion that corresponds to rotating through angle degrees about the specified 3D axis.

static QQuaternion QtGui.QQuaternion.FromAxisAndAngle ( double  x,
double  y,
double  z,
double  angle 
)
static

Creates a normalized quaternion that corresponds to rotating through angle degrees about the specified 3D axis.

override int QtGui.QQuaternion.GetHashCode ( )
new bool QtGui.QQuaternion.IsIdentity ( )

Returns true if the x, y, and z components of this quaternion are set to 0.0, and the scalar component is set to 1.0; otherwise returns false.

new bool QtGui.QQuaternion.IsNull ( )

Returns true if the x, y, z, and scalar components of this quaternion are set to 0.0; otherwise returns false.

new double QtGui.QQuaternion.Length ( )

Returns the length of the quaternion. This is also called the "norm".

See also lengthSquared() and normalized().

new double QtGui.QQuaternion.LengthSquared ( )

Returns the squared length of the quaternion.

See also length().

static QQuaternion QtGui.QQuaternion.Nlerp ( QQuaternion  q1,
QQuaternion  q2,
double  t 
)
static

Interpolates along the shortest linear path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the distance to travel between q1 and q2. The result will be normalized().

If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.

The nlerp() function is typically faster than slerp() and will give approximate results to spherical interpolation that are good enough for some applications.

See also slerp().

new void QtGui.QQuaternion.Normalize ( )

Normalizes the currect quaternion in place. Nothing happens if this is a null quaternion or the length of the quaternion is very close to 1.

See also length() and normalized().

new QQuaternion QtGui.QQuaternion.Normalized ( )

Returns the normalized unit form of this quaternion.

If this quaternion is null, then a null quaternion is returned. If the length of the quaternion is very close to 1, then the quaternion will be returned as-is. Otherwise the normalized form of the quaternion of length 1 will be returned.

See also length() and normalize().

static bool QtGui.QQuaternion.operator!= ( QQuaternion  arg1,
QQuaternion  arg2 
)
static
static QQuaternion QtGui.QQuaternion.operator* ( QQuaternion  arg1,
QQuaternion  arg2 
)
static

Multiplies q1 and q2 using quaternion multiplication. The result corresponds to applying both of the rotations specified by q1 and q2.

See also QQuaternion::operator*=().

static QQuaternion QtGui.QQuaternion.operator* ( QQuaternion  arg1,
double  arg2 
)
static

Multiplies q1 and q2 using quaternion multiplication. The result corresponds to applying both of the rotations specified by q1 and q2.

See also QQuaternion::operator*=().

static QQuaternion QtGui.QQuaternion.operator+ ( QQuaternion  arg1,
QQuaternion  arg2 
)
static

Returns a QQuaternion object that is the sum of the given quaternions, q1 and q2; each component is added separately.

See also QQuaternion::operator+=().

static QQuaternion QtGui.QQuaternion.operator- ( QQuaternion  arg1)
static

This is an overloaded function.

Returns a QQuaternion object that is formed by changing the sign of all three components of the given quaternion.

Equivalent to QQuaternion(0,0,0,0) - quaternion.

static QQuaternion QtGui.QQuaternion.operator- ( QQuaternion  arg1,
QQuaternion  arg2 
)
static

Returns a QQuaternion object that is formed by subtracting q2 from q1; each component is subtracted separately.

See also QQuaternion::operator-=().

static QQuaternion QtGui.QQuaternion.operator/ ( QQuaternion  arg1,
double  arg2 
)
static

Returns the QQuaternion object formed by dividing all components of the given quaternion by the given divisor.

See also QQuaternion::operator/=().

static bool QtGui.QQuaternion.operator== ( QQuaternion  arg1,
QQuaternion  arg2 
)
static
new QVector3D QtGui.QQuaternion.RotatedVector ( QVector3D  vector)

Rotates vector with this quaternion to produce a new vector in 3D space. The following code:

QVector3D result = q.rotatedVector(vector);

is equivalent to the following:

QVector3D result = (q * QQuaternion(0, vector) * q.conjugate()).vector();

new void QtGui.QQuaternion.SetVector ( double  x,
double  y,
double  z 
)

Sets the vector component of this quaternion to vector.

See also vector() and setScalar().

static QQuaternion QtGui.QQuaternion.Slerp ( QQuaternion  q1,
QQuaternion  q2,
double  t 
)
static

Interpolates along the shortest spherical path between the rotational positions q1 and q2. The value t should be between 0 and 1, indicating the spherical distance to travel between q1 and q2.

If t is less than or equal to 0, then q1 will be returned. If t is greater than or equal to 1, then q2 will be returned.

See also nlerp().

new QVector4D QtGui.QQuaternion.ToVector4D ( )

Returns this quaternion as a 4D vector.

Member Data Documentation

SmokeInvocation QtGui.QQuaternion.interceptor
protected

Property Documentation

new double QtGui.QQuaternion.Scalar
getset

Returns the scalar component of this quaternion.

Sets the scalar component of this quaternion to scalar.

virtual System.IntPtr QtGui.QQuaternion.SmokeObject
getset
new QVector3D QtGui.QQuaternion.Vector
getset

Returns the vector component of this quaternion.

Sets the vector component of this quaternion to vector.

new double QtGui.QQuaternion.X
getset

Returns the x coordinate of this quaternion's vector.

Sets the x coordinate of this quaternion's vector to the given x coordinate.

new double QtGui.QQuaternion.Y
getset

Returns the y coordinate of this quaternion's vector.

Sets the y coordinate of this quaternion's vector to the given y coordinate.

new double QtGui.QQuaternion.Z
getset

Returns the z coordinate of this quaternion's vector.

Sets the z coordinate of this quaternion's vector to the given z coordinate.