Qyoto
4.0.7
Qyoto is a C# language binding for Qt
|
The QVector2D class represents a vector or vertex in 2D space. More...
Public Member Functions | |
override bool | Equals (object o) |
override int | GetHashCode () |
QVector2D () | |
More... | |
QVector2D (QPoint point) | |
More... | |
QVector2D (QPointF point) | |
More... | |
QVector2D (QVector3D vector) | |
More... | |
QVector2D (QVector4D vector) | |
More... | |
QVector2D (QVector2D copy) | |
QVector2D (double xpos, double ypos) | |
More... | |
virtual void | CreateProxy () |
new void | Normalize () |
More... | |
new QPoint | ToPoint () |
More... | |
new QPointF | ToPointF () |
More... | |
new QVector3D | ToVector3D () |
More... | |
new QVector4D | ToVector4D () |
More... | |
new void | Dispose () |
Static Public Member Functions | |
static bool | operator!= (QVector2D v1, QVector2D v2) |
More... | |
static QVector2D | operator* (QVector2D v1, QVector2D v2) |
More... | |
static QVector2D | operator* (QVector2D vector, double factor) |
More... | |
static QVector2D | operator+ (QVector2D v1, QVector2D v2) |
More... | |
static QVector2D | operator- (QVector2D vector) |
More... | |
static QVector2D | operator- (QVector2D v1, QVector2D v2) |
More... | |
static QVector2D | operator/ (QVector2D vector, double divisor) |
More... | |
static bool | operator== (QVector2D v1, QVector2D v2) |
More... | |
static double | DotProduct (QVector2D v1, QVector2D v2) |
More... | |
Protected Member Functions | |
QVector2D (System.Type dummy) | |
Protected Attributes | |
SmokeInvocation | interceptor |
Properties | |
double | X [get, set] |
More... | |
double | Y [get, set] |
More... | |
bool | IsNull [get] |
More... | |
double | Length [get] |
More... | |
double | LengthSquared [get] |
More... | |
QVector2D | Normalized [get] |
More... | |
virtual System.IntPtr | SmokeObject [get, set] |
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.
|
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 | ) |
QtGui.QVector2D.QVector2D | ( | double | xpos, |
double | ypos | ||
) |
Constructs a vector with coordinates (xpos, ypos).
|
virtual |
new void QtGui.QVector2D.Dispose | ( | ) |
Returns the dot product of v1 and v2.
override bool QtGui.QVector2D.Equals | ( | object | o | ) |
override int QtGui.QVector2D.GetHashCode | ( | ) |
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().
Returns true if v1 is not equal to v2; otherwise returns false. This operator uses an exact floating-point comparison.
Multiplies the components of v1 by the corresponding components in v2.
Returns a copy of the given vector, multiplied by the given factor.
See also QVector2D::operator*=().
Returns a QVector2D object that is the sum of the given vectors, v1 and v2; each component is added separately.
See also QVector2D::operator+=().
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.
Returns a QVector2D object that is formed by subtracting v2 from v1; each component is subtracted separately.
See also QVector2D::operator-=().
Returns the QVector2D object formed by dividing all three components of the given vector by the given divisor.
See also QVector2D::operator/=().
Returns true if v1 is equal to v2; otherwise returns false. This operator uses an exact floating-point comparison.
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().
|
protected |
|
get |
Returns true if the x and y coordinates are set to 0.0, otherwise returns false.
|
get |
Returns the length of the vector from the origin.
See also lengthSquared() and normalized().
|
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().
|
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().
|
getset |
|
getset |
Returns the x coordinate of this point.
Sets the x coordinate of this point to the given x coordinate.
|
getset |
Returns the y coordinate of this point.
Sets the y coordinate of this point to the given y coordinate.