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

The QVector3D class represents a vector or vertex in 3D space. More...

Inheritance diagram for QtGui.QVector3D:
Collaboration diagram for QtGui.QVector3D:

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QVector3D ()
 
 
 QVector3D (QPoint point)
 
 
 QVector3D (QPointF point)
 
 
 QVector3D (QVector2D vector)
 
 
 QVector3D (QVector4D vector)
 
 
 QVector3D (QVector3D copy)
 
 
 QVector3D (QVector2D vector, double zpos)
 
 
 QVector3D (double xpos, double ypos, double zpos)
 
 
virtual void CreateProxy ()
 
new double DistanceToLine (QVector3D point, QVector3D direction)
 
 
new double DistanceToPlane (QVector3D plane, QVector3D normal)
 
 
new double DistanceToPlane (QVector3D plane1, QVector3D plane2, QVector3D plane3)
 
 
new bool IsNull ()
 
 
new double Length ()
 
 
new double LengthSquared ()
 
 
new void Normalize ()
 
 
new QVector3D Normalized ()
 
 
new QPoint ToPoint ()
 
 
new QPointF ToPointF ()
 
 
new QVector2D ToVector2D ()
 
 
new QVector4D ToVector4D ()
 
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QVector3D arg1, QVector3D arg2)
 
static QVector3D operator* (QVector3D arg1, QMatrix4x4 arg2)
 
 
static QVector3D operator* (QVector3D arg1, QVector3D arg2)
 
 
static QVector3D operator* (QVector3D arg1, double arg2)
 
 
static QVector3D operator+ (QVector3D arg1, QVector3D arg2)
 
 
static QVector3D operator- (QVector3D arg1)
 
 
static QVector3D operator- (QVector3D arg1, QVector3D arg2)
 
 
static QVector3D operator/ (QVector3D arg1, double arg2)
 
 
static bool operator== (QVector3D arg1, QVector3D arg2)
 
static QVector3D CrossProduct (QVector3D v1, QVector3D v2)
 
 
static double DotProduct (QVector3D v1, QVector3D v2)
 
 
static QVector3D Normal (QVector3D v1, QVector3D v2)
 
 
static QVector3D Normal (QVector3D v1, QVector3D v2, QVector3D v3)
 
 

Protected Member Functions

 QVector3D (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

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

Detailed Description

The QVector3D class represents a vector or vertex in 3D space.

Vectors are one of the main building blocks of 3D representation and drawing. They consist of three coordinates, traditionally called x, y, and z.

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

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

See also QVector2D, QVector4D, and QQuaternion.

Constructor & Destructor Documentation

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

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

QtGui.QVector3D.QVector3D ( QPoint  point)

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

QtGui.QVector3D.QVector3D ( QPointF  point)

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

QtGui.QVector3D.QVector3D ( QVector2D  vector)

Constructs a 3D vector from the specified 2D vector. The z coordinate is set to zero.

See also toVector2D().

QtGui.QVector3D.QVector3D ( QVector4D  vector)

Constructs a 3D vector from the specified 4D vector. The w coordinate is dropped.

See also toVector4D().

QtGui.QVector3D.QVector3D ( QVector3D  copy)

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

QtGui.QVector3D.QVector3D ( QVector2D  vector,
double  zpos 
)

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

QtGui.QVector3D.QVector3D ( double  xpos,
double  ypos,
double  zpos 
)

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

Member Function Documentation

virtual void QtGui.QVector3D.CreateProxy ( )
virtual
static QVector3D QtGui.QVector3D.CrossProduct ( QVector3D  v1,
QVector3D  v2 
)
static

Returns the cross-product of vectors v1 and v2, which corresponds to the normal vector of a plane defined by v1 and v2.

See also normal().

new void QtGui.QVector3D.Dispose ( )
new double QtGui.QVector3D.DistanceToLine ( QVector3D  point,
QVector3D  direction 
)

Returns the distance that this vertex is from a line defined by point and the unit vector direction.

If direction is a null vector, then it does not define a line. In that case, the distance from point to this vertex is returned.

See also distanceToPlane().

new double QtGui.QVector3D.DistanceToPlane ( QVector3D  plane,
QVector3D  normal 
)

Returns the distance from this vertex to a plane defined by the vertex plane and a normal unit vector. The normal parameter is assumed to have been normalized to a unit vector.

The return value will be negative if the vertex is below the plane, or zero if it is on the plane.

See also normal() and distanceToLine().

new double QtGui.QVector3D.DistanceToPlane ( QVector3D  plane1,
QVector3D  plane2,
QVector3D  plane3 
)

This is an overloaded function.

Returns the distance from this vertex a plane defined by the vertices plane1, plane2 and plane3.

The return value will be negative if the vertex is below the plane, or zero if it is on the plane.

The two vectors that define the plane are plane2 - plane1 and plane3 - plane1.

See also normal() and distanceToLine().

static double QtGui.QVector3D.DotProduct ( QVector3D  v1,
QVector3D  v2 
)
static

Returns the dot product of v1 and v2.

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

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

new double QtGui.QVector3D.Length ( )

Returns the length of the vector from the origin.

See also lengthSquared() and normalized().

new double QtGui.QVector3D.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().

static QVector3D QtGui.QVector3D.Normal ( QVector3D  v1,
QVector3D  v2 
)
static

Returns the normal vector of a plane defined by vectors v1 and v2, normalized to be a unit vector.

Use crossProduct() to compute the cross-product of v1 and v2 if you do not need the result to be normalized to a unit vector.

See also crossProduct() and distanceToPlane().

static QVector3D QtGui.QVector3D.Normal ( QVector3D  v1,
QVector3D  v2,
QVector3D  v3 
)
static

This is an overloaded function.

Returns the normal vector of a plane defined by vectors v2 - v1 and v3 - v1, normalized to be a unit vector.

Use crossProduct() to compute the cross-product of v2 - v1 and v3 - v1 if you do not need the result to be normalized to a unit vector.

See also crossProduct() and distanceToPlane().

new void QtGui.QVector3D.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 QVector3D QtGui.QVector3D.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.QVector3D.operator!= ( QVector3D  arg1,
QVector3D  arg2 
)
static
static QVector3D QtGui.QVector3D.operator* ( QVector3D  arg1,
QMatrix4x4  arg2 
)
static

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

See also QVector3D::operator*=().

static QVector3D QtGui.QVector3D.operator* ( QVector3D  arg1,
QVector3D  arg2 
)
static

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

Note: this is not the same as the crossProduct() of v1 and v2.

See also QVector3D::crossProduct().

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

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

See also QVector3D::operator*=().

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

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

See also QVector3D::operator+=().

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

This is an overloaded function.

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

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

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

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

See also QVector3D::operator-=().

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

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

See also QVector3D::operator/=().

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

Returns the QPoint form of this 3D vector. The z coordinate is dropped.

See also toPointF() and toVector2D().

new QPointF QtGui.QVector3D.ToPointF ( )

Returns the QPointF form of this 3D vector. The z coordinate is dropped.

See also toPoint() and toVector2D().

new QVector2D QtGui.QVector3D.ToVector2D ( )

Returns the 2D vector form of this 3D vector, dropping the z coordinate.

See also toVector4D() and toPoint().

new QVector4D QtGui.QVector3D.ToVector4D ( )

Returns the 4D form of this 3D vector, with the w coordinate set to zero.

See also toVector2D() and toPoint().

Member Data Documentation

SmokeInvocation QtGui.QVector3D.interceptor
protected

Property Documentation

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

Returns the x coordinate of this point.

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

new double QtGui.QVector3D.Y
getset

Returns the y coordinate of this point.

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

new double QtGui.QVector3D.Z
getset

Returns the z coordinate of this point.

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