Qyoto  4.0.6
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 void Normalize ()
 
 
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 q1, QQuaternion q2)
 
 
static QQuaternion operator* (QQuaternion q1, QQuaternion q2)
 
 
static QQuaternion operator* (QQuaternion quaternion, double factor)
 
 
static QQuaternion operator+ (QQuaternion q1, QQuaternion q2)
 
 
static QQuaternion operator- (QQuaternion quaternion)
 
 
static QQuaternion operator- (QQuaternion q1, QQuaternion q2)
 
 
static QQuaternion operator/ (QQuaternion quaternion, double divisor)
 
 
static bool operator== (QQuaternion q1, QQuaternion q2)
 
 
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

double Scalar [get, set]
 
 
QVector3D Vector [get, set]
 
 
double X [get, set]
 
 
double Y [get, set]
 
 
double Z [get, set]
 
 
QQuaternion Conjugate [get]
 
 
bool IsIdentity [get]
 
 
bool IsNull [get]
 
 
double Length [get]
 
 
double LengthSquared [get]
 
 
QQuaternion Normalized [get]
 
 
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)
QtGui.QQuaternion.QQuaternion ( double  scalar,
QVector3D  vector 
)

Constructs a quaternion vector from the specified vector and scalar.

See also vector() and scalar().

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

Constructs a quaternion with the vector (xpos, ypos, zpos) and scalar.

Member Function Documentation

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 3D axis (x, y, z).

override int QtGui.QQuaternion.GetHashCode ( )
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().

static bool QtGui.QQuaternion.operator!= ( QQuaternion  q1,
QQuaternion  q2 
)
static

Returns true if q1 is not equal to q2; otherwise returns false. This operator uses an exact floating-point comparison.

static QQuaternion QtGui.QQuaternion.operator* ( QQuaternion  q1,
QQuaternion  q2 
)
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  quaternion,
double  factor 
)
static

Returns a copy of the given quaternion, multiplied by the given factor.

See also QQuaternion::operator*=().

static QQuaternion QtGui.QQuaternion.operator+ ( QQuaternion  q1,
QQuaternion  q2 
)
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  quaternion)
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  q1,
QQuaternion  q2 
)
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  quaternion,
double  divisor 
)
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  q1,
QQuaternion  q2 
)
static

Returns true if q1 is equal to q2; otherwise returns false. This operator uses an exact floating-point comparison.

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 (x, y, z).

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

QQuaternion QtGui.QQuaternion.Conjugate
get

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

bool QtGui.QQuaternion.IsIdentity
get

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.

bool QtGui.QQuaternion.IsNull
get

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

double QtGui.QQuaternion.Length
get

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

See also lengthSquared() and normalized().

double QtGui.QQuaternion.LengthSquared
get

Returns the squared length of the quaternion.

See also length().

QQuaternion QtGui.QQuaternion.Normalized
get

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().

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
QVector3D QtGui.QQuaternion.Vector
getset

Returns the vector component of this quaternion.

Sets the vector component of this quaternion to vector.

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.

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.

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.