DzBackdrop Class Reference
[Scene Items]

Backdrop that gets drawn behind viewport scenes. More...

Inheritance diagram for DzBackdrop:

DzElement DzBase QObject Object List of all members.

Enumerations



enum  Rotation { NO_ROTATION = 0, ROTATE_LEFT_90, ROTATE_RIGHT_90, ROTATE_180 }

Properties

Boolean flipHorizontal
Boolean flipVertical
Rotation rotation

Methods

void clear ()
DzBoolProperty getHorizontalFlipControl ()
DzMaterial getMaterial ()
DzEnumProperty getRotationControl ()
DzTexture getTexture ()
DzBoolProperty getVerticalFlipControl ()
void setTexture (DzTexture img)
void showOptions ()

Constructors

 DzBackdrop ()

Signals

void drawnDataChanged ()
 Signature: "drawnDataChanged()"

Detailed Description

Backdrop that gets drawn behind viewport scenes.

This class encapsulates a 2D image and the parameters for drawing the image as a backdrop for the scene. An instance of this class only contributes to the scene if it is set as the current backdrop for the scene.

See also:
DzScene::setBackdrop(), DzScene::getBackdrop()


Member Enumeration Documentation

enum DzBackdrop::Rotation

Enumerated image rotation types

Enumerator:
NO_ROTATION  No rotation
ROTATE_LEFT_90  90 degree rotation Counter-Clockwise
ROTATE_RIGHT_90  90 degree rotation Clockwise
ROTATE_180  180 degree rotation


Constructor & Destructor Documentation

DzBackdrop::DzBackdrop (  ) 

Default Constructor.


Member Function Documentation

void DzBackdrop::clear (  ) 

Clears the current back drop image, and resets all parameters.

Example:
    // get the backdrop for the scene
    DzBackdrop  *backdrop = dzScene->getBackdrop();

    // clear the backdrop
    backdrop->clear();

void DzBackdrop::drawnDataChanged (  )  [signal]

Signature: "drawnDataChanged()"

Emitted when the information in this backdrop changes.

DzBoolProperty DzBackdrop::getHorizontalFlipControl (  ) 

Returns:
The property that controls whether the backdrop is flipped horizontally

DzMaterial DzBackdrop::getMaterial (  ) 

Returns:
An editable instance of the material used to shade the backdrop.
Example:
    // get the backdrop for the scene
    DzBackdrop  *backdrop = dzScene->getBackdrop();
    DzMaterial  *mat = backdrop->getMaterial();

    // set the color of the backdrop to red
    mat->setDiffuseColor( QColor( 255, 0, 0 ) );

DzEnumProperty DzBackdrop::getRotationControl (  ) 

Returns:
The property that controls rotation of the backdrop

DzTexture DzBackdrop::getTexture (  ) 

Returns:
Current backdrop image.
Example:
    // get the backdrop for the scene
    DzBackdrop  *backdrop = dzScene->getBackdrop();
    DzTexture   *img = backdrop->getTexture();

    // log the file name of the current backdrop image
    if( img )
        dzApp->log( QString( "Current Backdrop Image: %1" ).arg( img->getFilename() );
    else
        dzApp->log( "No Current Backdrop Image" );
See also:
setImage()

DzBoolProperty DzBackdrop::getVerticalFlipControl (  ) 

Returns:
The property that controls whether the backdrop is flipped vertically

void DzBackdrop::setTexture ( DzTexture  img  ) 

Sets the backdrop image.

Parameters:
img The backdrop image.
Example:
    // get the backdrop for the scene
    DzBackdrop  *backdrop = dzScene->getBackdrop();
    DzImageMgr  *mgr = dzApp->getImageMgr();

    // set the backdrop image
    backdrop->setImage( mgr->getImage( dzApp->getDocumentsPath() + "/Content/Backdrops/SomeBackdrop.jpg" ) );
See also:
getImage()

void DzBackdrop::showOptions (  ) 

Show the options dialog for this backdrop.

Example:
    // get the backdrop for the scene
    DzBackdrop  *backdrop = dzScene->getBackdrop();

    // display options for the backdrop to the user
    backdrop->showOptions( dzApp->getInterface() );


Member Data Documentation

Boolean DzBackdrop::flipHorizontal

This property holds whether or not the backdrop is flipped horizontally

Boolean DzBackdrop::flipVertical

This property holds whether or not the backdrop is flipped vertically

Rotation DzBackdrop::rotation

This property holds the rotation applied to the backdrop


Generated on Thu Sep 24 12:21:10 2009

Copyright © 2002 - 2009 DAZ 3D, Inc.