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

The QVector4D class represents a vector or vertex in 4D space. More...

Inheritance diagram for QtGui.QVector4D:
Collaboration diagram for QtGui.QVector4D:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QVector4D ()
 
 
 QVector4D (QPoint point)
 
 
 QVector4D (QPointF point)
 
 
 QVector4D (QVector2D vector)
 
 
 QVector4D (QVector3D vector)
 
 
 QVector4D (QVector4D copy)
 
 QVector4D (QVector3D vector, double wpos)
 
 
 QVector4D (QVector2D vector, double zpos, double wpos)
 
 
 QVector4D (double xpos, double ypos, double zpos, double wpos)
 
 
virtual void CreateProxy ()
 
new void Normalize ()
 
 
new QPoint ToPoint ()
 
 
new QPointF ToPointF ()
 
 
new QVector2D ToVector2D ()
 
 
new QVector2D ToVector2DAffine ()
 
 
new QVector3D ToVector3D ()
 
 
new QVector3D ToVector3DAffine ()
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QVector4D v1, QVector4D v2)
 
 
static QVector4D operator* (QVector4D v1, QVector4D v2)
 
 
static QVector4D operator* (QVector4D vector, QMatrix4x4 matrix)
 
 
static QVector4D operator* (QVector4D vector, double factor)
 
 
static QVector4D operator+ (QVector4D v1, QVector4D v2)
 
 
static QVector4D operator- (QVector4D vector)
 
 
static QVector4D operator- (QVector4D v1, QVector4D v2)
 
 
static QVector4D operator/ (QVector4D vector, double divisor)
 
 
static bool operator== (QVector4D v1, QVector4D v2)
 
 
static double DotProduct (QVector4D v1, QVector4D v2)
 
 

Protected Member Functions

 QVector4D (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

double W [get, set]
 
 
double X [get, set]
 
 
double Y [get, set]
 
 
double Z [get, set]
 
 
bool IsNull [get]
 
 
double Length [get]
 
 
double LengthSquared [get]
 
 
QVector4D Normalized [get]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QVector4D class represents a vector or vertex in 4D space.

The QVector4D class can also be used to represent vertices in 4D space. We therefore do not need to provide a separate vertex class.

Note: By design values in the QVector4D instance are stored as float. This means that on platforms where the qreal arguments to QVector4D functions are represented by double values, it is possible to lose precision.

See also QQuaternion, QVector2D, and QVector3D.

Constructor & Destructor Documentation

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

Constructs a null vector, i.e. with coordinates (0, 0, 0, 0).

QtGui.QVector4D.QVector4D ( QPoint  point)

Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0.

QtGui.QVector4D.QVector4D ( QPointF  point)

Constructs a vector with x and y coordinates from a 2D point, and z and w coordinates of 0.

QtGui.QVector4D.QVector4D ( QVector2D  vector)

Constructs a 4D vector from the specified 2D vector. The z and w coordinates are set to zero.

See also toVector2D().

QtGui.QVector4D.QVector4D ( QVector3D  vector)

Constructs a 4D vector from the specified 3D vector. The w coordinate is set to zero.

See also toVector3D().

QtGui.QVector4D.QVector4D ( QVector4D  copy)
QtGui.QVector4D.QVector4D ( QVector3D  vector,
double  wpos 
)

Constructs a 4D vector from the specified 3D vector. The w coordinate is set to wpos.

See also toVector3D().

QtGui.QVector4D.QVector4D ( QVector2D  vector,
double  zpos,
double  wpos 
)

Constructs a 4D vector from the specified 2D vector. The z and w coordinates are set to zpos and wpos respectively.

See also toVector2D().

QtGui.QVector4D.QVector4D ( double  xpos,
double  ypos,
double  zpos,
double  wpos 
)

Constructs a vector with coordinates (xpos, ypos, zpos, wpos).

Member Function Documentation

virtual void QtGui.QVector4D.CreateProxy ( )
virtual
new void QtGui.QVector4D.Dispose ( )
static double QtGui.QVector4D.DotProduct ( QVector4D  v1,
QVector4D  v2 
)
static

Returns the dot product of v1 and v2.

override bool QtGui.QVector4D.Equals ( object  o)
override int QtGui.QVector4D.GetHashCode ( )
new void QtGui.QVector4D.Normalize ( )

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

See also length() and normalized().

static bool QtGui.QVector4D.operator!= ( QVector4D  v1,
QVector4D  v2 
)
static

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

static QVector4D QtGui.QVector4D.operator* ( QVector4D  v1,
QVector4D  v2 
)
static

Returns the vector consisting of the multiplication of the components from v1 and v2.

See also QVector4D::operator*=().

static QVector4D QtGui.QVector4D.operator* ( QVector4D  vector,
QMatrix4x4  matrix 
)
static

Returns the result of transforming vector according to matrix, with the matrix applied post-vector.

static QVector4D QtGui.QVector4D.operator* ( QVector4D  vector,
double  factor 
)
static

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

See also QVector4D::operator*=().

static QVector4D QtGui.QVector4D.operator+ ( QVector4D  v1,
QVector4D  v2 
)
static

Returns a QVector4D object that is the sum of the given vectors, v1 and v2; each component is added separately.

See also QVector4D::operator+=().

static QVector4D QtGui.QVector4D.operator- ( QVector4D  vector)
static

This is an overloaded function.

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

Equivalent to QVector4D(0,0,0,0) - vector.

static QVector4D QtGui.QVector4D.operator- ( QVector4D  v1,
QVector4D  v2 
)
static

Returns a QVector4D object that is formed by subtracting v2 from v1; each component is subtracted separately.

See also QVector4D::operator-=().

static QVector4D QtGui.QVector4D.operator/ ( QVector4D  vector,
double  divisor 
)
static

Returns the QVector4D object formed by dividing all four components of the given vector by the given divisor.

See also QVector4D::operator/=().

static bool QtGui.QVector4D.operator== ( QVector4D  v1,
QVector4D  v2 
)
static

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

new QPoint QtGui.QVector4D.ToPoint ( )

Returns the QPoint form of this 4D vector. The z and w coordinates are dropped.

See also toPointF() and toVector2D().

new QPointF QtGui.QVector4D.ToPointF ( )

Returns the QPointF form of this 4D vector. The z and w coordinates are dropped.

See also toPoint() and toVector2D().

new QVector2D QtGui.QVector4D.ToVector2D ( )

Returns the 2D vector form of this 4D vector, dropping the z and w coordinates.

See also toVector2DAffine(), toVector3D(), and toPoint().

new QVector2D QtGui.QVector4D.ToVector2DAffine ( )

Returns the 2D vector form of this 4D vector, dividing the x and y coordinates by the w coordinate and dropping the z coordinate. Returns a null vector if w is zero.

See also toVector2D(), toVector3DAffine(), and toPoint().

new QVector3D QtGui.QVector4D.ToVector3D ( )

Returns the 3D vector form of this 4D vector, dropping the w coordinate.

See also toVector3DAffine(), toVector2D(), and toPoint().

new QVector3D QtGui.QVector4D.ToVector3DAffine ( )

Returns the 3D vector form of this 4D vector, dividing the x, y, and z coordinates by the w coordinate. Returns a null vector if w is zero.

See also toVector3D(), toVector2DAffine(), and toPoint().

Member Data Documentation

SmokeInvocation QtGui.QVector4D.interceptor
protected

Property Documentation

bool QtGui.QVector4D.IsNull
get

Returns true if the x, y, z, and w coordinates are set to 0.0, otherwise returns false.

double QtGui.QVector4D.Length
get

Returns the length of the vector from the origin.

See also lengthSquared() and normalized().

double QtGui.QVector4D.LengthSquared
get

Returns the squared length of the vector from the origin. This is equivalent to the dot product of the vector with itself.

See also length() and dotProduct().

QVector4D QtGui.QVector4D.Normalized
get

Returns the normalized unit vector form of this vector.

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

See also length() and normalize().

virtual System.IntPtr QtGui.QVector4D.SmokeObject
getset
double QtGui.QVector4D.W
getset

Returns the w coordinate of this point.

Sets the w coordinate of this point to the given w coordinate.

double QtGui.QVector4D.X
getset

Returns the x coordinate of this point.

Sets the x coordinate of this point to the given x coordinate.

double QtGui.QVector4D.Y
getset

Returns the y coordinate of this point.

Sets the y coordinate of this point to the given y coordinate.

double QtGui.QVector4D.Z
getset

Returns the z coordinate of this point.

Sets the z coordinate of this point to the given z coordinate.