Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QGraphicsLookAtTransform Class

The QGraphicsLookAtTransform class implements a transformation that causes an Item3D to orient to face another Item3D. More...

 #include <QGraphicsLookAtTransform>

Inherits: QQuickQGraphicsTransform3D.

QGraphicsLookAtTransform is instantiated by QML element LookAtTransform

This class was introduced in Qt 4.8.

Properties

  • 1 property inherited from QObject

Public Functions

QGraphicsLookAtTransform(QObject * parent = 0)
QQuickQGraphicsTransform3D(QObject * parent = 0)
~QGraphicsLookAtTransform()
~QQuickQGraphicsTransform3D()
virtual void applyTo(QMatrix4x4 * matrix) const = 0
virtual QQuickQGraphicsTransform3D * clone(QObject * parent = 0) const = 0
bool preserveUpVector() const
void setPreserveUpVector(bool value)
void setSubject(QQuickItem3D * value)
QQuickItem3D * subject() const
  • 31 public functions inherited from QObject

Signals

void preserveUpVectorChanged()
void subjectChanged()
void transformChanged()

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 11 static public members inherited from QObject
  • 9 protected functions inherited from QObject

Detailed Description

The QGraphicsLookAtTransform class implements a transformation that causes an Item3D to orient to face another Item3D.

Sometimes it can be useful to make an object face towards another object, wherever it might be located. This is useful for objects like cameras, lights, arrows, faces etc.

Another common use is called "billboarding", where a quad is always oriented to face the camera.

Property Documentation

preserveUpVector : bool

This property holds true to preserve the up orientation.

This property indicates whether the transform should rotate around a second axis to face directly at the subject (when the subject is the camera, this is known as "spherical billboarding").

If the value for this property is true, then the object will have its up vector's orientation preserved, rotating around only the y-axis and not directly facing the subject unless it happens to fall on the correct plane (when the subject is the camera, this is known as known as "cylindrical billboarding").

The default value for this property is false.

Access functions:

bool preserveUpVector() const
void setPreserveUpVector(bool value)

Notifier signal:

void preserveUpVectorChanged()

subject : QQuickItem3D *

This property holds the local-relative coordinates that are being looked at.

This property indicates what this transform is trying to look at. After applying the transformation.

Forwards is always considered to be in the direction of the positive z axis in local space, and up is always considered to be the positive y axis, and rotation is always around the position (0,0,0) in local space (although any values can be emulated by applying the LookAt transformation to a parent Item3D, and then applying transformations relative to that parent).

If no subject is set, no transformation is applied.

Access functions:

QQuickItem3D * subject() const
void setSubject(QQuickItem3D * value)

Notifier signal:

void subjectChanged()

Member Function Documentation

QGraphicsLookAtTransform::QGraphicsLookAtTransform(QObject * parent = 0)

Construct a lookAt transform and attach it to parent.

QGraphicsLookAtTransform::~QGraphicsLookAtTransform()

Destroy this lookAt transform.

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web