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

The QVector2D class represents a vector or vertex in 2D space. More...

Inheritance diagram for QtGui.QVector2D:
Collaboration diagram for QtGui.QVector2D:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QVector2D ()
 
 
 QVector2D (QPoint point)
 
 
 QVector2D (QPointF point)
 
 
 QVector2D (QVector3D vector)
 
 
 QVector2D (QVector4D vector)
 
 
 QVector2D (QVector2D copy)
 
 
 QVector2D (double xpos, double ypos)
 
 
virtual void CreateProxy ()
 
new bool IsNull ()
 
 
new double Length ()
 
 
new double LengthSquared ()
 
 
new void Normalize ()
 
 
new QVector2D Normalized ()
 
 
new QPoint ToPoint ()
 
 
new QPointF ToPointF ()
 
 
new QVector3D ToVector3D ()
 
 
new QVector4D ToVector4D ()
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QVector2D arg1, QVector2D arg2)
 
static QVector2D operator* (QVector2D arg1, QVector2D arg2)
 
 
static QVector2D operator* (QVector2D arg1, double arg2)
 
 
static QVector2D operator+ (QVector2D arg1, QVector2D arg2)
 
 
static QVector2D operator- (QVector2D arg1)
 
 
static QVector2D operator- (QVector2D arg1, QVector2D arg2)
 
 
static QVector2D operator/ (QVector2D arg1, double arg2)
 
 
static bool operator== (QVector2D arg1, QVector2D arg2)
 
static double DotProduct (QVector2D v1, QVector2D v2)
 
 

Protected Member Functions

 QVector2D (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

new double X [get, set]
 
 
new double Y [get, set]
 
 
virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

The QVector2D class represents a vector or vertex in 2D space.

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

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

See also QVector3D, QVector4D, and QQuaternion.

Constructor & Destructor Documentation

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

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

QtGui.QVector2D.QVector2D ( QPoint  point)

Constructs a vector with x and y coordinates from a 2D point.

QtGui.QVector2D.QVector2D ( QPointF  point)

Constructs a vector with x and y coordinates from a 2D point.

QtGui.QVector2D.QVector2D ( QVector3D  vector)

Constructs a vector with x and y coordinates from a 3D vector. The z coordinate of vector is dropped.

See also toVector3D().

QtGui.QVector2D.QVector2D ( QVector4D  vector)

Constructs a vector with x and y coordinates from a 3D vector. The z and w coordinates of vector are dropped.

See also toVector4D().

QtGui.QVector2D.QVector2D ( QVector2D  copy)

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

QtGui.QVector2D.QVector2D ( double  xpos,
double  ypos 
)

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

Member Function Documentation

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

Returns the dot product of v1 and v2.

override bool QtGui.QVector2D.Equals ( object  o)
override int QtGui.QVector2D.GetHashCode ( )
new bool QtGui.QVector2D.IsNull ( )

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

new double QtGui.QVector2D.Length ( )

Returns the length of the vector from the origin.

See also lengthSquared() and normalized().

new double QtGui.QVector2D.LengthSquared ( )

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

new void QtGui.QVector2D.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().

new QVector2D QtGui.QVector2D.Normalized ( )

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

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

Multiplies the components of v1 by the corresponding components in v2.

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

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

See also QVector2D::operator*=().

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

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

See also QVector2D::operator+=().

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

This is an overloaded function.

Returns a QVector2D object that is formed by changing the sign of the components of the given vector.

Equivalent to QVector2D(0,0) - vector.

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

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

See also QVector2D::operator-=().

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

Returns the QVector2D object formed by dividing all three components of the given vector by the given divisor.

See also QVector2D::operator/=().

static bool QtGui.QVector2D.operator== ( QVector2D  arg1,
QVector2D  arg2 
)
static
new QPoint QtGui.QVector2D.ToPoint ( )

Returns the QPoint form of this 2D vector.

See also toPointF() and toVector3D().

new QPointF QtGui.QVector2D.ToPointF ( )

Returns the QPointF form of this 2D vector.

See also toPoint() and toVector3D().

new QVector3D QtGui.QVector2D.ToVector3D ( )

Returns the 3D form of this 2D vector, with the z coordinate set to zero.

See also toVector4D() and toPoint().

new QVector4D QtGui.QVector2D.ToVector4D ( )

Returns the 4D form of this 2D vector, with the z and w coordinates set to zero.

See also toVector3D() and toPoint().

Member Data Documentation

SmokeInvocation QtGui.QVector2D.interceptor
protected

Property Documentation

virtual System.IntPtr QtGui.QVector2D.SmokeObject
getset
new double QtGui.QVector2D.X
getset

Returns the x coordinate of this point.

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

new double QtGui.QVector2D.Y
getset

Returns the y coordinate of this point.

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