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  · 

Effect

The Effect item defines simple effects within the QML/3D environment. Examples of such effects include textures, simple material and lighting effects, and so on. More...

Inherits QtObject

Inherited by ShaderProgram.

This type was introduced in Qt 4.8.

Properties

Detailed Description

Defining an Effect

Effects can be defined within QML using the normal syntax for creating any QML/3d object. To create a default effect with no extra information, for example, we can simply using the following:

 Effect {}

More complex effects use the usual QML syntax for accessing and updating properties. In order to specify a texture, for example, the following could be used:

 Effect {
     id: myTextureEffect
     texture: "texture.png"
 }

Property Documentation

blending : bool

This property should be set to true if alpha blending should be enabled when this effect is active, or false otherwise. The default is false.

This property overrides the viewport-specific blending setting that is specified by Viewport::blending.


color : color

The color of the object for simple non-texture effects. The default value for this property is white.


decal : bool

This property should be set to true if the texture should be combined with color to decal the texture onto the object. This property should be set to false to use the texture directly, combined with the material parameters.

The default value for this property is false.


material : Material

Defines the material to apply to items that use this effect.


read-onlyprogress : real

Tracks how much of a remote resource has been downloaded, where 0.0 is no progress, and 1.0 is completion.


texture : url

Texture effects are defined by this property. A texture is provided by means of a QUrl which is then used for texturing.

Textures can also be defined directly as images using the textureImage property.

If the value is non-empty, and the texture could not be loaded from the QUrl for any reason, then the property will not be changed.

See also textureImage.


textureImage : image

This property directly defines a texture using an existing QImage.

Textures can also be defined based on a URL using the texture property.

See also texture.


useLighting : bool

The lighting control parameter; true if this effect should use lighting or false if this effect should use flat colors and textures.

The default value for this property is true.


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