| class TAlfTransformationCommand : public TAlfObjectCommand |
TAlfTransformationCommand is a command that operates on a transformation.
EAlfOpLoadIdentity - Loads an identity matrix to the transformation.
EAlfOpTranslate - Applies a translation to the object affected by the transformation.
EAlfOpScale - Applies scaling to the object affected by the transformation.
EAlfOpRotate - Applies a rotation to the object that is affected by the transformation.
EAlfOpReplaceStep - Replaces the whole transformation step values with the ones given as command parameters
//Enable transformation
iVisual->EnableTransformationL( );
//Get transformation object
CAlfTransformation* transformation = &iVisual->Transformation();
//Set transformation properties
const TInt rotateAngle = 23.67;
transformation->Rotate( rotateAngle );
//Create transformation command
TAlfTransformationCommand command( iVisual,transformation, EAlfOpRotate, 0 );
//Properties can also be set through command
command.SetAngle( TAlfTimedValue( 56 ) );
//Send command
iEnv->Send( command, 1 );
| Public Member Functions | |
|---|---|
| TAlfTransformationCommand ( TAny *, CAlfTransformation &, TAlfOp , TInt ) | |
| IMPORT_C void | ExecuteL (CAlfEnv &) |
| IMPORT_C void | SetAngle (const TAlfTimedValue &) |
| IMPORT_C void | SetX (const TAlfTimedValue &) |
| IMPORT_C void | SetY (const TAlfTimedValue &) |
| IMPORT_C void | SetZ (const TAlfTimedValue &) |
| IMPORT_C TInt | Size () |
| IMPORT_C TInt | Step () |
| IMPORT_C CAlfTransformation & | Transformation () |
| Protected Member Functions | |
|---|---|
| IMPORT_C void | CommandExtension (const TUid &, TAny **) |
| Public Member Enumerations | |
|---|---|
| enum | anonymous { EStepNone = -1 } |
| Private Attributes | |
|---|---|
| TAlfTimedValue | iAngle |
| TInt | iSpare1 |
| TInt | iSpare2 |
| TInt | iStep |
| CAlfTransformation & | iTransformation |
| TAlfTimedValue | iX |
| TAlfTimedValue | iY |
| TAlfTimedValue | iZ |
| IMPORT_C | TAlfTransformationCommand | ( | TAny * | aOwner, |
| CAlfTransformation & | aTransformation, | |||
| TAlfOp | aOperation = EAlfOpLoadIdentity, | |||
| TInt | aStep = EStepNone | |||
| ) | ||||
Constructs a new transformation command.
| IMPORT_C void | CommandExtension | ( | const TUid & | aExtensionUid, |
| TAny ** | aExtensionParams | |||
| ) | [protected, virtual] | |||
| IMPORT_C void | ExecuteL | ( | CAlfEnv & | aEnv | ) | const [virtual] |
Executes the command.
| CAlfEnv & aEnv | The environment in which the command is being executed. |
| IMPORT_C void | SetAngle | ( | const TAlfTimedValue & | aValue | ) |
Set the angle of rotation if the transformation is rotation.
| const TAlfTimedValue & aValue |
| IMPORT_C void | SetX | ( | const TAlfTimedValue & | aValue | ) |
If transformation is translation this sets the amount of translation on X axis.
If transformation is rotation this sets the X component of rotation axis vector.
If transformation is scaling this sets the scaling factor for the X axis.
| const TAlfTimedValue & aValue | Timed value to set to the X component. |
| IMPORT_C void | SetY | ( | const TAlfTimedValue & | aValue | ) |
If transformation is translation this sets the amount of translation on Y axis.
If transformation is rotation this sets the Y component of rotation axis vector.
If transformation is scaling this sets the scaling factor for the Y axis.
| const TAlfTimedValue & aValue | Timed value to set to the Y component. |
| IMPORT_C void | SetZ | ( | const TAlfTimedValue & | aValue | ) |
If transformation is translation this sets the amount of translation on Z axis.
If transformation is rotation this sets the Z component of rotation axis vector.
If transformation is scaling this sets the scaling factor for the Z axis.
| const TAlfTimedValue & aValue | Timed value to set to the Z component. |
| IMPORT_C CAlfTransformation & | Transformation | ( | ) | const |
Returns the transformation that the command operates on.
| EStepNone = -1 |
Used in the aStep parameter to specify that no step index is specified. |
| CAlfTransformation & | iTransformation | [private] |
Image of the command.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.