TAlfTransformationCommand Class Reference

class TAlfTransformationCommand : public TAlfObjectCommand

TAlfTransformationCommand is a command that operates on a transformation.

Transformation command can generate one of the following operations:
  • 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

If the transformation operation is rotation the default rotation is around z-axis. If the transformation operation is scaling the default scale factors are 1.0 on all axis. On any other transformation the x,y and z components are zero by default.
Usage:
        //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 );
       

Inherits from

Constructor & Destructor Documentation

TAlfTransformationCommand(TAny *, CAlfTransformation &, TAlfOp, TInt)

IMPORT_C TAlfTransformationCommand ( TAny * aOwner,
CAlfTransformation & aTransformation,
TAlfOp aOperation = EAlfOpLoadIdentity,
TInt aStep = EStepNone
)

Constructs a new transformation command.

Parameters

TAny * aOwner Owner of the transformation. Allowed be NULL.
CAlfTransformation & aTransformation Transformation to operate on.
TAlfOp aOperation = EAlfOpLoadIdentity Operation to perform.
TInt aStep = EStepNone Step index in the transformation.

Member Functions Documentation

CommandExtension(const TUid &, TAny **)

IMPORT_C void CommandExtension ( const TUid & aExtensionUid,
TAny ** aExtensionParams
) [protected, virtual]

Parameters

const TUid & aExtensionUid
TAny ** aExtensionParams

ExecuteL(CAlfEnv &)

IMPORT_C void ExecuteL ( CAlfEnv & aEnv ) const [virtual]

Executes the command.

Parameters

CAlfEnv & aEnv The environment in which the command is being executed.

SetAngle(const TAlfTimedValue &)

IMPORT_C void SetAngle ( const TAlfTimedValue & aValue )

Set the angle of rotation if the transformation is rotation.

Parameters

const TAlfTimedValue & aValue

SetX(const TAlfTimedValue &)

IMPORT_C void SetX ( const TAlfTimedValue & aValue )
Sets the X component.
  • 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.

Parameters

const TAlfTimedValue & aValue Timed value to set to the X component.

SetY(const TAlfTimedValue &)

IMPORT_C void SetY ( const TAlfTimedValue & aValue )
Sets the Y component.
  • 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.

Parameters

const TAlfTimedValue & aValue Timed value to set to the Y component.

SetZ(const TAlfTimedValue &)

IMPORT_C void SetZ ( const TAlfTimedValue & aValue )
Sets the Z component.
  • 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.

Parameters

const TAlfTimedValue & aValue Timed value to set to the Z component.

Size()

IMPORT_C TInt Size ( ) const [virtual]

Returns the size of the command.

Step()

IMPORT_C TInt Step ( ) const

Returns the transformation step index.

Transformation()

IMPORT_C CAlfTransformation & Transformation ( ) const

Returns the transformation that the command operates on.

Member Enumerations Documentation

Enum anonymous

Enumerators

EStepNone = -1

Used in the aStep parameter to specify that no step index is specified.

Member Data Documentation

TAlfTimedValue iAngle

TAlfTimedValue iAngle [private]

Angle component. Suspended.

TInt iSpare1

TInt iSpare1 [private]

TInt iSpare2

TInt iSpare2 [private]

TInt iStep

TInt iStep [private]

Step index.

CAlfTransformation & iTransformation

CAlfTransformation & iTransformation [private]

Image of the command.

TAlfTimedValue iX

TAlfTimedValue iX [private]

X component. Suspended.

TAlfTimedValue iY

TAlfTimedValue iY [private]

Y component. Suspended.

TAlfTimedValue iZ

TAlfTimedValue iZ [private]

Z component. Suspended.